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

tycho-p2-extras-plugin:publish-features-and-bundles - Unresolved requirement: Import-Package: org.eclipse.tycho #117

Closed
laeubi opened this issue May 4, 2021 · 2 comments
Assignees
Milestone

Comments

@laeubi
Copy link
Member

laeubi commented May 4, 2021

  1. goto tycho-extras/tycho-p2-extras-plugin/target/test-classes/publisher/testProject
  2. run mvn clean install -X -Dtycho-version=2.4.0-SNAPSHOT

This results in printing

!ENTRY org.eclipse.tycho.p2.resolver.impl 4 0 2021-05-04 11:16:10.614
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.tycho.p2.resolver.impl [54]
  Unresolved requirement: Import-Package: org.eclipse.tycho

	at org.eclipse.osgi.container.Module.start(Module.java:463)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1845)
	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1838)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1779)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1743)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1665)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)

to the debug console output (and some more)

org.eclipse.tycho is supposed to come from the bootclasspath so it seems the tycho-p2-extras-plugin is missing some depdencies.

Any hint what one has to look for? This happens wehn using the 'P2ApplicationLauncher'...

@laeubi
Copy link
Member Author

laeubi commented May 5, 2021

This is caused because P2ApplicationLauncher forks a new process (an thus the boot classpath is not available), so we need distinguish between the two case.

@laeubi
Copy link
Member Author

laeubi commented May 5, 2021

Another issue when running in -X mode the "-console" parameter is added leading to

org.osgi.framework.BundleException: Could not find bundle: org.eclipse.equinox.console
	at org.eclipse.core.runtime.internal.adaptor.ConsoleManager.checkForConsoleBundle(ConsoleManager.java:61)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:351)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:251)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1461)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1434)

We can support this by adding the console bundles to the tycho-external product

@laeubi laeubi self-assigned this May 5, 2021
laeubi added a commit to laeubi/tycho that referenced this issue May 5, 2021
…dles -

Unresolved requirement: Import-Package: org.eclipse.tycho

Signed-off-by: Christoph Läubrich <laeubi@laeubi-soft.de>
@laeubi laeubi closed this as completed in 75ded10 May 5, 2021
@laeubi laeubi added this to the 2.4 milestone Sep 21, 2021
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

No branches or pull requests

1 participant