blob: 6a019ee063047dd6d3084434417911472d1ec801 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
license agreements; and to You under the Apache License, version 2.0:
https://www.apache.org/licenses/LICENSE-2.0
This file is part of the Apache Pekko project, which was derived from Akka.
-->
<!--
To test locally, first 'sbt maven-plugin:publishM2' in the parent dir
and define the published version as pekko.grpc.project.version in the properties block below
or pass it to mvn when running like so: mvn -Dpekko.grpc.project.version=some-version compile exec:exec
-->
<project>
<modelVersion>4.0.0</modelVersion>
<name>Pekko gRPC Java example project</name>
<groupId>org.apache.pekko</groupId>
<artifactId>grpc-plugin-tester-java</artifactId>
<version>0.1-SNAPSHOT</version>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<maven-dependency-plugin.version>3.8.1</maven-dependency-plugin.version>
<maven-exec-plugin.version>3.5.1</maven-exec-plugin.version>
<pekko.http.version>1.3.0</pekko.http.version>
<grpc.version>1.79.0</grpc.version> <!-- checked synced by VersionSyncCheckPlugin -->
<project.encoding>UTF-8</project.encoding>
</properties>
<repositories>
<repository>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
</repository>
<repository>
<id>apache.snapshots</id>
<name>Apache Development Snapshot Repository</name>
<url>https://repository.apache.org/content/repositories/snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.apache.pekko</groupId>
<artifactId>pekko-grpc-runtime_2.13</artifactId>
<version>${pekko.grpc.project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.pekko</groupId>
<artifactId>pekko-http-cors_2.13</artifactId>
<version>${pekko.http.version}</version>
</dependency>
<!-- Needed for the generated client -->
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-stub</artifactId>
<version>${grpc.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.pekko</groupId>
<artifactId>pekko-grpc-maven-plugin</artifactId>
<version>${pekko.grpc.project.version}</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<generatorSettings>
<serverPowerApis>true</serverPowerApis>
</generatorSettings>
<includeStdTypes>true</includeStdTypes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>${maven-dependency-plugin.version}</version>
<executions>
<execution>
<id>getClasspathFilenames</id>
<goals>
<!-- provides the jars of the classpath as properties inside of maven
so that we can refer to one of the jars in the exec plugin config below -->
<goal>properties</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${maven-exec-plugin.version}</version>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<classpath />
<argument>example.myapp.helloworld.GreeterServer</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
</project>