Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Remove Guava under version 24 #5175

Merged
merged 7 commits into from
Dec 1, 2022
Merged

Conversation

jbescos
Copy link
Member

@jbescos jbescos commented Oct 11, 2022

  • Some dependencies that bring Guava under version 24 have exclusions. Good news is that we only use them for testing/exampling purposes. Lets see if tests are passing with that exclusion.
  • With others like testng, just updating the version brings a correct Guava.
  • Testng new version works with arquilian-testng in alpha version unfortunately. I hope this is not a problem.

Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
@jbescos jbescos force-pushed the guavaSecurity branch 5 times, most recently from 918cb8a to a7b803e Compare October 12, 2022 07:17
@jbescos
Copy link
Member Author

jbescos commented Oct 12, 2022

The build is failing, but when I check the output the maven part is success:

[INFO] jersey-examples-moxy ............................... SUCCESS [  2.645 s]
[INFO] jersey-test-framework-maven-custom-enforcer-rules .. SUCCESS [  2.041 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  56:01 min
[INFO] Finished at: 2022-10-12T08:14:29Z
[INFO] ------------------------------------------------------------------------
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // parallel
[Pipeline] }
[Pipeline] // stage
[Pipeline] End of Pipeline
ERROR: script returned exit code 1

GitHub has been notified of this commit’s build result

Finished: FAILURE

Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
@senivam
Copy link
Contributor

senivam commented Oct 12, 2022

@jbescos build fails for JDK 8 only, here is the log:
https://ci.eclipse.org/jersey/job/continuous-integration/job/PR-5175/7/execution/node/34/log/
the reason is:

Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
/home/jenkins/agent/workspace/continuous-integration_PR-5175/test-framework/core/src/main/java/org/glassfish/jersey/test/JerseyTestNg.java:[27,30] cannot access org.testng.annotations.AfterClass
  bad class file: /home/jenkins/.m2/repository/org/testng/testng/7.6.1/testng-7.6.1.jar(org/testng/annotations/AfterClass.class)
    class file has wrong version 55.0, should be 52.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.

@jansupol
Copy link
Contributor

jansupol commented Oct 12, 2022

Requirements:
TestNG Upto v7.5: JDK 8 or higher.
TestNG v7.6.0 and above: JDK 11 or higher.
..........................................................................................
So we should not go higher than 7.5 in master/3.x

@jbescos jbescos force-pushed the guavaSecurity branch 2 times, most recently from 7a8d538 to 9fc4ef9 Compare October 12, 2022 10:57
Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
@jbescos
Copy link
Member Author

jbescos commented Oct 12, 2022

I have tuned the versions to work fine with JDK8 and we also don't need to use an alpha version of arquilian.

@jbescos
Copy link
Member Author

jbescos commented Oct 12, 2022

These are the guava dependencies that we will have with the fix:

$ mvn dependency:tree | grep 'google\.guava'
[INFO] +- com.google.guava:guava:jar:31.1-jre:compile
[INFO] |  +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO] |  +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
[INFO] +- com.google.guava:guava:jar:31.1-jre:test
[INFO] |  +- com.google.guava:failureaccess:jar:1.0.1:test
[INFO] |  +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:test
[INFO] +- com.google.guava:guava:jar:31.1-jre:test
[INFO] |  +- com.google.guava:failureaccess:jar:1.0.1:test
[INFO] |  +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:test
[INFO] |  |  \- com.google.guava:guava:jar:25.1-android:compile
[INFO] +- com.google.guava:guava:jar:31.1-jre:test
[INFO] |  +- com.google.guava:failureaccess:jar:1.0.1:test
[INFO] |  +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:test
[INFO] +- com.google.guava:guava:jar:31.1-jre:compile
[INFO] |  +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO] |  +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
[INFO] |  \- com.google.guava:guava:jar:31.1-jre:compile
[INFO] |     +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO] |     +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile

This is what we have now in master:

$ mvn dependency:tree | grep 'google\.guava'
[INFO] |  |  \- com.google.guava:guava:jar:16.0.1:provided
[INFO] |  \- com.google.guava:guava:jar:16.0.1:compile
[INFO] +- com.google.guava:guava:jar:31.1-jre:compile
[INFO] |  +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO] |  +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
[INFO] |     \- com.google.guava:guava:jar:16.0.1:test
[INFO] |     \- com.google.guava:guava:jar:16.0.1:test
[INFO] |     \- com.google.guava:guava:jar:16.0.1:test
[INFO] |     \- com.google.guava:guava:jar:16.0.1:test
[INFO] |  |  \- com.google.guava:guava:jar:16.0.1:test
[INFO] |  +- com.google.guava:guava:jar:20.0:test
[INFO] +- com.google.guava:guava:jar:31.1-jre:test
[INFO] |  +- com.google.guava:failureaccess:jar:1.0.1:test
[INFO] |  +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:test
[INFO] |  |  \- com.google.guava:guava:jar:16.0.1:test
[INFO] |  |  \- com.google.guava:guava:jar:25.1-android:compile
[INFO] +- com.google.guava:guava:jar:31.1-jre:test
[INFO] |  +- com.google.guava:failureaccess:jar:1.0.1:test
[INFO] |  +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:test
[INFO] |     +- com.google.guava:guava:jar:16.0.1:compile
[INFO] |  \- com.google.guava:guava:jar:31.1-jre:compile
[INFO] |     +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO] |     +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile

Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
@jbescos
Copy link
Member Author

jbescos commented Nov 16, 2022

$ mvn dependency:tree | grep 'google\.guava'
[INFO] +- com.google.guava:guava:jar:31.1-jre:compile
[INFO] |  +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO] |  +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
[INFO] +- com.google.guava:guava:jar:31.1-jre:test
[INFO] |  +- com.google.guava:failureaccess:jar:1.0.1:test
[INFO] |  +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:test
[INFO] +- com.google.guava:guava:jar:31.1-jre:test
[INFO] |  +- com.google.guava:failureaccess:jar:1.0.1:test
[INFO] |  +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:test
[INFO] |  |  \- com.google.guava:guava:jar:25.1-android:provided
[INFO] +- com.google.guava:guava:jar:31.1-jre:test
[INFO] |  +- com.google.guava:failureaccess:jar:1.0.1:test
[INFO] |  +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:test
[INFO] |  \- com.google.guava:guava:jar:31.1-jre:compile
[INFO] |     +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO] |     +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile

Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
@senivam senivam merged commit ab8ac91 into eclipse-ee4j:master Dec 1, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants