blob: bef092c19cad0951c20a6a8aa3aceccad2131d35 [file] [log] [blame]
<?xml version="1.0" standalone="no"?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<section id="quickstart.maven">
<title>Apache Maven Quickstart</title>
<para>The Maven plugin allows Bundlor to be run from inside any Maven project.</para>
<orderedlist>
<listitem>
<para>Add the Eclipse Virgo build and SpringSource Enterprise Bundle Repository to the <filename>pom.xml</filename> file</para>
<programlisting language="xml">&lt;pluginRepositories&gt;
&lt;pluginRepository&gt;
&lt;id&gt;eclipse.virgo.build.bundles.@release.type@&lt;/id&gt;
&lt;name&gt;Eclipse Virgo Build&lt;/name&gt;
&lt;url&gt;http://build.eclipse.org/rt/virgo/maven/bundles/@release.type@&lt;/url&gt;
&lt;/pluginRepository&gt;
&lt;pluginRepository&gt;
&lt;id&gt;com.springsource.repository.bundles.external&lt;/id&gt;
&lt;name&gt;SpringSource Enterprise Bundle Repository - External Bundle Releases&lt;/name&gt;
&lt;url&gt;http://repository.springsource.com/maven/bundles/external&lt;/url&gt;
&lt;/pluginRepository&gt;
...
&lt;/pluginRepositories&gt;</programlisting>
</listitem>
<listitem>
<para>
Use the <literal>bundlor</literal> plugin in the <filename>pom.xml</filename> file. See
<xref linkend="usage.maven"/> for details about the parameters of the plugin.
</para>
<programlisting language="xml">&lt;build&gt;
&lt;plugins&gt;
&lt;plugin&gt;
&lt;groupId&gt;org.eclipse.virgo.bundlor&lt;/groupId&gt;
&lt;artifactId&gt;org.eclipse.virgo.bundlor.maven&lt;/artifactId&gt;
&lt;version&gt;@bundle.version@&lt;/version&gt;
&lt;executions&gt;
&lt;execution&gt;
&lt;id&gt;bundlor&lt;/id&gt;
&lt;goals&gt;
&lt;goal&gt;bundlor&lt;/goal&gt;
&lt;/goals&gt;
&lt;/execution&gt;
&lt;/executions&gt;
&lt;/plugin&gt;
&lt;plugin&gt;
&lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
&lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
&lt;version&gt;2.4&lt;/version&gt;
&lt;configuration&gt;
&lt;archive&gt;
&lt;manifestFile&gt;
target/classes/META-INF/MANIFEST.MF
&lt;/manifestFile&gt;
&lt;/archive&gt;
&lt;/configuration&gt;
&lt;/plugin&gt;
...
&lt;/plugins&gt;
...
&lt;/build&gt;</programlisting>
</listitem>
</orderedlist>
</section>