Hi Eric,
Could you please describe which 'publish settings' you use: 'run server with resources within the workspace' or 'run server with resources on server' and whether you have the 'minimize application files copied to the server' checkbox enabled.
There are some things that I find odd in your setup:
- why do you declare <jarModule> tags in you ear setup, what is the maven packaging type of these dependencies? You don't need a <jarModule> for regular jars, adding them as dependencies is sufficient
- you talk about the dependencies of your war module being added to your ear/lib directory. This is not how maven works, if you declare an artifact of type war as a dependency, that dependency doesn't have transitive dependencies (they are packaged within the WEB-INF/lib by default)
- specifying both a <defaultLibBundleDir> and <bundleDir> seems redundant, for me just the <defaultLibBundleDir>lib</defaultLibBundleDir> is enough for us to get dependencies packaged inside ear/lib
We use eclipse mars with m2e and ibm wdt 8.5.5070 without these issues. We use the run from workspace with minimize files copied enabled, which saves you the republishing step most of the time.
You might want to take a look at the following file that wdt generates, it contains a description of the deployed ear as it is presented to your local websphere server and has been incredibly helpful to me on several occasions:
<workspace>\.metadata\.plugins\com.ibm.etools.wrd.websphere.v85\looseconfigurations\<servername>\<applicationname>\looseconfig.xmi
For completeness and to remove the 'magic' from how all this works, you can start following the deployment settings here:
<wasprofile>\config\cells\<cellname>\applications\<applicationname>.ear\deployments\<applicationname>\deployment.xml
This file is used by websphere to describe an installed application, and in the 'run from workspace' scenario it contains a property called 'was.loose.config' which points to the looseconfig.xmi file.
The effect of opening and closing projects will be reflected in the looseconfig.xmi because you see either a reference to your project's target/classes folder, or a reference to your local repository.
I hope the above gives you some leads in getting this working more smoothly for you, but know that it is possible.
Regards, Marcel Schutte