tycho icon indicating copy to clipboard operation
tycho copied to clipboard

Tycho fails to resolve JavaSE-25

Open akurtakov opened this issue 3 months ago • 4 comments

I am trying to move ShellWax to Java 25 (https://github.com/eclipse-shellwax/shellwax/pull/153) but building it fails with:

Error:  Cannot resolve dependencies of project org.eclipse.shellwax:org.eclipse.shellwax.feature:eclipse-feature:1.4.0-SNAPSHOT
Error:   with context {osgi.os=linux, osgi.ws=gtk, org.eclipse.update.install.features=true, osgi.arch=x86_64, org.eclipse.update.install.sources=true}
Error:    Software being installed: org.eclipse.shellwax.feature.feature.group 1.4.0.qualifier
Error:    Missing requirement: org.eclipse.shellwax.core 1.4.0.20251009-1048 requires 'osgi.ee; (osgi.ee=UNKNOWN)' but it could not be found
Error:    Cannot satisfy dependency: org.eclipse.shellwax.feature.feature.group 1.4.0.qualifier depends on: org.eclipse.equinox.p2.iu; org.eclipse.shellwax.core 0.0.0: See log for details
Error:  -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Cannot resolve dependencies of project org.eclipse.shellwax:org.eclipse.shellwax.feature:eclipse-feature:1.4.0-SNAPSHOT
 with context {osgi.os=linux, osgi.ws=gtk, org.eclipse.update.install.features=true, osgi.arch=x86_64, org.eclipse.update.install.sources=true}
  Software being installed: org.eclipse.shellwax.feature.feature.group 1.4.0.qualifier
  Missing requirement: org.eclipse.shellwax.core 1.4.0.20251009-1048 requires 'osgi.ee; (osgi.ee=UNKNOWN)' but it could not be found
  Cannot satisfy dependency: org.eclipse.shellwax.feature.feature.group 1.4.0.qualifier depends on: org.eclipse.equinox.p2.iu; org.eclipse.shellwax.core 0.0.0

The project is using javac in order to not depend on released ECJ supporting latest Java version.

akurtakov avatar Oct 09 '25 10:10 akurtakov

The error says:

org.eclipse.shellwax.core 1.4.0.20251009-1048 requires 'osgi.ee; (osgi.ee=UNKNOWN)

so one should look where this comes from (maybe P2? Or it could even be bndlib bug).

You could try to replace Bundle-RequiredExecutionEnvironment: JavaSE-25 (what is deprecated) with

Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=25))"

laeubi avatar Oct 09 '25 10:10 laeubi

Require-Capability works but it exposes problem in PDE "No required Execution Environment has been set"

Image

akurtakov avatar Oct 09 '25 11:10 akurtakov

@akurtakov can you test if using deriveHeaderFromSource=false fixes the issue for you?

laeubi avatar Oct 27 '25 08:10 laeubi

It works https://ci.eclipse.org/shellwax/job/shellwax/job/PR-153/4/console

akurtakov avatar Oct 27 '25 08:10 akurtakov

This should be resolved once we update to the new bndlib here:

  • https://github.com/eclipse-tycho/tycho/pull/5736

laeubi avatar Dec 29 '25 06:12 laeubi