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

Prepare for Java 24 Build #6371

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chrisrueger
Copy link
Contributor

@chrisrueger chrisrueger commented Nov 15, 2024

Related to #6370
hope to fix a Java 24 build problem

@pkriens is this something which should still go to 7.1.0 ?

And also: I added Java 23 temporarily to the build (Java 24 was not available in the Github actions... probably because it is still early access @timothyjward ). But maybe we already see something with JDK23.

@scordio Are you able to test this fix in your build with Java 24 to see if it fixes your problem?

hope to fix a Java 24 build problem
Signed-off-by: Christoph Rueger <[email protected]>
@chrisrueger chrisrueger changed the title Remove setpolicy Prepare for Java 24 Build - Remove setpolicy Nov 15, 2024
@chrisrueger chrisrueger changed the title Prepare for Java 24 Build - Remove setpolicy Prepare for Java 24 Build Nov 15, 2024
@scordio
Copy link

scordio commented Nov 15, 2024

@scordio Are you able to test this fix in your build with Java 24 to see if it fixes your problem?

Sure, I give a try locally and get back to you.

@chrisrueger
Copy link
Contributor Author

chrisrueger commented Nov 15, 2024

I have reverted the change to the github actions for Java 24. Upgrading whole gradle build to Java 24 seems to be a separate larger task. But Java 23 build already passed.

Let's see if this PR fixes @scordio problem and wait for him to confirm.

@scordio
Copy link

scordio commented Nov 16, 2024

I'm struggling to reproduce the issue locally (on MacOS Sonoma 14.5), using OpenJDK 24 (macOS / AArch64).

Instead of the error I reported, I get the following:

[INFO] --- bnd:7.0.0:test-jar (test-jar) @ assertj-core-osgi ---
[INFO] 
[INFO] --- bnd-resolver:7.0.0:resolve (osgi-integration-resolving) @ assertj-core-osgi ---
[INFO] Resolving /Users/stefano/Projects/assertj/assertj-tests/assertj-integration-tests/assertj-core-osgi/verify.bndrun:
[INFO] Bnd inferred -runee: JavaSE-21
Downloading from ossrh: https://oss.sonatype.org/content/repositories/snapshots/org/assertj/assertj-core/3.26.4-SNAPSHOT/maven-metadata.xml
[INFO] -runbundles: assertj-core;version='[3.26.4,3.26.5)',assertj-core-osgi-tests;version='[3.26.4,3.26.5)',junit-jupiter-api;version='[5.11.3,5.11.4)',junit-jupiter-engine;version='[5.11.3,5.11.4)',junit-platform-commons;version='[1.11.3,1.11.4)',junit-platform-engine;version='[1.11.3,1.11.4)',junit-platform-launcher;version='[1.11.3,1.11.4)',net.bytebuddy.byte-buddy;version='[1.15.0,1.15.1)',org.opentest4j;version='[1.3.0,1.3.1)'
[INFO] 
[INFO] --- bnd-testing:7.0.0:testing (osgi-integration-testing) @ assertj-core-osgi ---
[INFO] Matching glob *
[INFO] Testing /Users/stefano/Projects/assertj/assertj-tests/assertj-integration-tests/assertj-core-osgi/target/verify.bndrun:
[INFO] Bnd inferred -runee: JavaSE-21
! could not resolve the bundles: [assertj-core-osgi-tests-3.26.4.SNAPSHOT org.osgi.framework.BundleException: Could not resolve module: assertj-core-osgi-tests [2]
  Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=21))"

]
! Failed to start bundle assertj-core-osgi-tests-3.26.4.SNAPSHOT, exception Could not resolve module: assertj-core-osgi-tests [2]
  Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=21))"

org.osgi.framework.BundleException: Could not resolve module: assertj-core-osgi-tests [2]
  Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=21))"

	at org.eclipse.osgi.container.Module.start(Module.java:493)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:463)
	at aQute.launcher.Launcher.start(Launcher.java:699)
	at aQute.launcher.Launcher.startBundles(Launcher.java:679)
	at aQute.launcher.Launcher.activate(Launcher.java:585)
	at aQute.launcher.Launcher.launch(Launcher.java:403)
	at aQute.launcher.Launcher.run(Launcher.java:185)
	at aQute.launcher.Launcher.main(Launcher.java:161)
	at aQute.launcher.pre.EmbeddedLauncher.executeWithRunPath(EmbeddedLauncher.java:170)
	at aQute.launcher.pre.EmbeddedLauncher.findAndExecute(EmbeddedLauncher.java:135)
	at aQute.launcher.pre.EmbeddedLauncher.main(EmbeddedLauncher.java:52)
[INFO] No Errors
[INFO] 

Does anyone see what the difference might be?

@stbischof
Copy link
Contributor

Is there a Version of package or Projekt we should increse?

@timothyjward
Copy link
Contributor

Does anyone see what the difference might be?

You look to be further through the process. This next error appears to be Eclipse Equinox not knowing what Java 24 is. This is another library that will need to be updated to support Java 24.

@scordio
Copy link

scordio commented Nov 16, 2024

You look to be further through the process.

What I couldn't figure out is what made my local environment to be further through the process, as I'm still using bnd 7.0.0.

Right now, I only have my Mac vs. GitHub Actions to compare. In case someone also wants to try out assertj-core-osgi with the changes from this branch, please remember to revert assertj/assertj@f4c6ea0.

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.

4 participants