blob: 427b4f4f5374d9563721260872a49b8d212a99e0 [file] [log] [blame]
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>3.3&nbsp;Apache Maven Quickstart</title><link rel="stylesheet" href="css/stylesheet.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="index.html" title="Bundlor User Guide"><link rel="up" href="ch03.html" title="3.&nbsp;Quickstart"><link rel="prev" href="ch03s02.html" title="3.2&nbsp;Apache ANT Quickstart"><link rel="next" href="ch04.html" title="4.&nbsp;Usage"><!--Begin Google Analytics code--><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
var pageTracker = _gat._getTracker("UA-2728886-3");
pageTracker._setDomainName("none");
pageTracker._setAllowLinker(true);
pageTracker._trackPageview();
</script><!--End Google Analytics code--></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">3.3&nbsp;Apache Maven Quickstart</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch03s02.html">Prev</a>&nbsp;</td><th width="60%" align="center">3.&nbsp;Quickstart</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch04.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="quickstart.maven"></a>3.3&nbsp;Apache Maven Quickstart</h2></div></div></div><p>The Maven plugin allows Bundlor to be run from inside any Maven project.</p><div class="orderedlist"><ol type="1"><li><p>Add the Eclipse Virgo build and SpringSource Enterprise Bundle Repository to the <code class="filename">pom.xml</code> file</p><pre class="programlisting">&lt;<span class="hl-tag">pluginRepositories</span>&gt;
&lt;<span class="hl-tag">pluginRepository</span>&gt;
&lt;<span class="hl-tag">id</span>&gt;eclipse.virgo.build.bundles.release&lt;<span class="hl-tag">/id</span>&gt;
&lt;<span class="hl-tag">name</span>&gt;Eclipse Virgo Build&lt;<span class="hl-tag">/name</span>&gt;
&lt;<span class="hl-tag">url</span>&gt;http://build.eclipse.org/rt/virgo/maven/bundles/release&lt;<span class="hl-tag">/url</span>&gt;
&lt;<span class="hl-tag">/pluginRepository</span>&gt;
&lt;<span class="hl-tag">pluginRepository</span>&gt;
&lt;<span class="hl-tag">id</span>&gt;com.springsource.repository.bundles.external&lt;<span class="hl-tag">/id</span>&gt;
&lt;<span class="hl-tag">name</span>&gt;SpringSource Enterprise Bundle Repository - External Bundle Releases&lt;<span class="hl-tag">/name</span>&gt;
&lt;<span class="hl-tag">url</span>&gt;http://repository.springsource.com/maven/bundles/external&lt;<span class="hl-tag">/url</span>&gt;
&lt;<span class="hl-tag">/pluginRepository</span>&gt;
...
&lt;<span class="hl-tag">/pluginRepositories</span>&gt;</pre></li><li><p>
Use the <code class="literal">bundlor</code> plugin in the <code class="filename">pom.xml</code> file. See
<a class="xref" href="ch04s03.html" title="4.3&nbsp;Apache Maven Usage">Section&nbsp;4.3, &#8220;Apache Maven Usage&#8221;</a> for details about the parameters of the plugin.
</p><pre class="programlisting">&lt;<span class="hl-tag">build</span>&gt;
&lt;<span class="hl-tag">plugins</span>&gt;
&lt;<span class="hl-tag">plugin</span>&gt;
&lt;<span class="hl-tag">groupId</span>&gt;org.eclipse.virgo.bundlor&lt;<span class="hl-tag">/groupId</span>&gt;
&lt;<span class="hl-tag">artifactId</span>&gt;org.eclipse.virgo.bundlor.maven&lt;<span class="hl-tag">/artifactId</span>&gt;
&lt;<span class="hl-tag">version</span>&gt;1.1.2.RELEASE&lt;<span class="hl-tag">/version</span>&gt;
&lt;<span class="hl-tag">executions</span>&gt;
&lt;<span class="hl-tag">execution</span>&gt;
&lt;<span class="hl-tag">id</span>&gt;bundlor&lt;<span class="hl-tag">/id</span>&gt;
&lt;<span class="hl-tag">goals</span>&gt;
&lt;<span class="hl-tag">goal</span>&gt;bundlor&lt;<span class="hl-tag">/goal</span>&gt;
&lt;<span class="hl-tag">/goals</span>&gt;
&lt;<span class="hl-tag">/execution</span>&gt;
&lt;<span class="hl-tag">/executions</span>&gt;
&lt;<span class="hl-tag">/plugin</span>&gt;
&lt;<span class="hl-tag">plugin</span>&gt;
&lt;<span class="hl-tag">groupId</span>&gt;org.apache.maven.plugins&lt;<span class="hl-tag">/groupId</span>&gt;
&lt;<span class="hl-tag">artifactId</span>&gt;maven-jar-plugin&lt;<span class="hl-tag">/artifactId</span>&gt;
&lt;<span class="hl-tag">version</span>&gt;2.4&lt;<span class="hl-tag">/version</span>&gt;
&lt;<span class="hl-tag">configuration</span>&gt;
&lt;<span class="hl-tag">archive</span>&gt;
&lt;<span class="hl-tag">manifestFile</span>&gt;
target/classes/META-INF/MANIFEST.MF
&lt;<span class="hl-tag">/manifestFile</span>&gt;
&lt;<span class="hl-tag">/archive</span>&gt;
&lt;<span class="hl-tag">/configuration</span>&gt;
&lt;<span class="hl-tag">/plugin</span>&gt;
...
&lt;<span class="hl-tag">/plugins</span>&gt;
...
&lt;<span class="hl-tag">/build</span>&gt;</pre></li></ol></div></div><!--Begin LoopFuse code--><script src="http://loopfuse.net/webrecorder/js/listen.js" type="text/javascript"></script><script type="text/javascript">
_lf_cid = "LF_48be82fa";
_lf_remora();
</script><!--End LoopFuse code--><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch03s02.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ch03.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">3.2&nbsp;Apache ANT Quickstart&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;4.&nbsp;Usage</td></tr></table></div></body></html>