• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

packing maven-plugin not creating MANIFEST file

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic