This might be a duplicate question, but after trying almost all the possible solutions, I am still unable to read the correct manifest file in my war. here is how my war file looks like;
- META-INF
- maven/com.abc.pack/console
- MANIFEST.MF
- context.xml
- WEB-INF
- classes com.abc -configurations -MainController
- lib -(multiple jars)
I want to access /META-INF/MANIFEST.MF at the root from the MainController class .
Used
getServletContext().getResourceAsStream("/META-INF/MANIFEST.MF")
and
this.getClass().getPackage().getImplementationVersion()
Both return null.
Tried several other solutions provided but it then read manifest file of the one of jars inside the lib folder but not the root.
Some solution also had the jcabi plugin to use read manifest but i want to try without a plugin support.
Can anyone help me find what I am doing wrong here?