You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "pluto.bing.liu" <pl...@gmail.com> on 2011/12/08 09:20:21 UTC

How to merge the manifest.mf

Hi,
I use my own manifest.mf in the POM.xml like this:
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.2</version>
<configuration>
  <archive>
  	<manifestFile>META-INF/MANIFEST.MF</manifestFile>
  	<manifestEntries>
  	   <Bundle-Version>${project.version}</Bundle-Version>
  	</manifestEntries>
  </archive>
</configuration>
</plugin>
But, when the operation completed, the manifest.mf is not changed.How to
merge?Thanks

--
View this message in context: http://maven.40175.n5.nabble.com/How-to-merge-the-manifest-mf-tp5058051p5058051.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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


Re: How to merge the manifest.mf

Posted by "pluto.bing.liu" <pl...@gmail.com>.
Thank you very much.

--
View this message in context: http://maven.40175.n5.nabble.com/How-to-merge-the-manifest-mf-tp5058051p5060817.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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


Re: How to merge the manifest.mf

Posted by "pluto.bing.liu" <pl...@gmail.com>.
Hi,
I try it, but the result is not my expected.My Directory like this:
---------------------------------------------------------------------------
-src
  -main
     -java
        -‘sources’
     -resources
        -‘other resource files’
-META-INF
  -MANIFEST.MF
  -spring
      -‘some configuration files’
-target
-pom.xml
---------------------------------------------------------------------------
My MANIFEST.MF is :
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Runtime
Bundle-SymbolicName: ${user.project.symbolicName}
Bundle-Version: 1.0.0.qualifier
Import-Package: org.eclipse.osgi.framework.console;version="1.1.0",
 org.osgi.framework;version="1.3.0",
 org.slf4j
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.springframework.osgi.core;bundle-version="1.2.1"

Now i want to modify the 'Bundle-Version' use <manifestEntries>.
My POM fragment like this :
<build>
  	<plugins>
  		<plugin>
  			<artifactId>maven-jar-plugin</artifactId>
  			<version>2.3</version>
  			<configuration>
  				<archive>
  					<manifestFile>META-INF/MANIFEST.MF</manifestFile>
  					<addMavenDescriptor>false</addMavenDescriptor>
  				</archive>
  			</configuration>
  		</plugin>
  	</plugins>
  	<resources>
  		<resource>
  			<directory>./</directory>
  			<includes>
				<include>META-INF/**/*</include>
			</includes>
  			<excludes>
  				<exclude>**/*/.svn</exclude>
  			</excludes>
  		</resource>
  	</resources>
  </build>
Can you tell me the JIRA's url?


--
View this message in context: http://maven.40175.n5.nabble.com/How-to-merge-the-manifest-mf-tp5058051p5060921.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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


Re: How to merge the manifest.mf

Posted by Wayne Fay <wa...@gmail.com>.
> But, when the operation completed, the manifest.mf is not changed.How to
> merge?Thanks

First off, the usual location for this file is
src/main/resources/META-INF/MANIFEST.MF. So my first try would be to
move the file there and change the configuration to see if that does
anything.

Then I would wonder where you are coming up with the idea that the
manifest file is not changing? Where exactly are you seeing that?

Try running "mvn package", then unzipping the resulting jar file and
looking at that manifest file (directly from the jar). That file
should have the Bundle-Version you specified in it. The manifest file
in /target may or may not, depending on where (and when) you are
looking at it.

If you're doing all this and still not seeing the results you expect,
I would create a sample project that demonstrates this issue and
attach it to a JIRA so someone can look at it.

Wayne

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