views:

34

answers:

1

Due to a design issue outside of my control, the MANIFEST.MF file populated by the Maven Archiver plugin (inside of Maven jar plugin) is overwritten.

Can I:

  1. move the file further down into the jar (i.e. from /META-INF to /src/home or something)
  2. Populate a different file with the contents that would normally go into MANIFEST.mf (i.e. src/home/something.txt)

I've tried to change the <manifestFile> property but that just merges the manifest from that location to the /META-INF location.

A: 

I don't really get the point - that's not a MANIFEST.MF anymore - but if you move the contents to, say src/main/resources/src/home/something.txt, src/home/something.txt will end up in the jar. Unless I misunderstood something, this is what you asked for. If it isn't, please clarify.

Pascal Thivent
I would actually just call it MANIFEST.MF(I didn't to clarify that the information inside the file was what i cared about)- my desire is to get the manifest information and put it in somewhere else that doesn't get overwritten-so I can use it to view the build information on the server it is eventually deployed to.If I could create a file called something.txt inside the jar with the exact contents of the MANIFEST.MF file- I would be happy.
rickjr82
@rickjr82: So you still want it to get generated, that's it? If yes, when does the generated MANIFEST.MF get overwritten exactly? That may be important for an alternative answer.
Pascal Thivent
It gets overwritten after it gets deployed to the server. I don't have access to this server and the deploy is a standalone process which takes the jar as an input.I do want it generated, I need the data.
rickjr82
@rickjr82: Then the above solution would work.
Pascal Thivent
What above solution?
rickjr82
I know I need to know how to move the contents of the manifest file, my question was how.
rickjr82
I just unjar, copy, rejar - not the most ellegant solution, but it works
rickjr82
(that was my solution)
rickjr82
@rickjr82: Erf, I misread one of your comment. I read *"I don't want it generated"* and I didn't suggest to unjar/rejar. Sorry for that.
Pascal Thivent