BAEL-1022 - minor fixes

This commit is contained in:
slavisa-baeldung 2017-08-01 22:31:21 +01:00
parent b25f17f37f
commit 6fcbc9b065
2 changed files with 70 additions and 70 deletions

View File

@ -1,73 +1,74 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>grpc</groupId> <groupId>grpc</groupId>
<artifactId>grpc-demo</artifactId> <artifactId>grpc-demo</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>grpc-demo</name> <name>grpc-demo</name>
<url>http://maven.apache.org</url> <url>http://maven.apache.org</url>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties> <io.grpc.version>1.5.0</io.grpc.version>
</properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>io.grpc</groupId> <groupId>io.grpc</groupId>
<artifactId>grpc-netty</artifactId> <artifactId>grpc-netty</artifactId>
<version>1.4.0</version> <version>${io.grpc.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.grpc</groupId> <groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId> <artifactId>grpc-protobuf</artifactId>
<version>1.4.0</version> <version>${io.grpc.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.grpc</groupId> <groupId>io.grpc</groupId>
<artifactId>grpc-stub</artifactId> <artifactId>grpc-stub</artifactId>
<version>1.4.0</version> <version>${io.grpc.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>4.12</version> <version>4.12</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<extensions> <extensions>
<extension> <extension>
<groupId>kr.motd.maven</groupId> <groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId> <artifactId>os-maven-plugin</artifactId>
<version>1.5.0.Final</version> <version>1.5.0.Final</version>
</extension> </extension>
</extensions> </extensions>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.xolstice.maven.plugins</groupId> <groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId> <artifactId>protobuf-maven-plugin</artifactId>
<version>0.5.0</version> <version>0.5.0</version>
<configuration> <configuration>
<protocArtifact> <protocArtifact>
com.google.protobuf:protoc:3.3.0:exe:${os.detected.classifier} com.google.protobuf:protoc:3.3.0:exe:${os.detected.classifier}
</protocArtifact> </protocArtifact>
<pluginId>grpc-java</pluginId> <pluginId>grpc-java</pluginId>
<pluginArtifact> <pluginArtifact>
io.grpc:protoc-gen-grpc-java:1.4.0:exe:${os.detected.classifier} io.grpc:protoc-gen-grpc-java:1.4.0:exe:${os.detected.classifier}
</pluginArtifact> </pluginArtifact>
</configuration> </configuration>
<executions> <executions>
<execution> <execution>
<goals> <goals>
<goal>compile</goal> <goal>compile</goal>
<goal>compile-custom</goal> <goal>compile-custom</goal>
</goals> </goals>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
</project> </project>

View File

@ -5,11 +5,10 @@ import java.io.IOException;
import io.grpc.Server; import io.grpc.Server;
import io.grpc.ServerBuilder; import io.grpc.ServerBuilder;
public class GrpcServer public class GrpcServer {
{
public static void main(String[] args) throws IOException, InterruptedException { public static void main(String[] args) throws IOException, InterruptedException {
Server server = ServerBuilder.forPort(8080) Server server = ServerBuilder.forPort(8080)
.addService(new HelloServiceImpl()).build(); .addService(new HelloServiceImpl()).build();
System.out.println("Starting server..."); System.out.println("Starting server...");
server.start(); server.start();