Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

FISH-7959: Fixes MultiRelease JAR lookup for specific version classes #6460

Merged
merged 3 commits into from
Nov 1, 2023

Conversation

ctabin
Copy link
Contributor

@ctabin ctabin commented Oct 21, 2023

Description

This PR fixes lookup of classes in MultiRelease JARs for version-specific classes. Fixes #6452.

Testing Performed

Tested on my reproducer

Testing Environment

OpenJDK 21, Linux Debian
Azul JDK 21, Ubuntu 20.04

@ctabin ctabin force-pushed the fix-multirelease-jar-lookup branch from 6bd1546 to 02d73a7 Compare October 21, 2023 15:46
@ctabin
Copy link
Contributor Author

ctabin commented Oct 21, 2023

Jenkins test please

@breakponchito breakponchito changed the title Fixes MultiRelease JAR lookup for specific version classes FISH-7959: Fixes MultiRelease JAR lookup for specific version classes Oct 27, 2023
@breakponchito
Copy link
Contributor

Jenkins test please

@breakponchito
Copy link
Contributor

Jenkins test please

1 similar comment
@breakponchito
Copy link
Contributor

Jenkins test please

@breakponchito
Copy link
Contributor

breakponchito commented Oct 27, 2023

@ctabin I simplify a little the way to use the JarEntry, now it is more simple to create the JarFile using following constructor: JarFile(File, boolean, int, Runtime.Version), here more documentation:

https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/jar/JarFile.html#%3Cinit%3E(java.io.File,boolean,int,java.lang.Runtime.Version)

after testing with your reproducer the test is passing with success:
`

INFO: Shutdown procedure finished
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 13.816 s - in ch.astorm.launcher.LuceneDeploymentTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] --- maven-jar-plugin:3.3.0:jar (default-jar) @ launcher ---
[INFO] Building jar: /home/alfv83/projects/gf-test-lucene/launcher/target/launcher-1.0.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for GF Project (Main) 1.0.0-SNAPSHOT:
[INFO]
[INFO] GF Project (Main) .................................. SUCCESS [ 0.282 s]
[INFO] GF Project (API) ................................... SUCCESS [ 1.272 s]
[INFO] GF Project (EJB) ................................... SUCCESS [ 1.312 s]
[INFO] GF Project (WAR) ................................... SUCCESS [ 0.443 s]
[INFO] GF Project (EAR) ................................... SUCCESS [ 0.676 s]
[INFO] GF Project (Launcher) .............................. SUCCESS [ 15.187 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19.294 s
[INFO] Finished at: 2023-10-27T13:12:23-06:00
[INFO] ------------------------------------------------------------------------

`

thank you for your contribution

@ctabin
Copy link
Contributor Author

ctabin commented Oct 29, 2023

@breakponchito Thank you very much !

Copy link
Contributor

@luiseufrasio luiseufrasio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] --- maven-jar-plugin:3.3.0:jar (default-jar) @ launcher ---
[INFO] Building jar: C:\code\reproducers\gf-test-lucene\launcher\target\launcher-1.0.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for GF Project (Main) 1.0.0-SNAPSHOT:
[INFO]
[INFO] GF Project (Main) .................................. SUCCESS [ 0.277 s]
[INFO] GF Project (API) ................................... SUCCESS [ 1.343 s]
[INFO] GF Project (EJB) ................................... SUCCESS [ 1.390 s]
[INFO] GF Project (WAR) ................................... SUCCESS [ 0.665 s]
[INFO] GF Project (EAR) ................................... SUCCESS [ 1.535 s]
[INFO] GF Project (Launcher) .............................. SUCCESS [ 16.658 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.027 s
[INFO] Finished at: 2023-11-01T14:03:22-03:00
[INFO] ------------------------------------------------------------------------

@breakponchito breakponchito merged commit 544a5eb into payara:master Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug Report: [JDK21] MultiRelease JAR in EAR (with Lucene)/FISH-7959
3 participants