* when I run "mvn clean install" on the PD project from the command line or via M2Eclipse I see that the resource file "src\test\resources\META-INF\persistence.xml" has been copied to target\test-classes\META-INF as expected, and the PD.jar file under the target directory has excluded the file, again as expected.
* When I examine my local Maven repository, the PD.jar file stored there looks identical to that under the target directory, again as expected.
* When I run "mvn clean install" on the UI project and examine the UI.war file under the target directory, I again see the expected version of the PD.jar.
However, the problem comes when I go to publish this project to my integrated Tomcat server. The observable symptoms on server start-up were obscure, but were eventually traced back to the fact that the PD.jar that gets published to the server is different to that contained in the UI.war file, as it contains the expected PD content *plus* the files and folders stored under PD\src\test\resources, which by Maven convention are normally excluded. Why?? I would expect that right-clicking on my server in Eclipse and selecting "publish" should delegate the build process to M2Eclipse and explode the resulting WAR file into its deployment directory, but the WAR file generated via the mvn CLI command or M2Eclipse is correct whereas the content deployed to the server via "publish" or "start server" is not. Are there configurations settings somewhere that we've broken wrt how the server publishing process operates that I can correct maybe?
Any advice appreciated!
Joined: Mar 31, 2009
Problem solved thanks to our friendly Solutions Architect, as follows:
* Right-click on the UI project in Eclipse
* Select Maven -> Disable Workspace Resolution
Hadn't been aware of this feature before, but it seems that M2Eclipse had figured out that the PD module was a local project and so was publishing that instead of fetching the PD.jar from the Maven repository. Mystery solved!