You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Julien CARSIQUE <jc...@nuxeo.com> on 2011/01/27 15:04:31 UTC

maven-archiver merge policy on manifest file

Hello,

The maven-archiver documentation says:
<< The content of your own manifest file will be merged with the entries generated by Maven Archiver. If you specify an
entry in your own manifest file it will override the value generated by Maven Archiver. >>

In our case, we need the entries in our own manifest file being overridden with those generated by Maven Archiver.

We ask Maven to fill the MANIFEST at build time:
          <configuration>
            <archive>
              <manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
              <manifestEntries>
                <Bundle-Version>${eclipseVersion}-t${buildNumber}</Bundle-Version>
              </manifestEntries>
            </archive>
          </configuration>
On the other side, we have to set a default Eclipse compliant value in the source manifest file (the reason comes from
Eclipse which requires a MANIFEST.MF with a Bundle-Version in source code in order to be able to load the module as an
OSGI plugin).
But, after Maven build, it would be better to get the "true"/dynamic version in the produced jar instead of the
hard-coded version set in the source file.

Is it possible to invert this behavior and make the value generated by Maven Archiver override existing entries in our
own manifest file ?

Thanks,

-- 
Julien Carsique, Nuxeo (Paris, France)
www.nuxeo.com - The Open Source ECM Platform - www.nuxeo.org
Nuxeo ECM Stack - The Java EE, scalable, standard-based ECM Platform



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org