I have some Java/OSGi projects that I wish to build and package as a single Deployment Package.
I'm using Tycho to compile the sources for a particular target-platform, all dependencies are in a local p2 repository.
If I set <packaging>eclipse-plugin</packaging>
in my pom.xml the build goes fine but I get a .jar as output.
When I use maven-bundle-plugin and set <packaging>bundle</packaging>
the build breaks, because it compiles with the standard maven-compiler-plugin instead of Tycho.
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.3.5</version>
<extensions>true</extensions>
<configuration>
<manifestLocation>META-INF</manifestLocation>
<instructions>
<Bundle-SymbolicName>${project.artifactId};singleton:=true</Bundle-SymbolicName>
<Bundle-Name>${project.name}</Bundle-Name>
<Bundle-Version>${project.version}</Bundle-Version>
<Import-Package>
javax.net;resolution:=optional,
javax.net.ssl;resolution:=optional
</Import-Package>
<Export-Package>my.project.package</Export-Package>
</instructions>
</configuration>
</plugin>
How do I force the compilation with Tycho? Or is there any other way to do what I need?