Reputation: 6987
I am building a framework and want to use it both as a standalone java application and as an eclipse plugin which exports all the packages in the java project.
The current way I do this is by having two projects (java + eclipse plugin), building the java project, copying the jar file, adding the file to the plugin's path and then (manually) exporting all the packages.
Is there a way to automate this process using maven?
Upvotes: 4
Views: 120
Reputation: 1535
We are in a very similar situation and solved this using the maven-eclipse-plugin for getting the project to work within Eclipse with all pom dependencies as embedded jars.
At the moment we started, Tycho was not very mature and we decided to work pom-first. We do this by also using the org.apache.felix maven-bundle-plugin to generate the manifest.mf and make the final deployable bundle/standalone application.
Ufortunately this kind of build gets mind-boggling to understand very quickly and can take a lot of effort any time you need to update dependencies....
Upvotes: 1
Reputation: 4053
The Eclipse Tycho project is aimed at building Eclipse plugins with Maven.
Tycho is a set of Maven plugins and extensions for building Eclipse plugins and OSGi bundles with Maven. Eclipse plugins and OSGi bundles have their own metadata for expressing dependencies, source folder locations, etc. that are normally found in a Maven POM
You should be able to have a single project, and Tycho will take care of building a proper OSGi bundle, with MANIFEST, xml config, etc.
Upvotes: 3