googleapis / google-auth-library-java

Open source Auth client library for Java
https://developers.google.com/identity
BSD 3-Clause "New" or "Revised" License
409 stars 222 forks source link

Failing while building google-auth-library-java version v1.6.0 using mvn clean install #1385

Closed shivsrivastava closed 5 months ago

shivsrivastava commented 5 months ago

Package artifact id: google-auth-library-java

source code url: https://github.com/googleapis/google-auth-library-java/tree/v1.6.0

Issue Description: Failing while building google-auth-library-java version v1.6.0 using mvn clean install

JDK Version: 1.8

Build CMD: mvn clean install

MVN Version: 3.9.6

Error Log:

[ERROR] Tests run: 9, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.35 s <<< FAILURE! - in com.google.auth.oauth2.TokenVerifierTest [ERROR] com.google.auth.oauth2.TokenVerifierTest.verifyServiceAccountRs256Token Time elapsed: 1.289 s <<< ERROR! com.google.auth.oauth2.TokenVerifier$VerificationException: Could not find PublicKey for provided keyId: 2ef77b38a1b0370487043916acbf27d74edd08b1 at com.google.auth.oauth2.TokenVerifierTest.verifyServiceAccountRs256Token(TokenVerifierTest.java:239)

[INFO] Running com.google.auth.oauth2.UserAuthorizerTest [INFO] Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.021 s - in com.google.auth.oauth2.UserAuthorizerTest [INFO] Running com.google.auth.oauth2.UserCredentialsTest

attachement: build log attached (jdk 1.8)

OS: windows 10

failed_jdk_8.txt

clundin25 commented 5 months ago

v1.6.0 is very old (Over two years). Can you upgrade to the latest code instead?

I don't think we will backport a fix.

shivsrivastava commented 5 months ago

v1.6.0 is very old (Over two years). Can you upgrade to the latest code instead?

I don't think we will backport a fix.

Hi @clundin25 , this specific version v1.6.0 is required in my project , so I request you to help me on this . Please.

clundin25 commented 5 months ago

The test is likely failing because the service account key is deleted. My recommendation is to skip the tests with the -DskipTests flag.

mvn clean install -DskipTests succeeds for me.

I do recommend upgrading to a newer version of the library.

shivsrivastava commented 5 months ago

The test is likely failing because the service account key is deleted. My recommendation is to skip the tests with the -DskipTests flag.

mvn clean install -DskipTests succeeds for me.

I do recommend upgrading to a newer version of the library.

Hi @clundin25 , -DskipTests skips all the tests cases . So in this scenario (-DskipTests ) , we will not able to run any test cases. I want to run with test cases enabled. If we can skip one or two submodule's test cases , it is fine but can not skips all test cases.

shivsrivastava commented 5 months ago

Hi @clundin25 , can you please provide an update on it?

shivsrivastava commented 5 months ago

Hi @clundin25 , can you please provide an update on it?

Please update on it.