|
42 | 42 | <groupId>jakarta.inject</groupId> |
43 | 43 | <artifactId>jakarta.inject-api</artifactId> |
44 | 44 | </dependency> |
| 45 | + <dependency> |
| 46 | + <groupId>com.google.api.grpc</groupId> |
| 47 | + <artifactId>proto-google-common-protos</artifactId> |
| 48 | + </dependency> |
| 49 | + |
| 50 | + <!-- Annotation dependency for generated code --> |
| 51 | + <dependency> |
| 52 | + <groupId>javax.annotation</groupId> |
| 53 | + <artifactId>javax.annotation-api</artifactId> |
| 54 | + <scope>provided</scope> |
| 55 | + </dependency> |
45 | 56 | </dependencies> |
46 | | - |
| 57 | + |
| 58 | + <build> |
| 59 | + <extensions> |
| 60 | + <!-- |
| 61 | + Seems to be needed by the protobuf-maven-plugin. |
| 62 | + Adding these extensions to the profile is not possible |
| 63 | + --> |
| 64 | + <extension> |
| 65 | + <groupId>kr.motd.maven</groupId> |
| 66 | + <artifactId>os-maven-plugin</artifactId> |
| 67 | + <version>${os-maven-plugin.version}</version> |
| 68 | + </extension> |
| 69 | + </extensions> |
| 70 | + </build> |
| 71 | + |
| 72 | + <profiles> |
| 73 | + <profile> |
| 74 | + <id>proto-compile</id> |
| 75 | + <build> |
| 76 | + |
| 77 | + <plugins> |
| 78 | + <plugin> |
| 79 | + <groupId>org.apache.maven.plugins</groupId> |
| 80 | + <artifactId>maven-clean-plugin</artifactId> |
| 81 | + <version>${maven-clean-plugin.version}</version> |
| 82 | + <executions> |
| 83 | + <execution> |
| 84 | + <id>remove-generated-files</id> |
| 85 | + <phase>initialize</phase> |
| 86 | + <goals> |
| 87 | + <goal>clean</goal> |
| 88 | + </goals> |
| 89 | + <configuration> |
| 90 | + <excludeDefaultDirectories>true</excludeDefaultDirectories> |
| 91 | + <filesets> |
| 92 | + <fileset> |
| 93 | + <directory>${project.basedir}/src/main/java/io/a2a/grpc</directory> |
| 94 | + <followSymlinks>false</followSymlinks> |
| 95 | + <includes> |
| 96 | + <include>*.java</include> |
| 97 | + </includes> |
| 98 | + </fileset> |
| 99 | + </filesets> |
| 100 | + </configuration> |
| 101 | + </execution> |
| 102 | + </executions> |
| 103 | + </plugin> |
| 104 | + <!-- Protocol Buffers Compiler Plugin --> |
| 105 | + <plugin> |
| 106 | + <groupId>org.xolstice.maven.plugins</groupId> |
| 107 | + <artifactId>protobuf-maven-plugin</artifactId> |
| 108 | + <version>${protobuf-maven-plugin.version}</version> |
| 109 | + <configuration> |
| 110 | + <protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact> |
| 111 | + <pluginId>grpc-java</pluginId> |
| 112 | + <pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact> |
| 113 | + <outputDirectory>src/main/java</outputDirectory> |
| 114 | + <clearOutputDirectory>false</clearOutputDirectory> |
| 115 | + </configuration> |
| 116 | + <executions> |
| 117 | + <execution> |
| 118 | + <goals> |
| 119 | + <goal>compile</goal> |
| 120 | + <goal>compile-custom</goal> |
| 121 | + </goals> |
| 122 | + </execution> |
| 123 | + </executions> |
| 124 | + </plugin> |
| 125 | + </plugins> |
| 126 | + </build> |
| 127 | + |
| 128 | + </profile> |
| 129 | + </profiles> |
47 | 130 | </project> |
0 commit comments