Hi Steinar,
If I understand your issue you are trying to:
- Download a "classic", non-OSGi artifact from Maven Central
- Wrap this artifact as an OSGi bundle
- Use this artifact as a dependency of one of your bundles
Am I right?
I never tried to do this dynamically, but I think your are missing a few steps. According to the docs [1],
the pomDependencies parameter considers only artifacts that already are OSGi bundles. Hence, you first have to wrap your dependencies as OSGi bundles. This can be done:
I believe that a project using the latter is easier to deal with because dependencies are explicit (i.e. one does not have to search through the POM files to find them) and because M2E is thus not required to build the project from Eclipse IDE. However it
requires more work, especially when upgrading or adding new dependencies.
Regards,
Emmanuel
[1] https://wiki.eclipse.org/Tycho/Target_Platform#.22POM_dependencies_consider.22
[2]
https://flames-of-code.netlify.com/blog/maven-and-tycho-deps/
[3]
https://wiki.eclipse.org/Tycho/How_Tos/Dependency_on_pom-first_artifacts
[4]
https://www.vogella.com/tutorials/EclipseJarToPlugin/article.html
Le 25/08/2019 à 00:22, Steinar Bang a écrit :
Platform: debian 10.0 "buster", amd64
openjdk-11 11.0.4+11-1~deb10u1
eclipse IDE 2019-06
m2e 1.12.0.20190529-1916
m2e tycho project configurations 0.8.1.201704211436
maven 3.6
tycho 1.4.0
I've done the following:
1. Defined <pomDependencies>consider</pomDependencies> in the
tycho-platform-configuration on the configuration POM
https://github.com/steinarb/scratch/blob/modeler/add-neo4j-connection/releng/modeler.configuration/pom.xml#L51
2. Added the dependency I wish to add to the target platform to the top
POM
https://github.com/steinarb/scratch/blob/modeler/add-neo4j-connection/pom.xml#L24
3. Built the project with "mvn clean install"
4. Imported the projects as maven projects into eclipse
5. Tried adding the bundle to the import plugin in the MANIFEST.MF of
the eclipse bundle project, but the neo4j bundle is not available
there
https://github.com/steinarb/scratch/blob/modeler/add-neo4j-connection/bundles/modeler.core/META-INF/MANIFEST.MF#L7
What am I missing for the org.neo4j.driver.neo4j-java-driver bundle to
become available in the MANIFEST.MF editor of the modeler.core project?
Thanks!
- Steinar
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/tycho-user