| <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/maven-v4_0_0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>io.grpc</groupId> | |
| <artifactId>examples</artifactId> | |
| <packaging>jar</packaging> | |
| <!-- Feel free to delete the comment at the end of these lines. It is just | |
| for safely updating the version in our release process. --> | |
| <version>1.85.2-SNAPSHOT</version><!-- CURRENT_GRPC_VERSION --> | |
| <name>examples</name> | |
| <url>https://github.com/grpc/grpc-java</url> | |
| <properties> | |
| <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
| <grpc.version>1.85.2-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION --> | |
| <protobuf.version>3.25.9</protobuf.version> | |
| <protoc.version>3.25.9</protoc.version> | |
| <!-- required for JDK 8 --> | |
| <maven.compiler.source>1.8</maven.compiler.source> | |
| <maven.compiler.target>1.8</maven.compiler.target> | |
| </properties> | |
| <dependencyManagement> | |
| <dependencies> | |
| <dependency> | |
| <groupId>io.grpc</groupId> | |
| <artifactId>grpc-bom</artifactId> | |
| <version>${grpc.version}</version> | |
| <type>pom</type> | |
| <scope>import</scope> | |
| </dependency> | |
| </dependencies> | |
| </dependencyManagement> | |
| <dependencies> | |
| <dependency> | |
| <groupId>io.grpc</groupId> | |
| <artifactId>grpc-services</artifactId> | |
| </dependency> | |
| <dependency> | |
| <groupId>io.grpc</groupId> | |
| <artifactId>grpc-netty-shaded</artifactId> | |
| <scope>runtime</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>io.grpc</groupId> | |
| <artifactId>grpc-protobuf</artifactId> | |
| </dependency> | |
| <dependency> | |
| <groupId>io.grpc</groupId> | |
| <artifactId>grpc-stub</artifactId> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.google.protobuf</groupId> | |
| <artifactId>protobuf-java-util</artifactId> | |
| <version>${protobuf.version}</version> | |
| </dependency> | |
| <dependency> <!-- Use newer version than in protobuf-java-util --> | |
| <groupId>com.google.j2objc</groupId> | |
| <artifactId>j2objc-annotations</artifactId> | |
| <version>3.1</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>io.grpc</groupId> | |
| <artifactId>grpc-testing</artifactId> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>junit</groupId> | |
| <artifactId>junit</artifactId> | |
| <version>4.13.2</version> | |
| <scope>test</scope> | |
| </dependency> | |
| <dependency> | |
| <groupId>org.mockito</groupId> | |
| <artifactId>mockito-core</artifactId> | |
| <version>4.4.0</version> | |
| <scope>test</scope> | |
| </dependency> | |
| </dependencies> | |
| <build> | |
| <extensions> | |
| <extension> | |
| <groupId>kr.motd.maven</groupId> | |
| <artifactId>os-maven-plugin</artifactId> | |
| <version>1.7.1</version> | |
| </extension> | |
| </extensions> | |
| <plugins> | |
| <plugin> | |
| <groupId>org.xolstice.maven.plugins</groupId> | |
| <artifactId>protobuf-maven-plugin</artifactId> | |
| <version>0.6.1</version> | |
| <configuration> | |
| <protocArtifact>com.google.protobuf:protoc:${protoc.version}:exe:${os.detected.classifier}</protocArtifact> | |
| <pluginId>grpc-java</pluginId> | |
| <pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact> | |
| </configuration> | |
| <executions> | |
| <execution> | |
| <goals> | |
| <goal>compile</goal> | |
| <goal>compile-custom</goal> | |
| </goals> | |
| </execution> | |
| </executions> | |
| </plugin> | |
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-enforcer-plugin</artifactId> | |
| <version>3.5.0</version> | |
| <executions> | |
| <execution> | |
| <id>enforce</id> | |
| <goals> | |
| <goal>enforce</goal> | |
| </goals> | |
| <configuration> | |
| <rules> | |
| <requireUpperBoundDeps/> | |
| </rules> | |
| </configuration> | |
| </execution> | |
| </executions> | |
| </plugin> | |
| <!-- gRPC uses java.util.ServiceLoader, which reads class names from | |
| META-INF/services in jars. If you package your application as a "fat" | |
| jar that includes dependencies, you need to make sure the packaging tool | |
| concatenates duplicate files in META-INF/services. --> | |
| <!-- If using maven-shade-plugin, use ServicesResourceTransformer, as | |
| documented by maven-shade-plugin. | |
| https://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html#ServicesResourceTransformer --> | |
| <!-- If using maven-assembly-plugin, you need to add the metaInf-services | |
| handler to the descriptor, which requires making a copy of | |
| jar-with-dependencies. --> | |
| <plugin> | |
| <artifactId>maven-assembly-plugin</artifactId> | |
| <version>3.7.1</version> | |
| <configuration> | |
| <descriptors>${project.basedir}/maven-assembly-jar-with-dependencies.xml</descriptors> | |
| </configuration> | |
| <executions> | |
| <execution> | |
| <id>make-assembly</id> | |
| <phase>package</phase> | |
| <goals> | |
| <goal>single</goal> | |
| </goals> | |
| </execution> | |
| </executions> | |
| </plugin> | |
| </plugins> | |
| </build> | |
| </project> |