Note that there are some explanatory texts on larger screens.

plurals
  1. POModify Manifest file
    text
    copied!<p>I have an issue that after read two pages in google about it I can still not found the solution. I want just create a manifest file into my war file and introduce the version of my application. I´m using mave-war-plugin of apache. Using version 2.0.2 I achieve to create the manifest file, but just with the default information:</p> <pre><code> Manifest-Version: 1.0 Built-By: *********** Build-Jdk: 1.7.0_25 Created-By: Apache Maven 3.1.1 Archiver-Version: Plexus Archiver </code></pre> <p>The code of 2.0.2 is this one:</p> <pre><code> &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt; &lt;version&gt;2.0.2&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-Version&gt;2.1.0&lt;/Implementation-Version&gt; &lt;/manifestEntries&gt; &lt;/archive&gt; &lt;/configuration&gt; &lt;/plugin&gt; </code></pre> <p>But like I said, I cannot introduce the new attribute "Implementation-Version"</p> <p>And if I try to use the last version of the plugin I cannot create the manifest file at all.</p> <pre><code> &lt;plugin&gt; &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt; &lt;configuration&gt; &lt;archive&gt; &lt;manifestEntries&gt; &lt;Implementation-Version&gt;2.1.0&lt;/Implementation-Version&gt; &lt;/manifestEntries&gt; &lt;/archive&gt; &lt;/configuration&gt; &lt;/plugin&gt; </code></pre> <p>I´m using Maven 3 and I dont have create any MANIFEST.FM file in META-INF.</p> <p>I try to create my own MANIFEST.FM in my META-INF. with this template, to see if would be possible to just set the values but nothing as well. Like I said I try everything!</p> <pre><code> Specification-Title: **** Specification-Vendor: Company Name Implementation-Title: Portal web Implementation-Version: ${Implementation-Version} Implementation-Vendor:***** Build-Jdk: ${jdk.version} </code></pre> <p>After continue investigating, I see that my war file has 2 overlays. So after read about it I add into the main overlay, the plugin with the modification of the Manifest.</p> <pre><code> &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt; &lt;version&gt;2.0.2&lt;/version&gt; &lt;configuration&gt; &lt;archive&gt; &lt;manifestEntries&gt; &lt;Version&gt;${project.version}&lt;/Version&gt; &lt;/manifestEntries&gt; &lt;/archive&gt; &lt;/configuration&gt; &lt;/plugin&gt; </code></pre> <p>And in the child wars the plugin like.</p> <pre><code> &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt; &lt;version&gt;2.0.2&lt;/version&gt; &lt;/plugin&gt; </code></pre> <p>But then the manifest is created with the default values, and the maven folder with the pom.properties, but in the child wars nothing is created in the META-INF</p> <p>Regards.</p>
 

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