Hi Marcel,
The use case is unfortunately complicated by the fact that I am dealing with 10-15yr legacy code that I am trying to make work in an m2e environment, and do not have the ability to modify some critical things:
The full EAR is actually composed of 2 WARS and 2 EJBs. We can ignore the EJBs for the moment. Unfortunately, the WARs (WebApp-A and WebApp-B) have to use Parent-First classloading due to the way the codebase was written (and not maintained) over the last 10 years; changing them to parent-last is a significant undertaking that cannot be done at the moment. Additionally, the WARs have some conflicting dependencies (ex: Spring 1 in one app and Spring 2 in the other). Similarly, updating dependencies is not feasible at the time.
Based on the above criteria, I cannot use skinnywars, as the classloader for the EAR/lib folder will not have visibility on any config files present in the WEB-INF/lib folder. I'm okay with that. I want to deploy the two WARs independently.
My problem is that a spring config of WebApp-B has a classpath dependency on 2 jars from WebApp-A:
WebApp-B spring-servlet.xml:
<import resource="classpath:strongauth-spring-servlet-app.xml"/>
The original goal when doing this is that WebApp-B is a common WebApp that is used in several different EARs. But the configuration for WebAppB should be defined by WebAppA.
WebAppA has the "strongauth-spring-servlet-app.xml" file (and its referenced beans) in 2 jars (ComConfiguration.jar and ComCommon.jar).
So, I am trying to figure out how to package my EAR such that I can give WebAppB visibility over the ComConfiguration and ComCommon jars from WebAppA. By definition, WebAppB does not have an explicit maven dependency on anything from WebAppA (since it is up to the EAR creator to provide classpath access to the config file(s)). My first instinct was to place these two jars in the EAR/lib folder such that the classloader for WebAppB will automatically have access to them. And this is where I started having trouble with my deployment from within Eclipse.
I am using 'run server with resources within the workspace' and 'minimize application files copied to the server' checked. Additionally, I am also using the -Xquickstart option, but I don't believe that has much bearing.
I checked the deployment.xml and the losseconfig.xmi files, and do not see the jarModules listed in the deployment.xml file. However, I do see them in the looseconfig.xmi file (the ComCommons.jar and ComConfiguration.jar with the appropriate binariesPath and resourcesPath definitions).
So then, why don't I see those resources anywhere in my classloader viewer?
I'm losing my mind. Every configuration *seems* right, but WebSphere is just toying with me. I also tried to unselect the "minimize application files" option, but to no avail.
Any thoughts or insights would be greatly appreciated.
Thanks,
Eric