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

You requested to install 'osgi.bundle; org.eclipse.jdt.launching.macosx 0.0.0' but it could not be found #1046

Closed
kwin opened this issue Nov 7, 2022 · 9 comments · Fixed by #1079 or #1154

Comments

@kwin
Copy link
Member

kwin commented Nov 7, 2022

When trying to execute mvn clean verify I get the following error on module org.eclipse.m2e.tests.common

...
[DEBUG] -- end configuration --
[DEBUG] Class org.eclipse.m2e.tests.common.AbstractLifecycleMappingTest matches the current filter.
[DEBUG] Class org.eclipse.m2e.tests.common.AbstractLifecycleMappingTest matches the current filter.
[DEBUG] No solution found because the problem is unsatisfiable.: [Unable to satisfy dependency from tycho-extra-1667843090263 0.0.0.1667843090263 to osgi.bundle; org.eclipse.jdt.launching.macosx 0.0.0.; Unable to satisfy dependency from tycho-1667843090269 0.0.0.1667843090269 to osgi.bundle; org.eclipse.jdt.launching.macosx 0.0.0.; No solution found because the problem is unsatisfiable.]
[INFO] {osgi.os=win32, osgi.ws=win32, org.eclipse.update.install.features=true, osgi.arch=x86_64}
[ERROR] Cannot resolve project dependencies:
[ERROR]   You requested to install 'osgi.bundle; org.eclipse.jdt.launching.macosx 0.0.0' but it could not be found
[ERROR]
[ERROR] See https://wiki.eclipse.org/Tycho/Dependency_Resolution_Troubleshooting for help.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  9.240 s
[INFO] Finished at: 2022-11-07T18:44:50+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-surefire-plugin:3.0.0:integration-test (default-integration-test) on project org.eclipse.m2e.tests.common: Execution default-integration-test of goal org.eclipse.tycho:tycho-surefire-plugin:3.0.0:integration-test failed: Cannot resolve dependencies of MavenProject: org.eclipse.m2e:org.eclipse.m2e.tests.common:2.0.2-SNAPSHOT @ /Users/konradwindszus/git/eclipse/m2e-core/org.eclipse.m2e.tests.common/.tycho-consumer-pom.xml: See log for details -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eclipse.tycho:tycho-surefire-plugin:3.0.0:integration-test (default-integration-test) on project org.eclipse.m2e.tests.common: Execution default-integration-test of goal org.eclipse.tycho:tycho-surefire-plugin:3.0.0:integration-test failed: Cannot resolve dependencies of MavenProject: org.eclipse.m2e:org.eclipse.m2e.tests.common:2.0.2-SNAPSHOT @ /Users/konradwindszus/git/eclipse/m2e-core/org.eclipse.m2e.tests.common/.tycho-consumer-pom.xml
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:375)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-integration-test of goal org.eclipse.tycho:tycho-surefire-plugin:3.0.0:integration-test failed: Cannot resolve dependencies of MavenProject: org.eclipse.m2e:org.eclipse.m2e.tests.common:2.0.2-SNAPSHOT @ /Users/konradwindszus/git/eclipse/m2e-core/org.eclipse.m2e.tests.common/.tycho-consumer-pom.xml
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:148)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.eclipse.tycho.DependencyResolutionException: Cannot resolve dependencies of MavenProject: org.eclipse.m2e:org.eclipse.m2e.tests.common:2.0.2-SNAPSHOT @ /Users/konradwindszus/git/eclipse/m2e-core/org.eclipse.m2e.tests.common/.tycho-consumer-pom.xml
    at org.eclipse.tycho.p2.resolver.P2ResolverImpl.resolveDependencies (P2ResolverImpl.java:253)
    at org.eclipse.tycho.p2.resolver.P2ResolverImpl.resolveTargetDependencies (P2ResolverImpl.java:130)
    at org.eclipse.tycho.p2.resolver.P2DependencyResolver.doResolveDependencies (P2DependencyResolver.java:427)
    at org.eclipse.tycho.p2.resolver.P2DependencyResolver.resolveDependencies (P2DependencyResolver.java:389)
    at org.eclipse.tycho.surefire.AbstractTestMojo.createEclipseInstallation (AbstractTestMojo.java:835)
    at org.eclipse.tycho.surefire.AbstractTestMojo.execute (AbstractTestMojo.java:704)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.eclipse.tycho.p2.util.resolution.ResolverException: See log for details
    at org.eclipse.tycho.p2.util.resolution.ProjectorResolutionStrategy.resolve (ProjectorResolutionStrategy.java:129)
    at org.eclipse.tycho.p2.util.resolution.AbstractResolutionStrategy.resolve (AbstractResolutionStrategy.java:53)
    at org.eclipse.tycho.p2.resolver.P2ResolverImpl.resolveDependencies (P2ResolverImpl.java:236)
    at org.eclipse.tycho.p2.resolver.P2ResolverImpl.resolveTargetDependencies (P2ResolverImpl.java:130)
    at org.eclipse.tycho.p2.resolver.P2DependencyResolver.doResolveDependencies (P2DependencyResolver.java:427)
    at org.eclipse.tycho.p2.resolver.P2DependencyResolver.resolveDependencies (P2DependencyResolver.java:389)
    at org.eclipse.tycho.surefire.AbstractTestMojo.createEclipseInstallation (AbstractTestMojo.java:835)
    at org.eclipse.tycho.surefire.AbstractTestMojo.execute (AbstractTestMojo.java:704)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR]

