|
You are right and sorry for this quick description,
I was a bit under rush, so I just wanted to warn about this issue, I will prepare a more descriptive text and a sample project. Sample project mwar_129 attached,
The file param.jsp contains properties which are set in the pom.xml. Exemple : mvn clean package -Dprofile1=1 param.jsp : <c:set var="app_version" value="1.0-SNAPSHOT"/> mvn clean package -Dprofile2=1 param.jsp : <c:set var="app_version" value="1.0-SNAPSHOT"/> This was working well with war plugin version 2.0.2 and not with the alpha version. Olivier, this is due to the overlay overwriting strategy. Since this file is part of the webapp, it is copied by the ProjectPackagingTask (something like that)
If the target file alredy exists, it is not overwriten (first win strategy). However, we should copy the resources first (so that we can apply filtering). Unfortunately there is this stupid "do not copy if it is the webapp source" flag used for the war:inplace goal (this sounds very hackish to me btw) Thanks for taking care of this ; it would be good if we could chat a bit to see how we're gonna solve this. Ok Stephane, we have just to find the time to chat.
I have added an it for this issue. Stephane,
We proceed webResources before webappSourceDirectory. WarProjectPackagingTask#performPackaging
...
metainfDir.mkdirs();
handleWebResources( context );
handeWebAppSourceDirectory( context );
handleDeploymentDescriptors( context, webinfDir, metainfDir );
....
The easy fix is to change handeWebAppSourceDirectory before handleWebResources. well ... No
handleWebAppSourceDirectory won't filter anything. This is the default goal used to copy the content of src/main/webapp. A simple workaround for your attached it is to have :
<webResources> Note the empty <targetPath></targetPath> instead of <targetPath>.</targetPath> fix in rev 600742.
Filtering targetPath which contains only . or ./ because they cause failures in the PathSet recording. |
|||||||||||||||||||||||||||||||||||||||||||||||||
Your extract use 2.0.2 which is obviously wrong for what you are reporting. There are also chances that the type of resources your are filtering are linked to the issue.
I guess you want the issue resolved. If it's the case, provide a sample project to reproduce your issue, that's the strict minimum.