blob: 46dcf023852b612d9a5cc9375cfdff2770fe84bd [file] [log] [blame]
Stuart McCulloch7c961f52008-01-02 08:56:07 +00001<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html><head><title>Apache Felix - Maven Obr Plugin</title>
3
4
5
6
7 <link rel="stylesheet" href="maven-obr-plugin_files/site.css" type="text/css" media="all">
8 <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"></head><body>
9 <div class="title"><div class="logo"><a href="http://felix.apache.org/site/index.html"><img alt="Apache Felix" src="maven-obr-plugin_files/logo.png" border="0"></a></div><div class="header"><a href="http://www.apache.org/"><img alt="Apache" src="maven-obr-plugin_files/apache.png" border="0"></a></div></div>
10 <div class="menu">
11<ul>
12 <li><a href="http://felix.apache.org/site/index.html" title="Index">home</a></li>
13 <li><a href="http://felix.apache.org/site/news.html" title="news">news</a></li>
14 <li><a href="http://felix.apache.org/site/status.html" title="status">status</a></li>
15 <li><a href="http://felix.apache.org/site/license.html" title="license">license</a></li>
16 <li><span class="nobr"><a href="http://felix.apache.org/site/downloads.cgi" title="Visit page outside Confluence" rel="nofollow">downloads<sup><img class="rendericon" src="maven-obr-plugin_files/linkext7.gif" alt="" align="absmiddle" border="0" height="7" width="7"></sup></a></span></li>
17 <li><a href="http://felix.apache.org/site/documentation.html" title="documentation">documentation</a></li>
18 <li><a href="http://felix.apache.org/site/mailinglists.html" title="mailinglists">mailing lists</a></li>
19 <li><span class="nobr"><a href="http://cwiki.apache.org/confluence/x/O-" title="Visit page outside Confluence" rel="nofollow">wiki<sup><img class="rendericon" src="maven-obr-plugin_files/linkext7.gif" alt="" align="absmiddle" border="0" height="7" width="7"></sup></a></span></li>
20 <li><a href="http://felix.apache.org/site/committers.html" title="committers">committers</a></li>
21 <li><a href="http://felix.apache.org/site/faq.html" title="faq">faq</a></li>
22 <li><a href="http://felix.apache.org/site/roadmap.html" title="roadmap">roadmap</a></li>
23 <li><a href="http://felix.apache.org/site/sourcecode.html" title="sourcecode">source code</a></li>
24 <li><a href="http://felix.apache.org/site/codingstandards.html" title="codingstandards">coding standards</a></li>
25 <li><a href="http://felix.apache.org/site/issuetracking.html" title="issuetracking">issue tracking</a></li>
26 <li><a href="http://felix.apache.org/site/dependencies.html" title="dependencies">dependencies</a></li>
27 <li><span class="nobr"><a href="http://www.apache.org/" title="Visit page outside Confluence" rel="nofollow">apache software foundation<sup><img class="rendericon" src="maven-obr-plugin_files/linkext7.gif" alt="" align="absmiddle" border="0" height="7" width="7"></sup></a></span></li>
28 <li><span class="nobr"><a href="http://www.apache.org/foundation/sponsorship.html" title="Visit page outside Confluence" rel="nofollow">sponsorship<sup><img class="rendericon" src="maven-obr-plugin_files/linkext7.gif" alt="" align="absmiddle" border="0" height="7" width="7"></sup></a></span></li>
29 <li><span class="nobr"><a href="http://www.apache.org/foundation/thanks.html" title="Visit page outside Confluence" rel="nofollow">sponsors<sup><img class="rendericon" src="maven-obr-plugin_files/linkext7.gif" alt="" align="absmiddle" border="0" height="7" width="7"></sup></a></span></li>
30</ul> </div>
31 <div class="main">
32<p>This Maven plug-in aims to automate OBR (<span class="nobr"><a href="http://www2.osgi.org/Repository/HomePage" title="Visit page outside Confluence" rel="nofollow">OSGi Bundle Repository<sup><img class="rendericon" src="maven-obr-plugin_files/linkext7.gif" alt="" align="absmiddle" border="0" height="7" width="7"></sup></a></span>)
33management. It creates a local OBR repository and can create a remote
34OBR to distribute bundles. This plug-in allows you to install your
35bundles inside an OBR repository at the same time you install it in
36your Maven repository. It can also deploy your bundle in a remote Maven
37repository when you deploy your Maven artefact. The plug-in computes
38capabilities and requirements and edits the repository description file
39to add (or update) the bundle description.</p>
40
41<h2><a name="MavenObrPlugin-Features:"></a>Features:</h2>
42
43<p>The plug-in allows:</p>
44<ul>
45 <li>Installing Maven artefact inside an OBR repository,
46automatically or manually (for legacy bundles). This OBR could be
47remote or local.</li>
48 <li>Discovering bundle capabilities and requirements</li>
49 <li>Customizing bundle descriptions</li>
50</ul>
51
52
53<h2><a name="MavenObrPlugin-Howtousetheplugin?"></a>How to use the plug-in?</h2>
54
55<p>The plug-in offers five Maven goals:</p>
56<ul>
57 <li>A: The standard 'install' goal: it will install your bundle
58in the repository at the same time it install it in your Maven
59repository.</li>
60 <li>B: An 'install-file' goal which takes a jar file,
61and installs it in the local Maven repository and update&nbsp; the
62remote repository descriptor file.</li>
63 <li>C: A 'deploy' goal which upload a bundle on a remote repository and update the remote repository descriptor file.</li>
64 <li>D: A 'deploy-file' goal which upload jar file on a remote repository and update the remote repository descriptor file.&nbsp;</li>
65 <li>E : A 'clean' goal cleaning the local obr repository. &nbsp;&nbsp;&nbsp; &nbsp;</li>
66</ul>
67
68
69<h3><a name="MavenObrPlugin-A:InstallingbundlesinalocalOBRrepository"></a>A: Installing bundles in a local OBR repository</h3>
70
71<p>The plug-in can create a local OBR repository at the root of the
72local Maven repository. At each time the artefact is installed in the
73local maven repository (by using the 'mvn install' command), a local
74OBR repository is updated to contain the description of the artefact.
75This feature is automated inside the <span class="nobr"><a href="http://felix.apache.org/site/maven-bundle-plugin-bnd.html" title="Visit page outside Confluence" rel="nofollow">maven-bundle-plugin<sup><img class="rendericon" src="maven-obr-plugin_files/linkext7.gif" alt="" align="absmiddle" border="0" height="7" width="7"></sup></a></span>.</p>
76
77<h3><a name="MavenObrPlugin-B:InstallinganexistingMavenartefactinalocalOBRrepository"></a>B: Installing an existing Maven artefact in a local OBR repository</h3>
78
79<p>This second way, to use the plug-in is to add an already existing bundle in the OBR. The bundle <b>must</b>
80be already in the Maven local repository (you can use the Maven
81install:install-file plug-in to install an external bundle in your
82Maven repository).<br>
83To use this goal, the user must provide information in command line:</p>
84<table class="confluenceTable"><tbody>
85<tr>
86<td class="confluenceTd"> Variable name (prefixed by --D) </td>
87<td class="confluenceTd"> status </td>
88<td class="confluenceTd"> description </td>
89</tr>
90<tr>
91<td class="confluenceTd"> file </td>
92<td class="confluenceTd"> require </td>
93<td class="confluenceTd"> Path to the jar file (used to install bundle only) </td>
94</tr>
95<tr>
96<td class="confluenceTd"> artefactId </td>
97<td class="confluenceTd"> require </td>
98<td class="confluenceTd"> artefactId of the bundle Use to determine
99path to the jar file in local maven Repository use as symbolic name if
100it isn't define in manifest </td>
101</tr>
102<tr>
103<td class="confluenceTd"> groupId </td>
104<td class="confluenceTd"> require </td>
105<td class="confluenceTd"> groupId of the bundle Use to determine path to the jar file on local maven repository </td>
106</tr>
107<tr>
108<td class="confluenceTd"> version </td>
109<td class="confluenceTd"> require </td>
110<td class="confluenceTd"> Version of the bundle Use to determine path to the jar file on local maven repository </td>
111</tr>
112<tr>
113<td class="confluenceTd"> packaging </td>
114<td class="confluenceTd"> require </td>
115<td class="confluenceTd"> File type Use by maven to install the file (used to install bundle only) </td>
116</tr>
117<tr>
118<td class="confluenceTd"> repository-path </td>
119<td class="confluenceTd"> optional </td>
120<td class="confluenceTd"> Path to the repository descriptor file (if not define: default path is : MavenRepo\repository.xml </td>
121</tr>
122<tr>
123<td class="confluenceTd"> obr-file </td>
124<td class="confluenceTd"> optional </td>
125<td class="confluenceTd"> Path to the obr.xml, file which describe
126capabilities requirement and category given manually by user. (if not
127define: nothing is added to the resource description). </td>
128</tr>
129</tbody></table>
130
131<h4><a name="MavenObrPlugin-Exampleofcommandline:"></a>Example of command line:</h4>
132
133<p>mvn homega.tools:obrPlugin:install-file \<br>
134-Drepository-path=<span class="nobr"><a href="file:///c:repository.xml" title="Visit page outside Confluence" rel="nofollow">file:/c:\repository.xml<sup><img class="rendericon" src="maven-obr-plugin_files/linkext7.gif" alt="" align="absmiddle" border="0" height="7" width="7"></sup></a></span> \<br>
135-obr-file=<span class="nobr"><a href="file:///c:projecthomegaobr.xml" title="Visit page outside Confluence" rel="nofollow">file:/c:\project\homega\obr.xml<sup><img class="rendericon" src="maven-obr-plugin_files/linkext7.gif" alt="" align="absmiddle" border="0" height="7" width="7"></sup></a></span> \<br>
136-DartifactId=multicast.discovery \<br>
137-DgroupId=<font color="black">homega.utils</font> <font color="black">{color}</font><br>
138<font color="black">-Dversion=1.0.0</font></p>
139
140<p>By using this command, the plug-in will look at the artefact
141MavenRepo\homega\utils\multicast.discovery\1.0.0\multicast.discovery-1.0.0.jar
142<br clear="all"></p>
143
144<p>Then it will compute bundle description by using <span class="nobr"><a href="http://www2.osgi.org/Repository/BIndex" title="Visit page outside Confluence" rel="nofollow">bindex <sup><img class="rendericon" src="maven-obr-plugin_files/linkext7.gif" alt="" align="absmiddle" border="0" height="7" width="7"></sup></a></span>and information from the command line (artifactId, groupId, version, and obr file (if set)).</p>
145
146<h4><a name="MavenObrPlugin-"></a><font color="black">Note:</font></h4>
147
148<p><font color="black">As said previously, the plug-in does not install
149the file in the Maven repository but target an already install
150artefact. However, it is possible to install the bundle in the
151repository and to add it in the OBR repository file in one command:</font><br>
152<font color="black">&nbsp;mvn install:install-file homega.tools:obrPlugin:install-file {color}</font><br>
153<font color="black">-Dfile=</font><font color="black"><span class="nobr"><a href="file:///c:projethomegamulticast.discovery-1.0.0.jar" title="Visit page outside Confluence" rel="nofollow">file:/c:\projet\homega\multicast.discovery-1.0.0.jar<sup><img class="rendericon" src="maven-obr-plugin_files/linkext7.gif" alt="" align="absmiddle" border="0" height="7" width="7"></sup></a></span></font> <font color="black">{color}</font><br>
154<font color="black">-Drepository-path=</font><font color="black"><span class="nobr"><a href="file:///c:repository.xml" title="Visit page outside Confluence" rel="nofollow">file:/c:\repository.xml<sup><img class="rendericon" src="maven-obr-plugin_files/linkext7.gif" alt="" align="absmiddle" border="0" height="7" width="7"></sup></a></span></font> <font color="black">{color}</font><br>
155<font color="black">-Dobr-file=</font><font color="black"><span class="nobr"><a href="file:///c:projecthomegaobr.xml" title="Visit page outside Confluence" rel="nofollow">file:/c:\project\homega\obr.xml<sup><img class="rendericon" src="maven-obr-plugin_files/linkext7.gif" alt="" align="absmiddle" border="0" height="7" width="7"></sup></a></span></font> <font color="black">{color}</font><br>
156<font color="black">-DartifactId=multicast.discovery {color}</font><br>
157<font color="black">-DgroupId=</font><font color="black">homega.utils</font> <font color="black">{color}</font><br>
158<font color="black">-Dversion=1.0.0 {color}</font><br>
159<font color="black">-Dpackaging=jar</font></p>
160
161<h3><a name="MavenObrPlugin-"></a><font color="black">C: Deploying a bundle on a remote OBR</font></h3>
162
163<p><font color="black">To use the deploy goal, you must change your pom.xml:</font></p>
164<ul>
165 <li><font color="black">Add the "</font><font color="black">deployment"</font> <font color="black">goal</font></li>
166</ul>
167
168
169<ul>
170 <li>
171 <ul>
172 <li><font color="black">Indicate the repository-name
173property. This is the name of the repository descriptor file (this
174property is optional; default value is "repository.xml"). This file is
175located on url provided by user.</font><br>
176<font color="teal">&lt;</font><font color="#3f7f7f">plugin</font><font color="teal">&gt;</font><br>
177<font color="teal">&nbsp;&nbsp;&nbsp; &lt;</font><font color="#3f7f7f">groupId</font><font color="teal">&gt;</font><font color="black">org.apache.felix</font><font color="teal">&lt;/</font><font color="#3f7f7f">groupId</font><font color="teal">&gt;</font><br>
178&nbsp;&nbsp;&nbsp; <font color="teal">&lt;</font><font color="#3f7f7f">artifactId</font><font color="teal">&gt;</font><font color="black">maven-obr-plugin</font><font color="teal">&lt;/</font><font color="#3f7f7f">artifactId</font><font color="teal">&gt;</font><br>
179&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="teal">&lt;</font><font color="#3f7f7f">configuration</font><font color="teal">&gt;</font><br>
180<font color="black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;</font> <font color="teal">&lt;</font><font color="#3f7f7f">repository-name</font><font color="teal">&gt;</font><font color="black">repository.xml</font><font color="teal">&lt;/</font><font color="#3f7f7f">repository-name</font><font color="teal">&gt;</font><br>
181&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="teal">&lt;/</font><font color="#3f7f7f">configuration</font><font color="teal">&gt;</font><br>
182&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="teal">&lt;</font><font color="#3f7f7f">executions</font><font color="teal">&gt;</font><br>
183&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="teal">&lt;</font><font color="#3f7f7f">execution</font><font color="teal">&gt;</font><br>
184&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="teal">&lt;</font><font color="#3f7f7f">goals</font><font color="teal">&gt;</font><br>
185&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="teal">&lt;</font><font color="#3f7f7f">goal</font><font color="teal">&gt;</font><font color="black">deployment</font><font color="teal">&lt;/</font><font color="#3f7f7f">goal</font><font color="teal">&gt;</font><br>
186&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="teal">&lt;/</font><font color="#3f7f7f">goals</font><font color="teal">&gt;</font><br>
187&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="teal">&lt;/</font><font color="#3f7f7f">execution</font><font color="teal">&gt;</font><br>
188&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="teal">&lt;/</font><font color="#3f7f7f">executions</font><font color="teal">&gt;</font><br>
189<font color="teal">&lt;/</font><font color="#3f7f7f">plugin</font><font color="teal">&gt;</font></li>
190 <li>You must also configure where the plugin will upload bundles and repository descriptor file. You could do it in maven as this:<br>
191&nbsp; <font color="teal">&lt;</font><font color="#3f7f7f">distributionManagement</font><font color="teal">&gt;</font><br>
192<font color="teal">&nbsp;&nbsp;&nbsp; &lt;</font><font color="#3f7f7f">repository</font><font color="teal">&gt;</font><br>
193<font color="teal">&nbsp;&nbsp;&nbsp;&nbsp; &lt;</font><font color="#3f7f7f">id</font><font color="teal">&gt;</font><font color="black">ftp-repository</font><font color="teal">&lt;/</font><font color="#3f7f7f">id</font><font color="teal">&gt;</font><br>
194&nbsp;&nbsp;&nbsp;&nbsp; <font color="teal">&lt;</font><font color="#3f7f7f">name</font><font color="teal">&gt;</font><font color="black">RepoName</font><font color="teal">&lt;/</font><font color="#3f7f7f">name</font><font color="teal">&gt;</font><br>
195&nbsp;&nbsp;&nbsp;&nbsp; <font color="teal">&lt;</font><font color="#3f7f7f">url</font><font color="teal">&gt;</font><font color="black"><span class="nobr"><a href="ftp://ftp.youraddress.com/obr" title="Visit page outside Confluence" rel="nofollow">ftp://ftp.youraddress.com/obr<sup><img class="rendericon" src="maven-obr-plugin_files/linkext7.gif" alt="" align="absmiddle" border="0" height="7" width="7"></sup></a></span></font><font color="teal">&lt;/</font><font color="#3f7f7f">url</font><font color="teal">&gt;</font><br>
196&nbsp;&nbsp;&nbsp; <font color="teal">&lt;/</font><font color="#3f7f7f">repository</font><font color="teal">&gt;</font><br>
197&nbsp; <font color="teal">&lt;/</font><font color="#3f7f7f">distributionManagement</font><font color="teal">&gt;</font></li>
198 <li>Now maven will upload your bundle on this ftp site.</li>
199 </ul>
200 </li>
201 <li>Launch the 'mvn deploy' command</li>
202</ul>
203
204
205<p>In fact, all protocols are not supported by maven. For example ftp
206protocol as describe above require wagon plugin to run correctly. So
207you could add this part in your pom.xml to use wagon in ftp protocol:</p>
208
209<p><font color="teal">&lt;</font><font color="#3f7f7f">build</font><font color="teal">&gt;</font><br>
210<font color="teal">&nbsp;&nbsp;&nbsp;&nbsp; &lt;</font><font color="#3f7f7f">extensions</font><font color="teal">&gt;</font><br>
211&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="teal">&lt;</font><font color="#3f7f7f">extension</font><font color="teal">&gt;</font><br>
212&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="teal">&lt;</font><font color="#3f7f7f">groupId</font><font color="teal">&gt;</font><font color="black">org.apache.maven.wagon</font><font color="teal">&lt;/</font><font color="#3f7f7f">groupId</font><font color="teal">&gt;</font><br>
213&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="teal">&lt;</font><font color="#3f7f7f">artifactId</font><font color="teal">&gt;</font><font color="black">wagon-ftp</font><font color="teal">&lt;/</font><font color="#3f7f7f">artifactId</font><font color="teal">&gt;</font><br>
214&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="teal">&lt;</font><font color="#3f7f7f">version</font><font color="teal">&gt;</font><font color="black">1.0-alpha-6</font><font color="teal">&lt;/</font><font color="#3f7f7f">version</font><font color="teal">&gt;</font><br>
215&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="teal">&lt;/</font><font color="#3f7f7f">extension</font><font color="teal">&gt;</font><br>
216&nbsp;&nbsp;&nbsp; <font color="teal">&lt;/</font><font color="#3f7f7f">extensions</font><font color="teal">&gt;</font></p>
217
218<p>By this way, the deploy goal supports all protocols supported by wagon.</p>
219
220<h3><a name="MavenObrPlugin-D:DeploynonmavenbundleonaremoteOBRrepository"></a>D: Deploy non maven bundle on a remote OBR repository</h3>
221
222<p>This goal is useful if you want add a non-maven project on your
223remote repository, for example a legacy bundles.The command line is
224compozed by :</p>
225<table class="confluenceTable"><tbody>
226<tr>
227<td class="confluenceTd"> Variable name (preceded by --D) </td>
228<td class="confluenceTd"> status </td>
229<td class="confluenceTd"> description </td>
230</tr>
231<tr>
232<td class="confluenceTd"> file </td>
233<td class="confluenceTd"> require </td>
234<td class="confluenceTd"> Path to the jar file </td>
235</tr>
236<tr>
237<td class="confluenceTd"> artefactId </td>
238<td class="confluenceTd"> require </td>
239<td class="confluenceTd"> artefactId of the bundle Use to determine
240path to the jar file in local maven Repository use as symbolic name if
241it isn't define in manifest </td>
242</tr>
243<tr>
244<td class="confluenceTd"> groupId </td>
245<td class="confluenceTd"> require </td>
246<td class="confluenceTd"> groupId of the bundle Use to determine path to the jar file on local maven repository </td>
247</tr>
248<tr>
249<td class="confluenceTd"> version </td>
250<td class="confluenceTd"> require </td>
251<td class="confluenceTd"> Version of the bundle Use to determine path to the jar file on local maven repository </td>
252</tr>
253<tr>
254<td class="confluenceTd"> packaging </td>
255<td class="confluenceTd"> require </td>
256<td class="confluenceTd"> File type Use by maven to install the file (used to install bundle only) </td>
257</tr>
258<tr>
259<td class="confluenceTd"> url </td>
260<td class="confluenceTd"> require </td>
261<td class="confluenceTd"> url to the remote server </td>
262</tr>
263<tr>
264<td class="confluenceTd"> uniqueVersion </td>
265<td class="confluenceTd"> optional </td>
266<td class="confluenceTd"> Set it to false to avoid unique filename when you upload </td>
267</tr>
268<tr>
269<td class="confluenceTd"> repositoryId </td>
270<td class="confluenceTd"> optional </td>
271<td class="confluenceTd"> Name of the repository use to upload file </td>
272</tr>
273<tr>
274<td class="confluenceTd"> obr-file </td>
275<td class="confluenceTd"> optional </td>
276<td class="confluenceTd"> Path to the obr.xml, file which describe
277capabilities requirement and category given manually by user. (if not
278define: nothing is added to the resource description). </td>
279</tr>
280</tbody></table>
281
282<h4><a name="MavenObrPlugin-Exampleofcompletecommandline:"></a>Example of complete command line:</h4>
283
284<p>mvn deploy:deploy-file homega.tools:obrPlugin:deploy-file \<br>
285-DartifactId=echo2<br>
286-DgroupId=tools<br>
287-Dversion=2.0.0<br>
288-Dpackaging=jar<br>
289-DrepositoryId=ftp-repository<br>
290-DuniqueVersion=false<br>
291-Durl=<span class="nobr"><a href="ftp://ftp.plop-plop.net/obr" title="Visit page outside Confluence" rel="nofollow">ftp://ftp.plop-plop.net/obr<sup><img class="rendericon" src="maven-obr-plugin_files/linkext7.gif" alt="" align="absmiddle" border="0" height="7" width="7"></sup></a></span><br>
292-Dobr-file=c:\obr.xml<br>
293-Dfile=echo2.jar</p>
294
295<p>To upload your file, you must create a small pom file declaring a
296repositoryManagement to indicates which remote server you use and the
297component to use for the protocol transfer. This file must contain also
298groupId, artifactId version and packaging information (in fact those
299data are redundant with the command line, so you could omit them in
300command line).<br>
301<em>Example of additional pom.xml:</em><br>
302<font color="teal">&lt;</font><font color="#3f7f7f">project</font><font color="teal">&gt;</font><br>
303&nbsp; <font color="teal">&lt;</font><font color="#3f7f7f">modelVersion</font><font color="teal">&gt;</font><font color="black">4.0.0</font><font color="teal">&lt;/</font><font color="#3f7f7f">modelVersion</font><font color="teal">&gt;</font><br>
304&nbsp; <font color="teal">&lt;</font><font color="#3f7f7f">packaging</font><font color="teal">&gt;</font><font color="black">jar</font><font color="teal">&lt;/</font><font color="#3f7f7f">packaging</font><font color="teal">&gt;</font><br>
305&nbsp; <font color="teal">&lt;</font><font color="#3f7f7f">groupId</font><font color="teal">&gt;</font><font color="black">tools</font><font color="teal">&lt;/</font><font color="#3f7f7f">groupId</font><font color="teal">&gt;</font><br>
306&nbsp; <font color="teal">&lt;</font><font color="#3f7f7f">artifactId</font><font color="teal">&gt;</font><font color="black">echo2</font><font color="teal">&lt;/</font><font color="#3f7f7f">artifactId</font><font color="teal">&gt;</font><br>
307&nbsp; <font color="teal">&lt;</font><font color="#3f7f7f">version</font><font color="teal">&gt;</font><font color="black">2.0.0</font><font color="teal">&lt;/</font><font color="#3f7f7f">version</font><font color="teal">&gt;</font><br>
308&nbsp; <font color="teal">&lt;</font><font color="#3f7f7f">distributionManagement</font><font color="teal">&gt;</font><br>
309&nbsp;&nbsp; <font color="teal">&lt;</font><font color="#3f7f7f">repository</font><font color="teal">&gt;</font><br>
310&nbsp;&nbsp;&nbsp; <font color="teal">&lt;</font><font color="#3f7f7f">id</font><font color="teal">&gt;</font><font color="black">ftp-repository</font><font color="teal">&lt;/</font><font color="#3f7f7f">id</font><font color="teal">&gt;</font><br>
311&nbsp;&nbsp;&nbsp; <font color="teal">&lt;</font><font color="#3f7f7f">name</font><font color="teal">&gt;</font><font color="black">RepoName</font><font color="teal">&lt;/</font><font color="#3f7f7f">name</font><font color="teal">&gt;</font><br>
312&nbsp;&nbsp;&nbsp; <font color="teal">&lt;</font><font color="#3f7f7f">url</font><font color="teal">&gt;</font><font color="black"><span class="nobr"><a href="ftp://ftp.plop-plop.net/obr" title="Visit page outside Confluence" rel="nofollow">ftp://ftp.plop-plop.net/obr<sup><img class="rendericon" src="maven-obr-plugin_files/linkext7.gif" alt="" align="absmiddle" border="0" height="7" width="7"></sup></a></span></font><font color="teal">&lt;/</font><font color="#3f7f7f">url</font><font color="teal">&gt;</font><br>
313&nbsp;&nbsp; <font color="teal">&lt;/</font><font color="#3f7f7f">repository</font><font color="teal">&gt;</font><br>
314&nbsp; <font color="teal">&lt;/</font><font color="#3f7f7f">distributionManagement</font><font color="teal">&gt;</font><br>
315&nbsp; <font color="teal">&lt;</font><font color="#3f7f7f">build</font><font color="teal">&gt;</font><br>
316&nbsp;&nbsp;&nbsp; <font color="teal">&lt;</font><font color="#3f7f7f">extensions</font><font color="teal">&gt;</font><br>
317&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="teal">&lt;</font><font color="#3f7f7f">extension</font><font color="teal">&gt;</font><br>
318&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="teal">&lt;</font><font color="#3f7f7f">groupId</font><font color="teal">&gt;</font><font color="black">org.apache.maven.wagon</font><font color="teal">&lt;/</font><font color="#3f7f7f">groupId</font><font color="teal">&gt;</font><br>
319&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="teal">&lt;</font><font color="#3f7f7f">artifactId</font><font color="teal">&gt;</font><font color="black">wagon-ftp</font><font color="teal">&lt;/</font><font color="#3f7f7f">artifactId</font><font color="teal">&gt;</font><br>
320&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="teal">&lt;</font><font color="#3f7f7f">version</font><font color="teal">&gt;</font><font color="black">1.0-alpha-6</font><font color="teal">&lt;/</font><font color="#3f7f7f">version</font><font color="teal">&gt;</font><br>
321&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="teal">&lt;/</font><font color="#3f7f7f">extension</font><font color="teal">&gt;</font><br>
322&nbsp;&nbsp;&nbsp; <font color="teal">&lt;/</font><font color="#3f7f7f">extensions</font><font color="teal">&gt;</font><br>
323&nbsp; <font color="teal">&lt;/</font><font color="#3f7f7f">build</font><font color="teal">&gt;</font><br>
324<font color="teal">&lt;/</font><font color="#3f7f7f">project</font><font color="teal">&gt;</font></p>
325
326<h4><a name="MavenObrPlugin-Concurrentupdates&amp;nbsp;"></a>Concurrent updates&nbsp;</h4>
327
328<p>As the obr file is remote, several uploads can occur at the same
329time. However, the obr repository is centralized in one file, so
330concurrent modification need to be avoided. To achieve this, the
331plug-in&nbsp; implement a locking systems. At each time the plug-in try
332to modify the file, it set a lock on it. If it can't take the lock, it
333will wait and retry. After 3 tries, the upload process failed.</p>
334
335<h3><a name="MavenObrPlugin-E:Cleaningthelocalobrrepository&amp;nbsp;"></a>E: Cleaning the local obr repository&nbsp;</h3>
336
337<p>Sometimes, you would like to clean your obr repository because it
338contains no more existing bundles. This case often occurs when
339artifacts were deleted manually from the maven repository. The plug-in
340provides a simple goal to look for missing bundle and to remove them
341from the obr repository.</p>
342
343<p>To launch this feature, launch the following command from a folder
344of one of your bundle 'mvn org.apache.felix:maven-obr-plugin:clean'.</p>
345
346<h2><a name="MavenObrPlugin-Howtheplugincomputethedescriptionofthebundle"></a>How the plug-in compute the description of the bundle</h2>
347
348<p>The description of the bundle comes from three different sources:</p>
349<ul>
350 <li>Bindex : Bindex is a tool analyzing&nbsp; a bundle manifest to generate OBR description</li>
351 <li>The Pom file : by analyzing the pom file, some information are collected (symbolic name ...)</li>
352 <li>The obr.xml file : this file contains customized description of the bundle</li>
353</ul>
354
355
356<p>In order to create the bundle description, the plug-in gets
357information from bindex, the pom.xml and the obr.xml file. Information
358can be overridden:<br>
359Bindex<br>
360| (overrides)<br>
361Pom.xml<br>
362| (overrides)<br>
363Obr.xml</p>
364
365<p>A warning message is displayed each time already existing
366information is overridden. In case of install-file goal, the
367information given by user (i.e.: artefactId, groupId, version) is
368considered as pom.xml properties.</p>
369
370<h2><a name="MavenObrPlugin-Knownissues&amp;limitations:"></a>Known issues &amp; limitations:</h2>
371
372<p>1.&nbsp;&nbsp;&nbsp; Do not support relative paths when you specify the repository descriptor in command line use.<br>
3732.&nbsp;&nbsp;&nbsp; obr.xml (file given by the user to describe some
374properties not found by Bindex) must be correct, because the plug-in
375does not check the syntax.</p>
376 </div>
377
378</body></html>