I have a plugin and a feature project in my workspace. When I export the feature manually via File > Export As > Feature everything works well. I\'m trying to write an autom
So far, your configuration looks good. However you currently only have an automated build for your feature, but not the for the plugin. Unlike the Eclipse export wizard, eclipse-feature
only processes the feature.xml - and it expects that the referenced plugins are built elsewhere.
So what you need to do is to set up a Maven reactor which includes both an eclipse-feature
and an eclipse-plugin
project. Here is how you do this:
pom
, adapt the artifactId
to something which makes sense (e.g. MyProject.parent
), and move the pom.xml into a new general project in your workspace.Add a pom.xml in the root of the feature project:
4.0.0
MyProject
MyProject.parent
1.0.0-SNAPSHOT
relative/path/to/parent/project
NMGDBPluginFeature
eclipse-feature
Add another pom.xml in the root of the plugin project, which is the same as the one above except for the artifactId
- this needs to be the same as the plugin's Bundle-SymbolicName
- and the packaging
which needs to be eclipse-plugin
.
Include the plugin and feature projects in the Maven reactor by adding a
section in the parent POM with the paths to these projects:
relative/path/to/plugin/project
relative/path/to/feature/project
Note that the paths need to be adapted so that they are correct for the project locations on disk (which may be different to what is shown in the Eclipse workspace). The paths need to be relative, so they probably start with ../
.
Now you can trigger a Maven build on your parent POM, and the feature should be able to resolve the reference to your plugin. In Eclipse, you can trigger the Maven build from the context menu of the pom.xml file. Or, if you also convert the parent project to a Maven project, the you can also run Maven builds from the context menu of the project root.