ci(java): run dependency test on Java 8 and 11#633
Conversation
| # Output dep list with compile scope generated using the original pom | ||
| msg "Generating dependency list using original pom..." | ||
| mvn dependency:list -f pom.xml -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | grep -v ':test$' >.org-list.txt | ||
| mvn dependency:list -f pom.xml -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | sed -e s/\\s--\\smodule.*// | grep -v ':test$' >.org-list.txt |
There was a problem hiding this comment.
Can you clarify what this replacement intends to do?
There was a problem hiding this comment.
@olavloite is dependenc:list on the original pom generating "module" for some reason in the output?
There was a problem hiding this comment.
Yes, running mvn dependency:list on a project pom using Java versions that support modules, will append the text -- module <module-name> to each dependency.
There was a problem hiding this comment.
I've added a comment to the file to clarify why the replacement is done.
There was a problem hiding this comment.
this is not happening for the flattend-pom? could you paste the output here for me to see?
There was a problem hiding this comment.
loite@loite-XPS-15-9575:~/wsgoogle/java-spanner/google-cloud-spanner$ mvn --version
Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T20:33:14+02:00)
Maven home: /opt/apache-maven
Java version: 11.0.6, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.15.0-106-generic", arch: "amd64", family: "unix"
loite@loite-XPS-15-9575:~/wsgoogle/java-spanner/google-cloud-spanner$ mvn dependency:list -f pom.xml -Dsort=true
[INFO] Scanning for projects...
[INFO] Inspecting build with total of 1 modules...
[INFO] Installing Nexus Staging features:
[INFO] ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin
[INFO]
[INFO] ---------------< com.google.cloud:google-cloud-spanner >----------------
[INFO] Building Google Cloud Spanner 1.56.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:3.1.2:list (default-cli) @ google-cloud-spanner ---
[INFO]
[INFO] The following files have been resolved:
[INFO] com.fasterxml.jackson.core:jackson-core:jar:2.11.0:compile -- module com.fasterxml.jackson.core
[INFO] com.google.android:annotations:jar:4.1.1.4:compile -- module annotations (auto)
[INFO] com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1:jar:1.56.0:test -- module grpc.google.cloud.spanner.admin.database.v1 (auto)
[INFO] com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1:jar:1.56.0:test -- module grpc.google.cloud.spanner.admin.instance.v1 (auto)
[INFO] com.google.api.grpc:grpc-google-cloud-spanner-v1:jar:1.56.0:test -- module grpc.google.cloud.spanner.v1 (auto)
[INFO] com.google.api.grpc:grpc-google-common-protos:jar:1.18.0:compile -- module grpc.google.common.protos (auto)
[INFO] com.google.api.grpc:proto-google-cloud-spanner-admin-database-v1:jar:1.56.0:compile -- module proto.google.cloud.spanner.admin.database.v1 (auto)
[INFO] com.google.api.grpc:proto-google-cloud-spanner-admin-instance-v1:jar:1.56.0:compile -- module proto.google.cloud.spanner.admin.instance.v1 (auto)
[INFO] com.google.api.grpc:proto-google-cloud-spanner-v1:jar:1.56.0:compile -- module proto.google.cloud.spanner.v1 (auto)
[INFO] com.google.api.grpc:proto-google-common-protos:jar:1.18.0:compile -- module proto.google.common.protos (auto)
[INFO] com.google.api.grpc:proto-google-iam-v1:jar:0.13.0:compile -- module proto.google.iam.v1 (auto)
[INFO] com.google.api:api-common:jar:1.9.0:compile -- module com.google.api.apicommon [auto]
[INFO] com.google.api:gax-grpc:jar:1.56.0:compile -- module gax.grpc (auto)
[INFO] com.google.api:gax-grpc:jar:testlib:1.56.0:test -- module gax.grpc (auto)
[INFO] com.google.api:gax:jar:1.56.0:compile -- module gax (auto)
[INFO] com.google.auth:google-auth-library-credentials:jar:0.20.0:compile -- module com.google.auth [auto]
[INFO] com.google.auth:google-auth-library-oauth2-http:jar:0.20.0:compile -- module com.google.auth.oauth2 [auto]
[INFO] com.google.auto.value:auto-value-annotations:jar:1.7.2:compile -- module auto.value.annotations (auto)
[INFO] com.google.cloud:google-cloud-core-grpc:jar:1.93.4:compile -- module google.cloud.core.grpc (auto)
[INFO] com.google.cloud:google-cloud-core:jar:1.93.4:compile -- module google.cloud.core (auto)
[INFO] com.google.code.findbugs:jsr305:jar:3.0.2:compile -- module jsr305 (auto)
[INFO] com.google.code.gson:gson:jar:2.8.6:compile -- module com.google.gson
[INFO] com.google.errorprone:error_prone_annotations:jar:2.3.4:compile -- module com.google.errorprone.annotations [auto]
[INFO] com.google.guava:failureaccess:jar:1.0.1:compile -- module failureaccess (auto)
[INFO] com.google.guava:guava-testlib:jar:29.0-android:test -- module guava.testlib (auto)
[INFO] com.google.guava:guava:jar:29.0-android:compile -- module com.google.common [auto]
[INFO] com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile -- module listenablefuture (auto)
[INFO] com.google.http-client:google-http-client-jackson2:jar:1.35.0:compile -- module com.google.api.client.json.jackson2 [auto]
[INFO] com.google.http-client:google-http-client:jar:1.35.0:compile -- module com.google.api.client [auto]
[INFO] com.google.j2objc:j2objc-annotations:jar:1.3:compile -- module j2objc.annotations (auto)
[INFO] com.google.protobuf:protobuf-java-util:jar:3.12.0:compile -- module com.google.protobuf.util [auto]
[INFO] com.google.protobuf:protobuf-java:jar:3.12.0:compile -- module com.google.protobuf [auto]
[INFO] com.google.truth:truth:jar:1.0.1:test -- module truth (auto)
[INFO] com.googlecode.java-diff-utils:diffutils:jar:1.3.0:test -- module diffutils (auto)
[INFO] commons-codec:commons-codec:jar:1.11:compile -- module org.apache.commons.codec [auto]
[INFO] commons-logging:commons-logging:jar:1.2:compile -- module commons.logging (auto)
[INFO] io.grpc:grpc-alts:jar:1.29.0:compile -- module grpc.alts (auto)
[INFO] io.grpc:grpc-api:jar:1.29.0:compile -- module grpc.api (auto)
[INFO] io.grpc:grpc-auth:jar:1.29.0:compile -- module grpc.auth (auto)
[INFO] io.grpc:grpc-context:jar:1.29.0:compile -- module grpc.context (auto)
[INFO] io.grpc:grpc-core:jar:1.29.0:compile -- module grpc.core (auto)
[INFO] io.grpc:grpc-grpclb:jar:1.29.0:compile -- module grpc.grpclb (auto)
[INFO] io.grpc:grpc-netty-shaded:jar:1.29.0:compile -- module grpc.netty.shaded (auto)
[INFO] io.grpc:grpc-protobuf-lite:jar:1.29.0:compile -- module grpc.protobuf.lite (auto)
[INFO] io.grpc:grpc-protobuf:jar:1.29.0:compile -- module grpc.protobuf (auto)
[INFO] io.grpc:grpc-stub:jar:1.29.0:compile -- module grpc.stub (auto)
[INFO] io.opencensus:opencensus-api:jar:0.24.0:compile -- module opencensus.api (auto)
[INFO] io.opencensus:opencensus-contrib-grpc-util:jar:0.24.0:compile -- module opencensus.contrib.grpc.util (auto)
[INFO] io.opencensus:opencensus-contrib-http-util:jar:0.24.0:compile -- module opencensus.contrib.http.util (auto)
[INFO] io.perfmark:perfmark-api:jar:0.19.0:compile -- module perfmark.api (auto)
[INFO] javax.annotation:javax.annotation-api:jar:1.3.2:compile -- module java.annotation [auto]
[INFO] junit:junit:jar:4.13:test -- module junit [auto]
[INFO] net.sf.jopt-simple:jopt-simple:jar:4.6:test -- module jopt.simple (auto)
[INFO] org.apache.commons:commons-lang3:jar:3.5:compile -- module commons.lang3 (auto)
[INFO] org.apache.commons:commons-math3:jar:3.2:test -- module commons.math3 (auto)
[INFO] org.apache.httpcomponents:httpclient:jar:4.5.12:compile -- module org.apache.httpcomponents.httpclient [auto]
[INFO] org.apache.httpcomponents:httpcore:jar:4.4.13:compile -- module org.apache.httpcomponents.httpcore [auto]
[INFO] org.checkerframework:checker-compat-qual:jar:2.5.5:compile -- module org.checkerframework.checker.qual [auto]
[INFO] org.codehaus.mojo:animal-sniffer-annotations:jar:1.18:compile -- module animal.sniffer.annotations (auto)
[INFO] org.conscrypt:conscrypt-openjdk-uber:jar:2.2.1:compile -- module org.conscrypt [auto]
[INFO] org.hamcrest:hamcrest-core:jar:1.3:test -- module hamcrest.core (auto)
[INFO] org.hamcrest:hamcrest:jar:2.2:test -- module org.hamcrest [auto]
[INFO] org.json:json:jar:20200518:test -- module org.json [auto]
[INFO] org.mockito:mockito-all:jar:1.10.19:test -- module mockito.all (auto)
[INFO] org.openjdk.jmh:jmh-core:jar:1.23:test -- module jmh.core (auto)
[INFO] org.openjdk.jmh:jmh-generator-annprocess:jar:1.23:test -- module jmh.generator.annprocess (auto)
[INFO] org.threeten:threetenbp:jar:1.4.4:compile -- module org.threeten.bp [auto]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.327 s
[INFO] Finished at: 2020-06-19T19:51:33+02:00
[INFO] ------------------------------------------------------------------------
loite@loite-XPS-15-9575:~/wsgoogle/java-spanner/google-cloud-spanner$ mvn dependency:list -f .flattened-pom.xml -Dsort=true
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------< com.google.cloud:google-cloud-spanner >----------------
[INFO] Building Google Cloud Spanner 1.56.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:list (default-cli) @ google-cloud-spanner ---
[INFO]
[INFO] The following files have been resolved:
[INFO] com.fasterxml.jackson.core:jackson-core:jar:2.11.0:compile
[INFO] com.google.android:annotations:jar:4.1.1.4:compile
[INFO] com.google.api.grpc:grpc-google-common-protos:jar:1.18.0:compile
[INFO] com.google.api.grpc:proto-google-cloud-spanner-admin-database-v1:jar:1.56.0:compile
[INFO] com.google.api.grpc:proto-google-cloud-spanner-admin-instance-v1:jar:1.56.0:compile
[INFO] com.google.api.grpc:proto-google-cloud-spanner-v1:jar:1.56.0:compile
[INFO] com.google.api.grpc:proto-google-common-protos:jar:1.18.0:compile
[INFO] com.google.api.grpc:proto-google-iam-v1:jar:0.13.0:compile
[INFO] com.google.api:api-common:jar:1.9.0:compile
[INFO] com.google.api:gax-grpc:jar:1.56.0:compile
[INFO] com.google.api:gax:jar:1.56.0:compile
[INFO] com.google.auth:google-auth-library-credentials:jar:0.20.0:compile
[INFO] com.google.auth:google-auth-library-oauth2-http:jar:0.20.0:compile
[INFO] com.google.auto.value:auto-value-annotations:jar:1.7.2:compile
[INFO] com.google.cloud:google-cloud-core-grpc:jar:1.93.4:compile
[INFO] com.google.cloud:google-cloud-core:jar:1.93.4:compile
[INFO] com.google.code.findbugs:jsr305:jar:3.0.2:compile
[INFO] com.google.code.gson:gson:jar:2.8.6:compile
[INFO] com.google.errorprone:error_prone_annotations:jar:2.3.4:compile
[INFO] com.google.guava:failureaccess:jar:1.0.1:compile
[INFO] com.google.guava:guava:jar:29.0-android:compile
[INFO] com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
[INFO] com.google.http-client:google-http-client-jackson2:jar:1.35.0:compile
[INFO] com.google.http-client:google-http-client:jar:1.35.0:compile
[INFO] com.google.j2objc:j2objc-annotations:jar:1.3:compile
[INFO] com.google.protobuf:protobuf-java-util:jar:3.12.0:compile
[INFO] com.google.protobuf:protobuf-java:jar:3.12.0:compile
[INFO] commons-codec:commons-codec:jar:1.11:compile
[INFO] commons-logging:commons-logging:jar:1.2:compile
[INFO] io.grpc:grpc-alts:jar:1.29.0:compile
[INFO] io.grpc:grpc-api:jar:1.29.0:compile
[INFO] io.grpc:grpc-auth:jar:1.29.0:compile
[INFO] io.grpc:grpc-context:jar:1.29.0:compile
[INFO] io.grpc:grpc-core:jar:1.29.0:compile
[INFO] io.grpc:grpc-grpclb:jar:1.29.0:compile
[INFO] io.grpc:grpc-netty-shaded:jar:1.29.0:compile
[INFO] io.grpc:grpc-protobuf-lite:jar:1.29.0:compile
[INFO] io.grpc:grpc-protobuf:jar:1.29.0:compile
[INFO] io.grpc:grpc-stub:jar:1.29.0:compile
[INFO] io.opencensus:opencensus-api:jar:0.24.0:compile
[INFO] io.opencensus:opencensus-contrib-grpc-util:jar:0.24.0:compile
[INFO] io.opencensus:opencensus-contrib-http-util:jar:0.24.0:compile
[INFO] io.perfmark:perfmark-api:jar:0.19.0:compile
[INFO] javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] org.apache.commons:commons-lang3:jar:3.5:compile
[INFO] org.apache.httpcomponents:httpclient:jar:4.5.12:compile
[INFO] org.apache.httpcomponents:httpcore:jar:4.4.13:compile
[INFO] org.checkerframework:checker-compat-qual:jar:2.5.5:compile
[INFO] org.codehaus.mojo:animal-sniffer-annotations:jar:1.18:compile
[INFO] org.conscrypt:conscrypt-openjdk-uber:jar:2.2.1:compile
[INFO] org.threeten:threetenbp:jar:1.4.4:compile
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.958 s
[INFO] Finished at: 2020-06-19T19:51:47+02:00
[INFO] ------------------------------------------------------------------------
There was a problem hiding this comment.
Interesting -- something I didn't know about Java 11... LGTM
…eapis#633)" (googleapis#636)" This reverts commit 3e6fed7.
Redo fix in #633 with proper jinja templating format
Executes the dependency tests on both Java 8 and Java 11 to prevent potential failures to go undetected when dependencies are only added for certain Java versions. See also googleapis/java-spanner#281.