Skip to content

Commit 801a43b

Browse files
committed
made samples easier to run as a JAR
1 parent e6a7dec commit 801a43b

File tree

4 files changed

+47
-0
lines changed

4 files changed

+47
-0
lines changed

rxjava-example/rxjava-client/pom.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,26 @@
2828

2929
<artifactId>rxjava-client</artifactId>
3030

31+
<properties>
32+
<main.class>com.example.grpc.client.RxMetricsClient</main.class>
33+
</properties>
34+
3135
<dependencies>
3236
<dependency>
3337
<groupId>${groupId}</groupId>
3438
<artifactId>rxjava-server</artifactId>
3539
<version>${version}</version>
3640
</dependency>
3741
</dependencies>
42+
43+
<build>
44+
<plugins>
45+
<plugin>
46+
<artifactId>maven-jar-plugin</artifactId>
47+
</plugin>
48+
<plugin>
49+
<artifactId>maven-dependency-plugin</artifactId>
50+
</plugin>
51+
</plugins>
52+
</build>
3853
</project>

rxjava-example/rxjava-server/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030

3131
<properties>
3232
<rxgrpc.version>0.6.1</rxgrpc.version>
33+
<main.class>com.example.grpc.server.RxMetricsServer</main.class>
3334
</properties>
3435

3536
<dependencies>
@@ -48,6 +49,12 @@
4849
</extension>
4950
</extensions>
5051
<plugins>
52+
<plugin>
53+
<artifactId>maven-jar-plugin</artifactId>
54+
</plugin>
55+
<plugin>
56+
<artifactId>maven-dependency-plugin</artifactId>
57+
</plugin>
5158
<plugin>
5259
<groupId>org.xolstice.maven.plugins</groupId>
5360
<artifactId>protobuf-maven-plugin</artifactId>

simple-grpc-client/pom.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,26 @@
2828

2929
<artifactId>simple-grpc-client</artifactId>
3030

31+
<properties>
32+
<main.class>com.example.grpc.client.MyGrpcClient</main.class>
33+
</properties>
34+
3135
<dependencies>
3236
<dependency>
3337
<groupId>${project.groupId}</groupId>
3438
<artifactId>simple-grpc-server</artifactId>
3539
<version>${project.version}</version>
3640
</dependency>
3741
</dependencies>
42+
43+
<build>
44+
<plugins>
45+
<plugin>
46+
<artifactId>maven-jar-plugin</artifactId>
47+
</plugin>
48+
<plugin>
49+
<artifactId>maven-dependency-plugin</artifactId>
50+
</plugin>
51+
</plugins>
52+
</build>
3853
</project>

simple-grpc-server/pom.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
<modelVersion>4.0.0</modelVersion>
2828
<artifactId>simple-grpc-server</artifactId>
2929

30+
<properties>
31+
<main.class>com.example.grpc.server.MyGrpcServer</main.class>
32+
</properties>
33+
3034
<build>
3135
<extensions>
3236
<extension>
@@ -35,6 +39,12 @@
3539
</extension>
3640
</extensions>
3741
<plugins>
42+
<plugin>
43+
<artifactId>maven-jar-plugin</artifactId>
44+
</plugin>
45+
<plugin>
46+
<artifactId>maven-dependency-plugin</artifactId>
47+
</plugin>
3848
<plugin>
3949
<groupId>org.xolstice.maven.plugins</groupId>
4050
<artifactId>protobuf-maven-plugin</artifactId>

0 commit comments

Comments
 (0)