googleapis / googleapis/google-cloud-java

[google-auth-library-java] mvn format v2.25 may be incompatible with Java 25

Open
#12,576 2 comments 0 reactions 0 assignees View on GitHub
priority: p3 type: bug
Dominant language
Java
Stars
2.1k
Forks
1.2k
Avg merge
1d 23h
Merged PRs (30d)
157

Description

Need to investigate this. Error:
```
[ERROR] Failed to execute goal com.spotify.fmt:fmt-maven-plugin:2.25:format (default-cli) on project google-auth-library-credentials: Execution default-cli of goal com.spotify.fmt:fmt-maven-plugin:2.25:format failed: An API incompatibility was encountered while executing com.spotify.fmt:fmt-maven-plugin:2.25:format: java.lang.NoSuchMethodError: null
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>com.spotify.fmt:fmt-maven-plugin:2.25
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/Users/lawrenceqiu/.m2/repository/com/spotify/fmt/fmt-maven-plugin/2.25/fmt-maven-plugin-2.25.jar
[ERROR] urls[1] = file:/Users/lawrenceqiu/.m2/repository/com/google/googlejavaformat/google-java-format/1.25.2/google-java-format-1.25.2.jar
[ERROR] urls[2] = file:/Users/lawrenceqiu/.m2/repository/com/google/guava/guava/32.1.3-jre/guava-32.1.3-jre.jar
[ERROR] urls[3] = file:/Users/lawrenceqiu/.m2/repository/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar
[ERROR] urls[4] = file:/Users/lawrenceqiu/.m2/repository/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar
[ERROR] urls[5] = file:/Users/lawrenceqiu/.m2/repository/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar
[ERROR] urls[6] = file:/Users/lawrenceqiu/.m2/repository/org/checkerframework/checker-qual/3.37.0/checker-qual-3.37.0.jar
[ERROR] urls[7] = file:/Users/lawrenceqiu/.m2/repository/com/google/errorprone/error_prone_annotations/2.21.1/error_prone_annotations-2.21.1.jar
[ERROR] urls[8] = file:/Users/lawrenceqiu/.m2/repository/com/google/j2objc/j2objc-annotations/2.8/j2objc-annotations-2.8.jar
[ERROR] urls[9] = file:/Users/lawrenceqiu/.m2/repository/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar
[ERROR] urls[10] = file:/Users/lawrenceqiu/.m2/repository/org/eclipse/sisu/org.eclipse.sisu.inject/0.9.0.M2/org.eclipse.sisu.inject-0.9.0.M2.jar
[ERROR] urls[11] = file:/Users/lawrenceqiu/.m2/repository/org/codehaus/plexus/plexus-component-annotations/2.1.0/plexus-component-annotations-2.1.0.jar
[ERROR] urls[12] = file:/Users/lawrenceqiu/.m2/repository/org/codehaus/plexus/plexus-utils/3.5.1/plexus-utils-3.5.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[project>com.google.auth:google-auth-library-parent:1.39.2-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] : 'java.util.Queue com.sun.tools.javac.util.Log$DeferredDiagnosticHandler.getDiagnostics()'
[ERROR] -> [Help 1]
```

Using Java 25 Temurin

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the fmt-maven-plugin:2.25 failure in the google-auth-library-java build with Java 25 Temurin, then inspect the Maven formatting configuration and the reported google-java-format dependency versions. Done means formatting runs successfully on Java 25, or the incompatibility and supported configuration are clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.