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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content