aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes packing maven-plugin not creating MANIFEST file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "packing maven-plugin not creating MANIFEST file" Watch "packing maven-plugin not creating MANIFEST file" New topic
Author

packing maven-plugin not creating MANIFEST file

Prash Negu
Ranch Hand

Joined: Apr 20, 2009
Posts: 45
Hi,

I have maven project with packaging="maven-plugin". When we execute "install" phase on plugin, it works fine in eclipse IDE but, when I try to build it using Hudson, I get below error. It is not creating MANIFEST file. Do we need to explicetely configure anything to create manifest fil? Could you please help me to fix this issue?


----------------------------
Caused by: org.apache.maven.plugin.MojoExecutionException: Error assembling JAR
at org.apache.maven.plugin.jar.AbstractJarMojo.createArchive(AbstractJarMojo.java:223)
at org.apache.maven.plugin.jar.AbstractJarMojo.execute(AbstractJarMojo.java:235)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 27 more
Caused by: org.codehaus.plexus.archiver.ArchiverException: Manifest file: /opt/hudson/hudson_7070/slaves/slave1/workspace/devsupport-errorcode-plugin/target/classes/META-INF/MANIFEST.MF does not exist.
at org.codehaus.plexus.archiver.jar.JarArchiver.setManifest(JarArchiver.java:211)
at org.apache.maven.archiver.MavenArchiver.createArchive(MavenArchiver.java:510)
at org.apache.maven.plugin.jar.AbstractJarMojo.createArchive(AbstractJarMojo.java:216)
... 30 more

Thanks,
Prashant
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5842
    
    7

Usually, Maven creates the MANIFEST.MF file automatically when it creates a JAR. Unless you told the Jar plugin that you have a MANIFEST file that you would like to use. So does your pom.xml specific the MANIFEST.MF file? Also, in you source control system, where is the MANIFEST.MF file located?

My guess is that you manually placed a MANIFEST.MF file into the target directory and never did a "clean" within Eclipse, therefore Eclipse happily picks up the file you proved. When you build from Hudson, you get a fresh project directory with only the files from source control.


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: packing maven-plugin not creating MANIFEST file