Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Allow project to provide custom deployment files (web.xml, jboss-web.xml, ...) #4

Closed
dlecan opened this Issue · 6 comments

2 participants

Damien Lecan Sam Spycher
Damien Lecan
Owner

web.xml
jboss-web.xml
...

Damien Lecan dlecan was assigned
Damien Lecan
Owner

Assets will have to be stored in PROJECT_ROOT/war.
Everything located in this folder will be embedded in the WAR file at root.
Eg: war/WEB-INF/jboss-web.xml will become WEB-INF/jboss-web.xml in the WAR file.

Damien Lecan dlecan closed this in 293fe19
Sam Spycher

Hi,

I would like to customize the MANIFEST.MF with this strategy, because I am creating an OSGI WAB and not only a WAR.

Unfortunately I get this error when packaging:

[error] {file:[project-path]/}[project-name]/*:package: java.util.zip.ZipException: duplicate entry: META-INF/MANIFEST.MF
[error] Total time: 5 s, completed Aug 6, 2012 11:28:55 AM

Ideally, I would like custom files from the war/ subdirectory to overwrite existing files. Would this be acceptable in your view?

Perhaps you can suggest a workaround for the current release?

Thanks,
Sam

Damien Lecan
Owner
Sam Spycher

I forked and patched myself, although I must admit the Scala code is probably hideous to any knowledgeable Scala developer :)

-> Shall I still submit a bug? I don't mind at all if you prefer to do this yourself, but I am also happy to submit a pull request.

Damien Lecan
Owner

Please submit a pull request.
Thanks for the contribution

How is generated your manifest?

Sam Spycher

We generate our OSGI bundle manifests (see http://en.wikipedia.org/wiki/OSGi#Bundles) with the maven bundle plugin: http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html. Using bundles instead of straightforward jars allows us to do crazy things with our applications, check it out! :)

Unfortunately our target container Virgo seems to be having problems with jars generated from this plugin. My suspicion is that this is a servlet 3 issue on Virgo, and has nothing to do with your plugin itself (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=385610)

Pull request:
#71

A note to the code: I don't have much experience at all on Scala, and couldn't figure out how to do the case distinction with the option variable more elegantly... perhaps you can improve this? Also, I made the search for MANIFEST.MF case-insensitive, since the spec for jar seems to reserve other cases also (see http://docs.oracle.com/javase/6/docs/technotes/guides/jar/jar.html, search for 'case-insensitive'), and I am unsure if certain containers would possibly also accept different casing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.