I am using the following Maven version:

Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
Maven home: /opt/homebrew/Cellar/maven/3.8.6/libexec
Java version: 17.0.5, vendor: Eclipse Adoptium, runtime: /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home
Default locale: en_DE, platform encoding: UTF-8
OS name: "mac os x", version: "12.6.1", arch: "aarch64", family: "mac"

The dependency is declared in

<artifactId>org.eclipse.jdt.launching.macosx</artifactId>
but it is not clear to me which repository is supposed to resolve this dependency.

@kwin
Copy link
Member Author

kwin commented Nov 7, 2022

Removing the dependency at

m2e-core/pom.xml

Lines 417 to 421 in 9416e75

<dependency>
<artifactId>org.eclipse.jdt.launching.macosx</artifactId>
<version>0.0.0</version>
<type>eclipse-plugin</type>
</dependency>
fixes the issue for me and makes the build pass.

@laeubi
Copy link
Member

laeubi commented Nov 8, 2022

@kwin I have no clue why we should require macox here as a pom dependency, but probably you want to submit this as a PR so we see if that breaks anything?

@HannesWell
Copy link
Contributor

@kwin Since that should only ne activated on macOS, I assume you are on a Mac. I know no other contributor using Mac so this Profile ist probably quite unmaintained.

It would be great if you can check how far that profile can be stripped down or if IT even can be removed completly. If you do so, please use the IT- Test Launch config to ensure all Tests are considered.

kwin added a commit to kwin/m2e-core that referenced this issue Nov 22, 2022
support aarch64 in target platform
This closes eclipse-m2e#1046
HannesWell pushed a commit that referenced this issue Nov 22, 2022
support aarch64 in target platform
This closes #1046
@kwin
Copy link
Member Author

kwin commented Dec 22, 2022

The fix applied was actually incorrect as turned out in #1153. A proper fix requires eclipse-tycho/tycho#1900, though.

@laeubi Can you reopen this issue?

@laeubi
Copy link
Member

laeubi commented Dec 22, 2022

The fix applied was actually incorrect as turned out in #1153. A proper fix requires eclipse-tycho/tycho#1900, though.

I can reopen this, but this does not require eclipse-tycho/tycho#1900 as the behavior is correct. The test bundles request three environments an all of those need to resolve successfully.

One way to solve this would be to not define any environment (the Tycho decide based on the running system) or have profiles that enables only one environment for the tests at a time.

@laeubi laeubi reopened this Dec 22, 2022
kwin added a commit to kwin/m2e-core that referenced this issue Dec 22, 2022
kwin added a commit to kwin/m2e-core that referenced this issue Dec 22, 2022
HannesWell pushed a commit to kwin/m2e-core that referenced this issue Dec 22, 2022
kwin added a commit to kwin/m2e-core that referenced this issue Dec 22, 2022
HannesWell pushed a commit to HannesWell/m2e-core that referenced this issue Dec 22, 2022
@laeubi
Copy link
Member

laeubi commented Dec 23, 2022

@kwin can you explain why org.eclipse.jdt.launching.macosx is required? Because Tycho already has

org.eclipse.tycho.p2resolver.P2ResolverImpl.addDependenciesForTests(Consumer<IRequirement>) that currently adds optional greedy requirements for tests, probbaly we should add org.eclipse.jdt.launching.macosx but we should be sure about the implications...

@kwin
Copy link
Member Author

kwin commented Dec 23, 2022

This bundle is necessary on Mac OS to have a default/workspace JRE set on Mac OS. Without this (https://github.com/eclipse-jdt/eclipse.jdt.debug/tree/master/org.eclipse.jdt.launching.macosx) org.eclipse.jdt.launching.JavaRuntime.getDefaultVMInstall() always returns null on Mac OS which makes several m2e tests break.

As this has has dependencies on jdt.core and jdt.launching (https://github.com/eclipse-jdt/eclipse.jdt.debug/blob/master/org.eclipse.jdt.launching.macosx/META-INF/MANIFEST.MF) you should not always install this on Mac OS. It really depends on whether you want to test org.eclipse.jdt.launching related classes or not.

@laeubi
Copy link
Member

laeubi commented Dec 23, 2022

Is there any reason not the vm running the tests can be used here as the default? I suppose that's how it works on other OS?

@kwin
Copy link
Member Author

kwin commented Dec 23, 2022

Don't know, I am not a JDT Launching expert, you would have to ask them. I guess the problem is that the standard detection from https://github.com/eclipse-jdt/eclipse.jdt.debug/blob/ef786a296cd06cb273d56c77380b8f9bf86b7c64/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java#L70 does not work on Mac OS. Therefore they came up with a dedicated bundle. See also the explicit guard for Mac OS which made it return null in https://github.com/eclipse-jdt/eclipse.jdt.debug/blob/ef786a296cd06cb273d56c77380b8f9bf86b7c64/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java#L292.

HannesWell pushed a commit to kwin/m2e-core that referenced this issue Dec 28, 2022
kwin added a commit to kwin/m2e-core that referenced this issue Dec 29, 2022
Fix several race conditions

This closes eclipse-m2e#1046
This closes eclipse-m2e#1080
HannesWell pushed a commit that referenced this issue Dec 29, 2022
Fix several race conditions

This closes #1046
This closes #1080
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 a pull request may close this issue.

3 participants