From Fedora Project Wiki

Line 8: Line 8:
  
 
== Simple use case ==
 
== Simple use case ==
 
+
<pre>
 
mvn-rpmbuild org.fedora:feclipse-maven-plugin:install -DsourceRepo=${targetsite} -DtargetLocation=%{buildroot}%{install_loc}/eclipse
 
mvn-rpmbuild org.fedora:feclipse-maven-plugin:install -DsourceRepo=${targetsite} -DtargetLocation=%{buildroot}%{install_loc}/eclipse
 +
</pre>
  
 
The eclipse folder at the end of the location is required to keep the convention with current installation layout.
 
The eclipse folder at the end of the location is required to keep the convention with current installation layout.

Revision as of 07:12, 9 May 2013

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.fedora:feclipse-maven-plugin:install -DsourceRepo=${targetsite} -DtargetLocation=%{buildroot}%{install_loc}/eclipse

The eclipse folder at the end of the location is required to keep the convention with current installation layout.

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.fedora:feclipse-maven-plugin:install \
	-DsourceRepo=../com.mountainminds.eclemma.site/target/repository -DtargetLocation=%{buildroot}%{install_loc}/eclipse