[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[tycho-user] P2TargetPlatformResolver error on maven 'bundle' type
|
Hi, I have a 'publisher' project that I want to make available to
others via maven and via a feature. I build it with the felix
'maven-bundle-plugin' so it sits in maven but is a bundle. My feature
includes the publisher and uses the 'target-platform-configuration'
plugin with a target definition file for those dependencies it can get
from p2 and uses 'pomDependencies=consider' and a dependency block to
pull the publisher bundle from maven. We do similar in several
projects and it works fine.
The problem involves the publisher's dependency on activemq-core which
we have in our maven repo and in a p2 repo. The publisher has a
dependency block to pull it from maven which works fine. The feature's
target definition pulls it from p2 which I think should satisfy the
feature build. Note that the feature does not include activemq but
rather just includes the publisher with it's stated Import-Package
dependencies on activemq exported packages. Invoking the maven build
reveals a 'Could not resolve project dependencies' RuntimeException
from:
org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver#addPomDependenciesToTargetPlatform
(line 284)
'Missing: org.apache.activemq:activemq-core:bundle:5.7.0'
I'm not exactly sure what's going on. My dependency block in the
feature pom just has the publisher. I expect it to come from maven and
be built into the feature. I'm not sure why its dependency on activemq
is examined but I assume it has to do with a sane, satisfied build
graph. Why it tries to satisfy that dependency by going to maven when
the target definition has a copy I don't understand either. I did find
that if I modified the activemq pom in my local .m2 repo to change its
package type from bundle to jar, the error went away. Could it be that
a tycho class doesn't know what a 'bundle' type is? Unfortunately I
can't modify the main maven repo's pom and even if I could I think
this situation would present itself again eventually (the felix
'maven-bundle-plugin' suggests 'bundle' package type). Interestingly
maven central shows it as jar type but we mirror it to our internal
network's Archiva and it shows up as bundle type.
Is there a configuration option somewhere that will either:
1. cause the publisher's dependency to be satisfied by the p2 artifact?
2. make the maven artifact's 'bundle' type understood?
Any help appreciated!
Craig