1<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/maven-v4_0_0.xsd"> 3 <modelVersion>4.0.0</modelVersion> 4 <groupId>io.grpc</groupId> 5 <artifactId>example-debug</artifactId> 6 <packaging>jar</packaging> 7 <!-- Feel free to delete the comment at the end of these lines. It is just 8 for safely updating the version in our release process. --> 9 <version>1.56.1-SNAPSHOT</version><!-- CURRENT_GRPC_VERSION --> 10 <name>example-debug</name> 11 <url>https://github.com/grpc/grpc-java</url> 12 13 <properties> 14 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 15 <grpc.version>1.56.1-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION --> 16 <protoc.version>3.22.3</protoc.version> 17 <!-- required for jdk9 --> 18 <maven.compiler.source>1.8</maven.compiler.source> 19 <maven.compiler.target>1.8</maven.compiler.target> 20 </properties> 21 22 <dependencyManagement> 23 <dependencies> 24 <dependency> 25 <groupId>io.grpc</groupId> 26 <artifactId>grpc-bom</artifactId> 27 <version>${grpc.version}</version> 28 <type>pom</type> 29 <scope>import</scope> 30 </dependency> 31 </dependencies> 32 </dependencyManagement> 33 34 <dependencies> 35 <dependency> 36 <groupId>io.grpc</groupId> 37 <artifactId>grpc-protobuf</artifactId> 38 </dependency> 39 <dependency> 40 <groupId>io.grpc</groupId> 41 <artifactId>grpc-stub</artifactId> 42 </dependency> 43 <dependency> 44 <groupId>io.grpc</groupId> 45 <artifactId>grpc-services</artifactId> 46 </dependency> 47 <dependency> 48 <groupId>org.apache.tomcat</groupId> 49 <artifactId>annotations-api</artifactId> 50 <version>6.0.53</version> 51 <scope>provided</scope> <!-- not needed at runtime --> 52 </dependency> 53 <dependency> 54 <groupId>io.grpc</groupId> 55 <artifactId>grpc-netty-shaded</artifactId> 56 <scope>runtime</scope> 57 </dependency> 58 <dependency> <!-- prevent downgrade of version in protobuf-java-util from grpc-services --> 59 <groupId>com.google.guava</groupId> 60 <artifactId>guava</artifactId> 61 <version>31.1-jre</version> 62 </dependency> 63 <dependency> 64 <groupId>junit</groupId> 65 <artifactId>junit</artifactId> 66 <version>4.13.2</version> 67 <scope>test</scope> 68 </dependency> 69 <dependency> 70 <groupId>io.grpc</groupId> 71 <artifactId>grpc-testing</artifactId> 72 <scope>test</scope> 73 </dependency> 74 </dependencies> 75 76 <build> 77 <extensions> 78 <extension> 79 <groupId>kr.motd.maven</groupId> 80 <artifactId>os-maven-plugin</artifactId> 81 <version>1.7.1</version> 82 </extension> 83 </extensions> 84 <plugins> 85 <plugin> 86 <groupId>org.xolstice.maven.plugins</groupId> 87 <artifactId>protobuf-maven-plugin</artifactId> 88 <version>0.6.1</version> 89 <configuration> 90 <protocArtifact>com.google.protobuf:protoc:${protoc.version}:exe:${os.detected.classifier}</protocArtifact> 91 <pluginId>grpc-java</pluginId> 92 <pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact> 93 </configuration> 94 <executions> 95 <execution> 96 <goals> 97 <goal>compile</goal> 98 <goal>compile-custom</goal> 99 </goals> 100 </execution> 101 </executions> 102 </plugin> 103 <plugin> 104 <groupId>org.apache.maven.plugins</groupId> 105 <artifactId>maven-enforcer-plugin</artifactId> 106 <version>1.4.1</version> 107 <executions> 108 <execution> 109 <id>enforce</id> 110 <goals> 111 <goal>enforce</goal> 112 </goals> 113 <configuration> 114 <rules> 115 <requireUpperBoundDeps/> 116 </rules> 117 </configuration> 118 </execution> 119 </executions> 120 </plugin> 121 </plugins> 122 </build> 123</project> 124