Wrong META-INF/MANIFEST.MF file read when a global module in defined in JBoss EAP 6

Solution Verified - Updated -

Issue

  • The following code is used for reading META-INF/MANIFEST.MF file :
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
InputStream is = classLoader.getResourceAsStream("META-INF/MANIFEST.MF");
Manifest manifest = new Manifest(is);
  • This always points to the MANIFEST.MF file of jar present in Global module and not the jar present in application. How to get the real MANIFEST.MF contents?

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.