WEB-INF/MANIFEST.MF not being used to configure classloading
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.x
Issue
- Adding the dependent jar file entries in
MANIFEST.MF
but the jars are not being picked up in the classpath. However, when thejboss-deployment-structure.xml
is added with the dependent jar file entries manually it works. Why the jars are not being picked fromMANIFEST.MF
.
The EAR structure is as below:
- *.jar
- app.war
- WEB-INF/MANIFEST.MF
Resolution
- Move the custom MANIFEST.MF to META-INF, where it needs to be.
Root Cause
As the manifest file (MANIFEST.MF) belongs to Java archives in general (JARs, WARs etc.) rather than a web-specific thing, it needs to go into META-INF not WEB-INF.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments