Description
BUG REPORT INFORMATION
Maven Plugin version: 2.9.2
Maven version: 3.6.3
Product : BW/BWCE
Product version: 2.8.1
Component: Maven build plugin
- If you try to build a maven shared module that is dependant on Maven JAR dependency that has no MANIFEST.MF such as javax.inject (https://mvnrepository.com/artifact/javax.inject/javax.inject/1) one the most used dependency all over the world it failed because line 196 of BwModulePackageMojo.java
Caused by: java.lang.Exception: Failed to get Manifest for - javax.inject-1.jar. Please verify if jar file is valid, the MANIFEST.MF should be first or second entry in the jar file. Use Command - jar tf <Jar_File_Path> to verify.
at com.tibco.bw.maven.plugin.module.BWModulePackageMojo.addDependencies(BWModulePackageMojo.java:196)
at com.tibco.bw.maven.plugin.module.BWModulePackageMojo.execute(BWModulePackageMojo.java:115)
... 22 more
This is because we try to read the MANIFEST.MF to check if the module is a Shared Module or not, we should avoid the crash because no MANIFEST.MF, could not be a problem and we should work with it, and change the current code in case if Manifest is null instead of raising the Exception just considering this is not a Shared Module and move forward putting the dependency into the lib folder of the resulting JAR.
Regards,