If component A is a dependency for web application W, then the Web Module Settings tab allows the component output to be archived in a JAR archive prior to deployment.
Unfortunately, there is no way to supply a customized manifest file. If a manifest file is specified on the classpath as META-INF/MANIFEST.MF then the compile fails with the error "duplicate manifest".
Even though some of Sun's creations are obscure and not so heavily used, we are striving to make good use of them. One of these is the manifest file.
Would it be difficult to make IDEA note the existing MANIFEST file on the classpath of the component to be compressed, and to retain the manifest, or at least merge it, into the resulting JAR?
We are trying to avoid Ant integration and use IDEA's facilities wherever possible. We are planning to adapt our project structure such that all our projects are buildable by IDEA without Ant, but the manifest limitation currently poses a problem.
The suggestion for the fix might not be clear the way I put it. I'll try to rephrase it, this time in pseudocode:
jar component output:
precondition: component has been compiled, output is present in the configured output directory
if the output directory contains file "META-INF/MANIFEST.MF" (possibly with any case, as the JAR specification allows for manifest files with combined case)
create the JAR using the existing manifest file
else
create the JAR using a blank manifest file (only manifest-version and possibly idea footprint)
end if
end
or
jar component output:
precondition: same
compress the output directory
if the resulting archive contains an entry called "META-INF/MANIFEST.MF" (possibly case insensitive check) then do nothing
otherwise, add blank manifest file
end