Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0.0
-
Fix Version/s: 1.0.1
-
Component/s: Eclipse integration
-
Labels:None
-
Number of attachments :
Description
When deploying a web application that is a maven module with the generated parent POM to an embedded server in Eclipse, the following error occurs:
unable to assemble module
duplicate entry: com/rosa/breakfast/service/applicationContextBase.xml
This prevents the module from being deployed.
When the whole application is built with maven and deployed as a war, the error does not occur.
Revision 2227: the problem was caused by the superfluous declaration of a resources-tree in the generated parent POM. This caused the configuration files to be copied to 'target/classes' and 'target/test-classes', that are both on the classpath when Eclipse deploys a web application to an embedded application server. That caused the duplicate entry error.
The removal of the element in the expand-template for the parent POM fixed the error. Of course, the parent POM is generated when a new Mod4j project is created, and never regenerated. So the change must manually be performed in any parent POM already generated.
There is no easy way to write a Unit Test for this issue.