Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-user] Problem with p2.inf and AdditionalInstallableUnitDescriptions

Hi,

I've created a small tool (a plugin) that I want to deploy into my host IDE. This plugin contains several 3rd party jars and I'd like to three different licenses to this plugin via a p2.inf file. I've already figured from p2's source code that license advice is not supported on th main IU (i.e. my plugin). But then I learned that I can specify additional IUs in my p2.inf file and I tried to add one artificial IU per 3rd party jar in my plugin, like so:

units.0.id = my.plugin.3rd-party-xyz
units.0.version = $version$
units.0.licenses.0 = 3rd Party Library License XYZ.
units.0.licenses.0.location = http://localhost/license
units.0.provides.0.namespace = org.eclipse.equinox.p2.iu
units.0.provides.0.name = my.plugin.3rd-party-xyz
units.0.provides.0.version = $version$

Unfortunately it seems that this artificial IU doesn't end up in the p2 repository that Tycho builds. I also tried to add some requires advice to the main IU, so that something pulls in the artificial IU, like so:

requires.0.namespace = org.eclipse.equinox.p2.iu
requires.0.name = my.plugin.3rd-party-xyz
requires.0.range = [$version$,$version$]
requires.0.greedy = true
requires.0.optional = false
requires.0.multiple = false

That at least proves that the p2.inf file is parsed by Tycho, but it leads to a build failure because the artificial IU is still not known:

[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: my.plugin 1.0.0.qualifier
[ERROR] Missing requirement: my.plugin 1.0.0.qualifier requires 'my.plugin.3rd-party-xyz [1.0.0.qualifier]' but it could not be found
[ERROR]
[ERROR] Internal error: java.lang.RuntimeException: No solution found because the problem is unsatisfiable.: [Unable to satisfy dependency from my.plugin 1.0.0.qualifier to my.plugin.3rd-party-xyz [1.0.0.qualifier].; No solution found because the problem is unsatisfiable.] -> [Help 1] org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: No solution found because the problem is unsatisfiable.: [Unable to satisfy dependency from my.plugin 1.0.0.qualifier my.plugin.3rd-party-xyz [1.0.0.qualifier].; No solution found because the problem is unsatisfiable.]
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:167)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: java.lang.RuntimeException: No solution found because the problem is unsatisfiable.: [Unable to satisfy dependency from my.plugin 1.0.0.qualifier to my.plugin.3rd-party-xyz [1.0.0.qualifier].; No solution found because the problem is unsatisfiable.]
	at org.eclipse.tycho.p2.resolver.AbstractResolutionStrategy.newResolutionException(AbstractResolutionStrategy.java:98)
	at org.eclipse.tycho.p2.resolver.ProjectorResolutionStrategy.resolve(ProjectorResolutionStrategy.java:88)
	at org.eclipse.tycho.p2.resolver.AbstractResolutionStrategy.resolve(AbstractResolutionStrategy.java:63)
	at org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.resolveDependencies(P2ResolverImpl.java:157)
	at org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.resolveDependencies(P2ResolverImpl.java:107)
	at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.doResolveDependencies(P2TargetPlatformResolver.java:348)
	at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.resolveDependencies(P2TargetPlatformResolver.java:321)
	at org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.resolveProject(DefaultTychoDependencyResolver.java:109)
	at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:75)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
	... 11 more

Is that a bug in Tycho or am I doing something wrong?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper




Back to the top