Note that there are some explanatory texts on larger screens.

plurals
  1. POError while adding SVN revision in JAR manifest with Maven and maven-bundle-plugin
    primarykey
    data
    text
    <p>I am trying to add SVN revision number in the manifest of my projects. To do so, I used Maven build number plugin and added the following lines in my Super POM:</p> <pre class="lang-xml prettyprint-override"><code>&lt;!-- Gets the SVN revision number --&gt; &lt;plugin&gt; &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt; &lt;artifactId&gt;buildnumber-maven-plugin&lt;/artifactId&gt; &lt;version&gt;1.1&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;phase&gt;validate&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;create&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;configuration&gt; &lt;doCheck&gt;false&lt;/doCheck&gt; &lt;doUpdate&gt;false&lt;/doUpdate&gt; &lt;providerImplementations&gt; &lt;svn&gt;javasvn&lt;/svn&gt; &lt;/providerImplementations&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;!-- Add the SVN revision number in the manifest (works on Hudson only) --&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.1&lt;/version&gt; &lt;configuration&gt; &lt;archive&gt; &lt;manifest&gt; &lt;addDefaultImplementationEntries&gt;true&lt;/addDefaultImplementationEntries&gt; &lt;/manifest&gt; &lt;manifestEntries&gt; &lt;Implementation-Build&gt;${buildNumber}&lt;/Implementation-Build&gt; &lt;/manifestEntries&gt; &lt;/archive&gt; &lt;/configuration&gt; &lt;/plugin&gt; </code></pre> <p>Note the configuration:</p> <pre class="lang-xml prettyprint-override"><code>&lt;doCheck&gt;false&lt;/doCheck&gt; &lt;doUpdate&gt;false&lt;/doUpdate&gt; </code></pre> <p>I did that on purpose because if I have local modifications "doCheck" will prevent me from compiling (and I want to compile and test BEFORE commiting my work).</p> <p>The "doUpdate" is also a problem for me as I don't necessarily want to update the code from repository. Same reason than above, I want to test locally before commiting (and potentially solving conflicts).</p> <p>My problem is that in the manifest, what appears is:</p> <pre class="lang-xml prettyprint-override"><code>Implementation-Build: ${buildNumber} </code></pre> <p>Thus the variable is not interpreted. What did I miss?</p> <p>Thanks</p> <p><strong>Edit:</strong> The problem is in fact with maven-bundle-plugin. I use it in my projets to generate OSGi bundles.</p> <p>The POM packaging of the projects is thus:</p> <pre class="lang-xml prettyprint-override"><code>&lt;packaging&gt;bundle&lt;/packaging&gt; </code></pre> <p>Instead of:</p> <pre class="lang-xml prettyprint-override"><code>&lt;packaging&gt;jar&lt;/packaging&gt; </code></pre> <p>I guess this messes with the Maven lifecycle. When I remove the maven-bundle-plugin everything works fine. But I cannot remove it as my applications are OSGi apps.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload