• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

maven3 - adding a line to manifest.mf

 
olze oli
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • 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
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • 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: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks, its running without failure but its not adding the line
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • 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: 149
  • Mark post as helpful
  • send pies
  • 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)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic