• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

add manifest.mf to jar file using maven

 
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

i have the following in my pom.xml ( not copying the entire pom file )



i did some reading and found the above code in apache site to include manifest file to maven, but it doesn't seem to be working. Am I missing something ?
I use the following command to build jar file

> mvn clean install

it cleans, compiles, run testcases and create jar file. If i open the jar file and look for the manifest file, i dont see the entries i made in "src/main/resources/META-INF/MANIFEST.MF", the manifest i find in the jar is auto-generated by maven i guess. I want to add the manifest.m from the resources folder to be added to the generated jar. Any help on this is appreciated.


this is what i have in my manifest



thanks,
Raj
 
Saloon Keeper
Posts: 28076
198
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maven normally builds the manifest for you. In this particular case, it looks like you probably need one of the plugins that builds an executable jar with embedded jars. Although you're missing a main-class declaration, so the classpath declaration is pretty meaningless. Of course, it it's a WAR, you wouldn't have one, but then you also wouldn't put a classpath in the manifest, either. WAR classpaths are defined as part of the WAR architecture definition.

Exactly what goes into a manifest, and whether it's synthesized or included from a model manifest file depends on what type of artifact you intend to build. That will determine what plugins you need to do the build and the documentation on the plugins should indicate what it takes to build a proper manifest.

 
Rajeev Ravindran
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
got it working
 
Arthur, where are your pants? Check under this tiny ad.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic