Maven 2.x WAR Plugin

war:inplace overwrites main web.xml when using alternate maven.war.webxml if alternate is newer

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Not A Bug
  • Affects Version/s: 2.1-alpha-2
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    1

Description

This appears to be present in trunk as well and seems to be happening in WarProjectPackagingTask.handleDeploymentDescriptors since it is not aware that the project is using an alternate web.xml.

It may also be related to MWAR-95, but is a slightly different use case.

(from example zip)
1. touch src/main/webapp/WEB-INF/*web.xml # synchronize times on both web.xml files
2. mvn war:inplace
3. cat src/main/webapp/WEB-INF/web.xml # shows Main webXml
4. touch src/main/webapp/WEB-INF/alternate.web.xml # update time on alternate defined using maven.war.webxml
5. mvn war:inplace
6. cat src/main/webapp/WEB-INF/web.xml # shows Alternate webXml

Activity

Hide
Dennis Lundberg added a comment -

To me this is working as designed. war:inplace does what you are telling it to, in this case (points 4-6) you are telling it to copy alternate.web.xml "inplace" which means that it ends up in src/main/webapp/WEB-INF/web.xml.

Show
Dennis Lundberg added a comment - To me this is working as designed. war:inplace does what you are telling it to, in this case (points 4-6) you are telling it to copy alternate.web.xml "inplace" which means that it ends up in src/main/webapp/WEB-INF/web.xml.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: