Community
Participate
Working Groups
Build Identifier: Indigo I have an eclipse plugin that I'm building that has a dependency on another osgi jar. That osgi jar has transitive optional dependencies that aren't osgi jars and probably aren't even in maven. There is no way for me to tell tycho to ignore those optional transitive dependencies. Reproducible: Always Steps to Reproduce: 1. cd build01 2. mvn install This builds the jar and the wrapper jar 3. cd build02 4. mvn install this fails.
Created attachment 206375 [details] This tarball contains my sample project. This tarball contains 2 separate maven builds build01 contains 2 maven projects content -- builds a regular jar that has external dependencies. wrapper -- builds an osgi wrapper jar of the content jar. This osgi jar has optional dependencies listed in the Import-Package manifest entry. build02 contains 1 simple eclipse plugin that has a dependency on the wrapper osgi jar. Tycho fails to build build02
The problem is specific to optional dependencies referenced when using pomDependencies=consider mode. Although this is a bug, there is no immediate plans to address it... unless, of course, somebody contributes a quality patch.
Sorry for the late reply. This is not a bug in Tycho, but a problem in the project setup. (Thanks for the good example project!) When generating the manifest, you are adding an _attribute_ "resolution" with value "optional". What you wanted to specify is the "resolution" _directive_. The syntax for this in an OSGi manifest header is resolution:=optional (note the colon). Example: Import-Package: mandatory.package,optional.package;resolution:=optional