Skip to content

Commit 6fcbc9b

Browse files
BAEL-1022 - minor fixes
1 parent b25f17f commit 6fcbc9b

2 files changed

Lines changed: 70 additions & 70 deletions

File tree

‎grpc/pom.xml‎

Lines changed: 68 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,74 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3-
<modelVersion>4.0.0</modelVersion>
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
44

5-
<groupId>grpc</groupId>
6-
<artifactId>grpc-demo</artifactId>
7-
<version>0.0.1-SNAPSHOT</version>
8-
<packaging>jar</packaging>
5+
<groupId>grpc</groupId>
6+
<artifactId>grpc-demo</artifactId>
7+
<version>0.0.1-SNAPSHOT</version>
8+
<packaging>jar</packaging>
99

10-
<name>grpc-demo</name>
11-
<url>http://maven.apache.org</url>
10+
<name>grpc-demo</name>
11+
<url>http://maven.apache.org</url>
1212

13-
<properties>
14-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
15-
</properties>
13+
<properties>
14+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
15+
<io.grpc.version>1.5.0</io.grpc.version>
16+
</properties>
1617

17-
<dependencies>
18-
<dependency>
19-
<groupId>io.grpc</groupId>
20-
<artifactId>grpc-netty</artifactId>
21-
<version>1.4.0</version>
22-
</dependency>
23-
<dependency>
24-
<groupId>io.grpc</groupId>
25-
<artifactId>grpc-protobuf</artifactId>
26-
<version>1.4.0</version>
27-
</dependency>
28-
<dependency>
29-
<groupId>io.grpc</groupId>
30-
<artifactId>grpc-stub</artifactId>
31-
<version>1.4.0</version>
32-
</dependency>
33-
<dependency>
34-
<groupId>junit</groupId>
35-
<artifactId>junit</artifactId>
36-
<version>4.12</version>
37-
<scope>test</scope>
38-
</dependency>
39-
</dependencies>
40-
<build>
41-
<extensions>
42-
<extension>
43-
<groupId>kr.motd.maven</groupId>
44-
<artifactId>os-maven-plugin</artifactId>
45-
<version>1.5.0.Final</version>
46-
</extension>
47-
</extensions>
48-
<plugins>
49-
<plugin>
50-
<groupId>org.xolstice.maven.plugins</groupId>
51-
<artifactId>protobuf-maven-plugin</artifactId>
52-
<version>0.5.0</version>
53-
<configuration>
54-
<protocArtifact>
55-
com.google.protobuf:protoc:3.3.0:exe:${os.detected.classifier}
56-
</protocArtifact>
57-
<pluginId>grpc-java</pluginId>
58-
<pluginArtifact>
59-
io.grpc:protoc-gen-grpc-java:1.4.0:exe:${os.detected.classifier}
60-
</pluginArtifact>
61-
</configuration>
62-
<executions>
63-
<execution>
64-
<goals>
65-
<goal>compile</goal>
66-
<goal>compile-custom</goal>
67-
</goals>
68-
</execution>
69-
</executions>
70-
</plugin>
71-
</plugins>
72-
</build>
18+
<dependencies>
19+
<dependency>
20+
<groupId>io.grpc</groupId>
21+
<artifactId>grpc-netty</artifactId>
22+
<version>${io.grpc.version}</version>
23+
</dependency>
24+
<dependency>
25+
<groupId>io.grpc</groupId>
26+
<artifactId>grpc-protobuf</artifactId>
27+
<version>${io.grpc.version}</version>
28+
</dependency>
29+
<dependency>
30+
<groupId>io.grpc</groupId>
31+
<artifactId>grpc-stub</artifactId>
32+
<version>${io.grpc.version}</version>
33+
</dependency>
34+
<dependency>
35+
<groupId>junit</groupId>
36+
<artifactId>junit</artifactId>
37+
<version>4.12</version>
38+
<scope>test</scope>
39+
</dependency>
40+
</dependencies>
41+
<build>
42+
<extensions>
43+
<extension>
44+
<groupId>kr.motd.maven</groupId>
45+
<artifactId>os-maven-plugin</artifactId>
46+
<version>1.5.0.Final</version>
47+
</extension>
48+
</extensions>
49+
<plugins>
50+
<plugin>
51+
<groupId>org.xolstice.maven.plugins</groupId>
52+
<artifactId>protobuf-maven-plugin</artifactId>
53+
<version>0.5.0</version>
54+
<configuration>
55+
<protocArtifact>
56+
com.google.protobuf:protoc:3.3.0:exe:${os.detected.classifier}
57+
</protocArtifact>
58+
<pluginId>grpc-java</pluginId>
59+
<pluginArtifact>
60+
io.grpc:protoc-gen-grpc-java:1.4.0:exe:${os.detected.classifier}
61+
</pluginArtifact>
62+
</configuration>
63+
<executions>
64+
<execution>
65+
<goals>
66+
<goal>compile</goal>
67+
<goal>compile-custom</goal>
68+
</goals>
69+
</execution>
70+
</executions>
71+
</plugin>
72+
</plugins>
73+
</build>
7374
</project>

‎grpc/src/main/java/org/baeldung/grpc/server/GrpcServer.java‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
import io.grpc.Server;
66
import io.grpc.ServerBuilder;
77

8-
public class GrpcServer
9-
{
8+
public class GrpcServer {
109
public static void main(String[] args) throws IOException, InterruptedException {
1110
Server server = ServerBuilder.forPort(8080)
12-
.addService(new HelloServiceImpl()).build();
11+
.addService(new HelloServiceImpl()).build();
1312

1413
System.out.println("Starting server...");
1514
server.start();

0 commit comments

Comments
 (0)