cloud-opensource-java
cloud-opensource-java copied to clipboard
Support Java 17+ for Linkage Checker
Running Linkage Checker with Java 17+ results in compilation issue:
[INFO] Reactor Summary:
[INFO]
[INFO] Google Cloud Platform Supported Libraries 25.3.1-SNAPSHOT SUCCESS [ 0.049 s]
[INFO] Google Cloud Long Term Support BOM 8.0.0-SNAPSHOT .. SUCCESS [ 0.049 s]
[INFO] BOM Parent 1.0-SNAPSHOT ............................ SUCCESS [ 0.049 s]
[INFO] Cloud Platform Supported Libraries Upper Bounds Check 2.0.0-SNAPSHOT SUCCESS [ 0.353 s]
[INFO] Cloud Tools Open Source Code Hygiene Tooling 1.5.14-SNAPSHOT SUCCESS [ 0.206 s]
[INFO] Maven Dependency Graph Analyzer 1.5.14-SNAPSHOT .... FAILURE [ 0.952 s]
[INFO] integration-tests 1.2.0-SNAPSHOT ................... SKIPPED
[INFO] Cloud Tools Open Source Code Hygiene Dashboard 1.5.14-SNAPSHOT SKIPPED
[INFO] Linkage Checker Enforcer Rule 1.5.14-SNAPSHOT ...... SKIPPED
[INFO] Linkage Monitor 1.5.14-SNAPSHOT .................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.359 s (Wall Clock)
[INFO] Finished at: 2025-02-24T17:03:52-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project dependencies: Compilation failure -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :dependencies
Did you find more detailed error messages before "[INFO] Reactor Summary:"?
@suztomo there is no detailed error message in the maven output when building the entire repository with Java 17. Building Maven Dependency Graph Analyzer just fails with no clear reason. (I wonder if maybe this is related to the version of javac required in some parts of the projects???)
Here's the complete maven output for building only the dependencies directory.
$ mvn clean install
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------< com.google.cloud.tools:dependencies >-----------------
[INFO] Building Maven Dependency Graph Analyzer 1.5.16-SNAPSHOT
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- clean:3.2.0:clean (default-clean) @ dependencies ---
[INFO] Deleting /Users/slessard/source/external/github/GoogleCloudPlatform/cloud-opensource-java/dependencies/target
[INFO]
[INFO] --- license:4.1:check (default) @ dependencies ---
[WARNING] Parameter 'legacyConfigHeader' (user property 'license.header') is deprecated: use {@link LicenseSet#header}
[WARNING] Parameter 'legacyConfigIncludes' (user property 'license.includes') is deprecated: use {@link LicenseSet#includes}
[INFO] Checking licenses...
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ dependencies ---
[INFO] Copying 2 resources from src/main/resources to target/classes
[INFO]
[INFO] --- compiler:3.8.1:compile (default-compile) @ dependencies ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 77 source files to /Users/slessard/source/external/github/GoogleCloudPlatform/cloud-opensource-java/dependencies/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.612 s
[INFO] Finished at: 2025-08-27T09:53:12-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project dependencies: Compilation failure -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException