Discussion:
[tycho-user] Some difficulties with tycho pomConsider, maven-dependency-plugin
reyman
2017-01-20 22:40:21 UTC
Permalink
Hi,

I have some difficulties to configure correctly a tycho project.

a) First step, compilation with two type of repository

I have source code which need dependency from maven and p2 repository.
The maven dependencies exposed by *pom.xml* are osgi bundle which contain
each a *Manifest.Mf* with *lot of transitive dependencies*.

For example :

*Manifest-Version: 1.0*
*Bnd-LastModified: 1484832642776*
*Build-Jdk: 1.8.0_101*
*Built-By: reyman*
*Bundle-ManifestVersion: 2*
*Bundle-Name: genstar-core*
*Bundle-SymbolicName: genstar-core*
*Bundle-Version: 1.0*
*Created-By: Apache Maven Bundle Plugin*
*Export-Package: core.configuration;version="1.0.0";uses:="com.thoughtw*
* orks.xstream,core.metamodel,core.metamodel.pop,core.metamodel.pop.io
<http://core.metamodel.pop.io>"*
* ,core.metamodel;version="1.0.0",core.metamodel.geo;version="1.0.0";us*
* es:="com.vividsolutions.jts.geom,core.metamodel",core.metamodel.geo.i*
* o;version="1.0.0";uses:="com.vividsolutions.jts.geom,core.metamodel.g*
* eo",core.metamodel.pop;version="1.0.0";uses:="com.vividsolutions.jts.*
* geom,core.metamodel,core.metamodel.geo,core.util.data",core.metamodel*
* .pop.io
<http://pop.io>;version="1.0.0",core.util;version="1.0.0";uses:="org.apache.l*
* ogging.log4j",core.util.R;version="1.0.0";uses:="org.math.R",core.uti*
* l.data;version="1.0.0";uses:="core.util.excpetion",core.util.excpetio*
* n;version="1.0.0",core.util.random;version="1.0.0",core.util.random.r*
* oulette;version="1.0.0",core.util.stats;version="1.0.0"*
*Import-Package: com.thoughtworks.xstream;version="[1.4,2)",com.thought*
* works.xstream.converters;version="[1.4,2)",com.thoughtworks.xstream.c*
* onverters.extended;version="[1.4,2)",com.thoughtworks.xstream.io
<http://com.thoughtworks.xstream.io>;vers*
* ion="[1.4,2)",com.thoughtworks.xstream.io.xml;version="[1.4,2)",com.t*
* houghtworks.xstream.mapper;version="[1.4,2)",com.vividsolutions.jts.g*
* eom,core.metamodel;version="[1.0,2)",core.metamodel.geo;version="[1.0*
* ,2)",core.metamodel.pop;version="[1.0,2)",core.metamodel.pop.io
<http://core.metamodel.pop.io>;versi*
* on="[1.0,2)",core.util.data;version="[1.0,2)",core.util.excpetion;ver*
* sion="[1.0,2)",core.util.random;version="[1.0,2)",org.apache.logging.*
* log4j;version="[2.7,3)",org.math.R,org.rosuda.REngine,org.rosuda.REng*
* ine.Rserve*
*Require-Capability: osgi.ee <http://osgi.ee>;filter:="(&(osgi.ee
<http://osgi.ee>=JavaSE)(version=1.8))"*
*Tool: Bnd-3.2.0.201605172007*

I use the *pomConsider* option to do that, so tycho correctly catch the
dependencies from p2 and pom.xml.

I have two project folder linked by parent *pom.xml* :

- "my-maven-dep" only bundle the maven dependencies
- "my-eclipse-plugin" contain the source code which need "my-maven-dep"
and p2 dependencies defined in Manifest.MF

b) But because it's never a good idea to create a Uber-Jar which contain
all compile and runtime jar dependencies needed for execution of this
eclipse-plugin, i try to use the *maven-bundle-plugin* with
*Conditional-Package* to catch all transitive dependencies...

But i don't know how can i create a "eclipse-plugin" and a "bundle" in the
same time ?

Best R.
SR

Loading...