File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

packing maven-plugin not creating MANIFEST file

Prash Negu
Ranch Hand

Joined: Apr 20, 2009
Posts: 46

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(
at org.apache.maven.plugin.jar.AbstractJarMojo.execute(
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(
... 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(
at org.apache.maven.archiver.MavenArchiver.createArchive(
at org.apache.maven.plugin.jar.AbstractJarMojo.createArchive(
... 30 more

Peter Johnson

Joined: May 14, 2008
Posts: 5852

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
subject: packing maven-plugin not creating MANIFEST file
It's not a secret anymore!