chore: generate poms with grpc dependencies as test scoped
Fixes https://github.com/googleapis/google-cloud-java/issues/10037 ☕
Overview
This will modify the behavior of library generation at the postprocessing stage. The main change is that generated cloud poms (i.e. google-cloud-${service}/pom.xml) will now have the dependencies proto-google-common-protos and grpc-google-iam-v1 declared as <scope>test</scope>, except for three cases described below.
Integration test
It will be failing until we update the test branch. Once this approach is validated, I will proceed with updating the branch.
Approach
For new libraries
Via template in owlbot/teplates/poms/cloud_pom.xml.j2. New libraries will have these two dependencies declared as test scope if they are not one of java-spanner, java-bigtable or java-dataproc
For existing libraries
The script fix_poms.py will now modify the existing poms by setting the two dependencies as test-scoped, only if they are not one of java-spanner, java-bigtable or java-dataproc
Confirmation that it works
- java-bigquerystorage: no effects since these dependencies are not found in the pom
- java-datastore: no relevant changes since the dependencies are not found in the pom
- java-firestore: no relevant changes since the one targeted dependency is already declared as test scoped
- java-logging: no relevant changes] since the dependencies are not declared in the pom
- java-pubsub: no changes. Relevant dependency already declared as test scoped
- java-pubsublite: no relevant changes since there are no relevant dependencies declared in the pom
- java-spanner: ignored - dependency kept as is
- java-storage: ignored - kept as is
-
google-cloud-java: 91 poms affected by converting dependencies to test-scoped (PR only contains pom changes for simplicity + outdated googleapis_committish)
- Why
java-dataprocis also ignored? A previous run ofmvn compileaccross the monorepo with its dependency being modified caused missing package errors, hence us adding it to the ignore list.
- Why
Quality Gate passed for 'gapic-generator-java-root'
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Quality Gate passed for 'java_showcase_integration_tests'
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code