Skip to content

Commit 94caf6d

Browse files
authored
build: make executor deps test scoped (#3161)
* build: make executor deps test scoped The executor dependencies are not needed for the normal build, but are only used for tests, and should therefore be test scoped. * build: only add executor deps in profile
1 parent 278f3fa commit 94caf6d

File tree

1 file changed

+25
-9
lines changed

1 file changed

+25
-9
lines changed

google-cloud-spanner/pom.xml

+25-9
Original file line numberDiff line numberDiff line change
@@ -207,19 +207,10 @@
207207
<groupId>com.google.api.grpc</groupId>
208208
<artifactId>proto-google-common-protos</artifactId>
209209
</dependency>
210-
<dependency>
211-
<groupId>com.google.api.grpc</groupId>
212-
<artifactId>proto-google-cloud-spanner-executor-v1</artifactId>
213-
</dependency>
214210
<dependency>
215211
<groupId>com.google.api.grpc</groupId>
216212
<artifactId>grpc-google-common-protos</artifactId>
217213
</dependency>
218-
<dependency>
219-
<groupId>com.google.api.grpc</groupId>
220-
<artifactId>grpc-google-cloud-spanner-executor-v1</artifactId>
221-
<scope>test</scope>
222-
</dependency>
223214
<dependency>
224215
<groupId>com.google.api.grpc</groupId>
225216
<artifactId>proto-google-iam-v1</artifactId>
@@ -372,6 +363,18 @@
372363
<artifactId>junit</artifactId>
373364
<scope>test</scope>
374365
</dependency>
366+
367+
<!-- Executor tests - The 'provided' scope is overwritten to compile time scope for the profile 'executor-tests' -->
368+
<dependency>
369+
<groupId>com.google.api.grpc</groupId>
370+
<artifactId>proto-google-cloud-spanner-executor-v1</artifactId>
371+
<scope>provided</scope>
372+
</dependency>
373+
<dependency>
374+
<groupId>com.google.api.grpc</groupId>
375+
<artifactId>grpc-google-cloud-spanner-executor-v1</artifactId>
376+
<scope>provided</scope>
377+
</dependency>
375378

376379
<!-- Need testing utility classes for generated gRPC clients tests -->
377380
<dependency>
@@ -593,5 +596,18 @@
593596
</plugins>
594597
</build>
595598
</profile>
599+
<profile>
600+
<id>executor-tests</id>
601+
<dependencies>
602+
<dependency>
603+
<groupId>com.google.api.grpc</groupId>
604+
<artifactId>proto-google-cloud-spanner-executor-v1</artifactId>
605+
</dependency>
606+
<dependency>
607+
<groupId>com.google.api.grpc</groupId>
608+
<artifactId>grpc-google-cloud-spanner-executor-v1</artifactId>
609+
</dependency>
610+
</dependencies>
611+
</profile>
596612
</profiles>
597613
</project>

0 commit comments

Comments
 (0)