Mod4j: Modeling for Java using Domain Specific Languages

unable to assemble module duplicate entry: com/rosa/breakfast/service/applicationContextBase.xml

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0.0
  • Fix Version/s: 1.0.1
  • Component/s: Eclipse integration
  • Labels:
    None
  • Number of attachments :
    0

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.

Activity

Hide
Eric Jan Malotaux added a comment - - edited

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.

Show
Eric Jan Malotaux added a comment - - edited 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.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: