[
https://jira.codehaus.org/browse/MGWT-293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=283987#comment-283987
]
Constantino Cronemberger commented on MGWT-293:
-----------------------------------------------
I have investigated the change from version 2.2 to 2.3 in the method
RunMojo.setupExplodedWar and found that the problem was introduced when the
call to:
FileUtils.copyDirectoryStructure( warSourceDirectory, hostedWebapp );
was replaced by:
String excludes = StringUtils.join( DEFAULTEXCLUDES, "," );
FileUtils.copyDirectory( warSourceDirectory, hostedWebapp, "**", excludes );
I also saw that FileUtils does not have a method copyDirectoryStructure that
takes the excludes parameter, on the other hand the method copyDirectory
flattens the directory structure.
The workaround most people are using is to use the maven-war-plugin to do this
job properly:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>exploded</goal>
</goals>
</execution>
</executions>
<configuration>
<webappDirectory>\${webappDirectory}</webappDirectory>
<webXml>src/main/webapp/WEB-INF/web.xml</webXml>
</configuration>
</plugin>
The problem is that this option is much slower than calling the method
copyDirectoryStructureIfModified.
> src/main/webapp file hierarchy is flattened with copyWebapp instead of
> preserving the hierarchy leaving web.xml at top level rather than in WEB-INF
> ---------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: MGWT-293
> URL: https://jira.codehaus.org/browse/MGWT-293
> Project: Maven 2.x GWT Plugin
> Issue Type: Bug
> Reporter: Gabe Beged-Dov
>
> In the 2.3.0-SNAPSHOT, copyWebapp flattens the hierarchy in src/main/webapp
> when copying to the destination. This puts the web.xml at the root level
> rather than in WEB-INF/web.xml. This seems to be an issue with the plexus
> fileUtil call which takes the filtered list of files that aren't excluded and
> copies them to the destination directory without preserving the relative
> hierarchy.
> The workaround I've found is to use war:exploded but this is not optimal.
> This may be related to http://jira.codehaus.org/browse/MGWT-235 which is
> shown as closed...
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email