[ http://jira.codehaus.org/browse/MWAR-229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=229602#action_229602 ]
Julien HENRY commented on MWAR-229: ----------------------------------- @Dennis : look at the IT. There is NO plugin configuration (relying on default behaviour). In my real project, here is what I have in my corporate parent pom: {code} <pluginManagement> ... <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.1-beta-1</version> </plugin> ... </pluginManagement> {code} @Stephane : I tried to understand the code of the plugin and it seems most of the code is common between goal inplace and goal exploded. With exploded goal, the target folder where the webapp will be assembled (target/artifactId-XX) is initially empty but with inplace goal, the target folder (src/main/webapp) already contains the files of the current artifact. So I think the overlay algorithm should be different in the two cases. > war:inplace overwrite files of current project by those coming from overlay > war > ------------------------------------------------------------------------------- > > Key: MWAR-229 > URL: http://jira.codehaus.org/browse/MWAR-229 > Project: Maven 2.x WAR Plugin > Issue Type: Bug > Affects Versions: 2.1-beta-1 > Reporter: Julien HENRY > Attachments: MWAR-229-it.patch > > > I have a web application that depends on another WAR (overlay). According to > m-war-p documentation [1], when a file is present in both the application and > the dependent war, the current application is the priority. My understanding > is that when there are two files with same path > in both current application and dependent war, this is the file in current > application that should ultimately be taken to produce the final war. > Example: > current application contains the file src/main/webapp/WEB-INF/web.xml > dependent war contain a nearly empty file dependentWar.war!WEB-INF/web.xml > When I run mvn war:inplace I can read in the log: > [INFO] --- maven-war-plugin:2.1-beta-1:inplace (default-cli) @ myWebApp --- > ... > [INFO] Processing war project > [INFO] Processing overlay[ id com.mycompany:dependentWar] > ... > [INFO] File[WEB-INF/web.xml] belonged to overlay[currentBuild] so it will be > overwritten. > As a result the src/main/webapp/WEB-INF/web.xml file was overwritten in the > current application by the file coming from the dependent WAR. > If I run mvn war:exploded the result is correct and the file in > target/myCurrentWebApp-XX-SNAPSHOT/WEB-INF/web.xml is the one coming from the > current web app. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira