• Post Reply Bookmark Topic Watch Topic
  • New Topic

packing maven-plugin not creating MANIFEST file  RSS feed

Prash Negu
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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

Peter Johnson
Posts: 5856
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!