• 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

maven3 - adding a line to manifest.mf

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

i would like to add a line to my .jar that gets created:


but i get:

Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2:single (create-executable-jar) on project SoundBox-PlayerEngine: Unable to parse configuration of mojo org.apache.maven.plugins:maven-assembly-plugin:2.2:single for parameter manifest: Cannot find setter, adder nor field in org.apache.maven.archiver.ManifestConfiguration for 'manifestEntries' -> [Help 1]



i googled for the api and found that the class ManifestConfiguration does have the set/get-ManifestEntry method - but the javadoc was for maven 2. Is this method no longer supported? How can i do this?

Thanks
 
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
Look at the syntax for the Archiver again: http://maven.apache.org/shared/maven-archiver/index.html
Note that the <manifestEntries> entries are NOT embedded within <manifest> entries.
 
olze oli
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks, its running without failure but its not adding the line
 
Peter Johnson
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
Try running mvn with the -X option (redirect the output to s file - there is a lot of it) and verify that the SPI-Consumer value is getting passed to the Assembly plugin. Also, post the contents of the resulting MANIFEST.MF file.

Another thought - try adding in at least one of the <manifest> entries, such as addDefaultImplementationEntries. Perhaps the manifest is not created unless you have at least one of those entries.
 
olze oli
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
its pretty easy to do this... i got this solved now:


simply put any key/value pairs in <instructions>, thats it (like: <hello>world</hello> which leads to: "hello: world" in the manifest.mf)
reply
    Bookmark Topic Watch Topic
  • New Topic