Skip to content

Commit ef1f4f2

Browse files
BenWhiteheadchingor13
authored andcommitted
Update maven config to include *.proto files in jars (#5208)
Add build-helper-maven-plugin to `com.google.api.grpc:google-api-grpc` thereby updating the config for all `proto-*` modules such that when their jars are built they will now include the `*.proto`. This allows dependents to already have the proto files on their classpath when they are defining/generating their own protos. Add build-helper-maven-plugin config to `com.google.cloud:google-cloud-firestore` for its test resources as proto is defined for the conformance tests.
1 parent fff25ba commit ef1f4f2

2 files changed

Lines changed: 60 additions & 0 deletions

File tree

  • google-api-grpc
  • google-cloud-clients/google-cloud-firestore

google-api-grpc/pom.xml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -993,6 +993,41 @@
993993
</execution>
994994
</executions>
995995
</plugin>
996+
<plugin>
997+
<groupId>org.codehaus.mojo</groupId>
998+
<artifactId>build-helper-maven-plugin</artifactId>
999+
<version>3.0.0</version>
1000+
<executions>
1001+
<execution>
1002+
<id>add-resource</id>
1003+
<phase>generate-resources</phase>
1004+
<goals>
1005+
<goal>add-resource</goal>
1006+
</goals>
1007+
<configuration>
1008+
<resources>
1009+
<resource>
1010+
<directory>src/main/proto</directory>
1011+
</resource>
1012+
</resources>
1013+
</configuration>
1014+
</execution>
1015+
<execution>
1016+
<id>add-test-resource</id>
1017+
<phase>generate-test-resources</phase>
1018+
<goals>
1019+
<goal>add-test-resource</goal>
1020+
</goals>
1021+
<configuration>
1022+
<resources>
1023+
<resource>
1024+
<directory>src/test/proto</directory>
1025+
</resource>
1026+
</resources>
1027+
</configuration>
1028+
</execution>
1029+
</executions>
1030+
</plugin>
9961031
</plugins>
9971032
</build>
9981033

google-cloud-clients/google-cloud-firestore/pom.xml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,31 @@
109109
<scope>test</scope>
110110
</dependency>
111111
</dependencies>
112+
<build>
113+
<plugins>
114+
<plugin>
115+
<groupId>org.codehaus.mojo</groupId>
116+
<artifactId>build-helper-maven-plugin</artifactId>
117+
<version>3.0.0</version>
118+
<executions>
119+
<execution>
120+
<id>add-test-resource</id>
121+
<phase>generate-test-resources</phase>
122+
<goals>
123+
<goal>add-test-resource</goal>
124+
</goals>
125+
<configuration>
126+
<resources>
127+
<resource>
128+
<directory>src/test/proto</directory>
129+
</resource>
130+
</resources>
131+
</configuration>
132+
</execution>
133+
</executions>
134+
</plugin>
135+
</plugins>
136+
</build>
112137

113138
<reporting>
114139
<plugins>

0 commit comments

Comments
 (0)