Purpose
With the Tycho taking over the Eclipse world, majority of Eclipse products are built in a form of update sites or repositories. All features and plugins are present in the form of jars, which might be not sufficient to install them using Eclipse dropins. The feclipse-maven-installer takes such a repository and performs necessary p2 operations (simulate installation of features and plugins, during which necessary jars are unpacked).
Using feclipse-maven-plugin
The feclipse-maven-plugin uses the repo generated during the %build phase, therefore must be run in the same location where the build was done.
Simple use case
mvn-rpmbuild org.fedoraproject:feclipse-maven-plugin:install -DsourceRepo=${targetsite} -DtargetLocation=%{buildroot}%{install_loc}/eclipse rm %{buildroot}%{install_loc}/eclipse/*.jar
The eclipse folder at the end of the location is required to keep the convention with current installation layout. The underlying p2 mechanism copies also content.jar and artifacts.jar meta files. It is necessary to remove them, because Eclipse will refuse to read such a dropins file.
Advanced use case
Maven always processes poms. In some cases it causes unwanted consequences (f.e. a profile is specified, which does something we want). In that case it is good to create a fake pom.xml.
mkdir temp pushd temp cat > pom.xml << EOF <project> <modelVersion>4.0.0</modelVersion> <name>Maven Default Project</name> <groupId>org.fedoraproject</groupId> <artifactId>dummy</artifactId> <version>1.0.0</version> </project> EOF popd mvn-rpmbuild -f temp/pom.xml org.fedoraproject:feclipse-maven-plugin:install \ -DsourceRepo=../com.mountainminds.eclemma.site/target/repository -DtargetLocation=%{buildroot}%{install_loc}/eclipse