I have to build a project(Parent and EAR, which contains jar, ejb, and 2 war modules) from RAD 9.5 and with maven.
When I build a project from maven command-line, everything works fine. It's creating skinny wars archive that runs on WebSphere 8.5.5.
When trying to update project from RAD, or to export EAR I'm getting the file that is different and won't work, with ClassNotFoundException for one of dependencies of the EJB.
Looking further, I found out that there is a difference in MANIFEST.MF in classpath section. Maven project put there instances with lib/ prefix and m2e/RAD without, like this:
Class-Path: lib/log4j-api-2.6.jar lib/log4j-core-2.6.jar lib/junit-4.12.jar lib/hamcrest-core-1.3.
in pure maven and:
Class-Path: log4j-api-2.6.jar log4j-core-2.6.jar junit-4.12.jar hamcrest-core-1.3.
I've tried to update a project, played with settings in pom. This is the closest I've got to working application.
My current ejb plugin configuration:
<plugin>
<artifactId>maven-ejb-plugin</artifactId>
<version>2.5</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
<ejbVersion>3.1</ejbVersion>
</configuration>
</plugin>
And the exception(the lowest level):
Caused by: java.lang.ClassNotFoundException: org.apache.logging.log4j.LogManager
at java.net.URLClassLoader.findClass(URLClassLoader.java:600)
at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:243)
at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:786)
at java.lang.ClassLoader.loadClass(ClassLoader.java:764)
at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:741)
at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:62)
at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:58)
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:585)
at java.lang.ClassLoader.loadClass(ClassLoader.java:741)
... 75 more
I suppose that it's the issue, but I do not know hot to fix it.
Update: tried adding to manifest section:
<classpathPrefix>lib/</classpathPrefix>
same result.