You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jean-Yves LEBLEU (JIRA)" <ji...@codehaus.org> on 2007/11/06 16:21:36 UTC

[jira] Created: (MWAR-129) WebRessource not filtered

WebRessource not filtered
-------------------------

                 Key: MWAR-129
                 URL: http://jira.codehaus.org/browse/MWAR-129
             Project: Maven 2.x War Plugin
          Issue Type: Bug
    Affects Versions: 2.1-alpha-1
         Environment: windows, maven 2.0.7
            Reporter: Jean-Yves LEBLEU


Previously Webressources were correctly filtered and are not filtered any more 

See above extract from pom.xml 
      <plugin>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.0.2</version>
        <configuration>
          <warSourceDirectory>src/main/webapp</warSourceDirectory>
          <webResources>
            <resource>
              <filtering>true</filtering>
              <directory>src/main/webapp</directory>
              <targetPath>.</targetPath>
              <includes>
                <include>param.jsp</include>
              </includes>
            </resource>
          </webResources>
        </configuration>
      </plugin>

-- 
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

        

[jira] Commented: (MWAR-129) WebRessource not filtered

Posted by "Stephane Nicoll (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MWAR-129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_114764 ] 

Stephane Nicoll commented on MWAR-129:
--------------------------------------

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.

> WebRessource not filtered
> -------------------------
>
>                 Key: MWAR-129
>                 URL: http://jira.codehaus.org/browse/MWAR-129
>             Project: Maven 2.x War Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1-alpha-1
>         Environment: windows, maven 2.0.7
>            Reporter: Jean-Yves LEBLEU
>            Assignee: Olivier Lamy
>             Fix For: 2.1-alpha-2
>
>         Attachments: mwar_129.zip
>
>
> Previously Webressources were correctly filtered and are not filtered any more 
> See above extract from pom.xml 
>       <plugin>
>         <artifactId>maven-war-plugin</artifactId>
>         <version>2.0.2</version>
>         <configuration>
>           <warSourceDirectory>src/main/webapp</warSourceDirectory>
>           <webResources>
>             <resource>
>               <filtering>true</filtering>
>               <directory>src/main/webapp</directory>
>               <targetPath>.</targetPath>
>               <includes>
>                 <include>param.jsp</include>
>               </includes>
>             </resource>
>           </webResources>
>         </configuration>
>       </plugin>

-- 
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

        

[jira] Commented: (MWAR-129) WebRessource not filtered

Posted by "Stephane Nicoll (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MWAR-129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_114975 ] 

Stephane Nicoll commented on MWAR-129:
--------------------------------------

well ... No :)

handleWebAppSourceDirectory won't filter anything. This is the default goal used to copy the content of src/main/webapp.

> WebRessource not filtered
> -------------------------
>
>                 Key: MWAR-129
>                 URL: http://jira.codehaus.org/browse/MWAR-129
>             Project: Maven 2.x War Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1-alpha-1
>         Environment: windows, maven 2.0.7
>            Reporter: Jean-Yves LEBLEU
>            Assignee: Olivier Lamy
>             Fix For: 2.1-alpha-2
>
>         Attachments: mwar_129.zip
>
>
> Previously Webressources were correctly filtered and are not filtered any more 
> See above extract from pom.xml 
>       <plugin>
>         <artifactId>maven-war-plugin</artifactId>
>         <version>2.0.2</version>
>         <configuration>
>           <warSourceDirectory>src/main/webapp</warSourceDirectory>
>           <webResources>
>             <resource>
>               <filtering>true</filtering>
>               <directory>src/main/webapp</directory>
>               <targetPath>.</targetPath>
>               <includes>
>                 <include>param.jsp</include>
>               </includes>
>             </resource>
>           </webResources>
>         </configuration>
>       </plugin>

-- 
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

        

[jira] Commented: (MWAR-129) WebRessource not filtered

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MWAR-129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_115741 ] 

Olivier Lamy commented on MWAR-129:
-----------------------------------

A simple workaround for your attached it is to have :

<webResources>
<resource>
<filtering>true</filtering>
<directory>src/main/webapp</directory>
<targetPath></targetPath>
<includes>
<include>param.jsp</include>
</includes>
</resource>
</webResources>

Note the empty <targetPath></targetPath> instead of <targetPath>.</targetPath>

> WebRessource not filtered
> -------------------------
>
>                 Key: MWAR-129
>                 URL: http://jira.codehaus.org/browse/MWAR-129
>             Project: Maven 2.x War Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1-alpha-1
>         Environment: windows, maven 2.0.7
>            Reporter: Jean-Yves LEBLEU
>            Assignee: Olivier Lamy
>             Fix For: 2.1-alpha-2
>
>         Attachments: mwar_129.zip
>
>
> Previously Webressources were correctly filtered and are not filtered any more 
> See above extract from pom.xml 
>       <plugin>
>         <artifactId>maven-war-plugin</artifactId>
>         <version>2.0.2</version>
>         <configuration>
>           <warSourceDirectory>src/main/webapp</warSourceDirectory>
>           <webResources>
>             <resource>
>               <filtering>true</filtering>
>               <directory>src/main/webapp</directory>
>               <targetPath>.</targetPath>
>               <includes>
>                 <include>param.jsp</include>
>               </includes>
>             </resource>
>           </webResources>
>         </configuration>
>       </plugin>

-- 
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

        

[jira] Commented: (MWAR-129) WebRessource not filtered

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MWAR-129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_114971 ] 

Olivier Lamy commented on MWAR-129:
-----------------------------------

Stephane,
We proceed webResources before webappSourceDirectory.
{code:java}
WarProjectPackagingTask#performPackaging
        ...
        metainfDir.mkdirs();
        handleWebResources( context );        
        handeWebAppSourceDirectory( context );
        handleDeploymentDescriptors( context, webinfDir, metainfDir );
        ....
{code} 
The easy fix is to change handeWebAppSourceDirectory before handleWebResources.
IMHO it makes senses.
WDYT ?

> WebRessource not filtered
> -------------------------
>
>                 Key: MWAR-129
>                 URL: http://jira.codehaus.org/browse/MWAR-129
>             Project: Maven 2.x War Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1-alpha-1
>         Environment: windows, maven 2.0.7
>            Reporter: Jean-Yves LEBLEU
>            Assignee: Olivier Lamy
>             Fix For: 2.1-alpha-2
>
>         Attachments: mwar_129.zip
>
>
> Previously Webressources were correctly filtered and are not filtered any more 
> See above extract from pom.xml 
>       <plugin>
>         <artifactId>maven-war-plugin</artifactId>
>         <version>2.0.2</version>
>         <configuration>
>           <warSourceDirectory>src/main/webapp</warSourceDirectory>
>           <webResources>
>             <resource>
>               <filtering>true</filtering>
>               <directory>src/main/webapp</directory>
>               <targetPath>.</targetPath>
>               <includes>
>                 <include>param.jsp</include>
>               </includes>
>             </resource>
>           </webResources>
>         </configuration>
>       </plugin>

-- 
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

        

[jira] Updated: (MWAR-129) WebRessource not filtered

Posted by "Jean-Yves LEBLEU (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MWAR-129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Yves LEBLEU updated MWAR-129:
----------------------------------

    Attachment: mwar_129.zip

Sample project,

The file param.jsp contains properties which are set in the pom.xml.
when you run mvn clean package, these properties are replaced by the one defined in the corresponding profile.

Exemple :

mvn clean package -Dprofile1=1

param.jsp :

<c:set var="app_version" value="1.0-SNAPSHOT"/>
<c:set var="app_mainStyleSheet" value="profile1.css"/>

mvn clean package -Dprofile2=1

param.jsp :

<c:set var="app_version" value="1.0-SNAPSHOT"/>
<c:set var="app_mainStyleSheet" value="profile2.css"/>


This was working well with war plugin version 2.0.2 and not with the alpha version.

> WebRessource not filtered
> -------------------------
>
>                 Key: MWAR-129
>                 URL: http://jira.codehaus.org/browse/MWAR-129
>             Project: Maven 2.x War Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1-alpha-1
>         Environment: windows, maven 2.0.7
>            Reporter: Jean-Yves LEBLEU
>             Fix For: 2.1-alpha-2
>
>         Attachments: mwar_129.zip
>
>
> Previously Webressources were correctly filtered and are not filtered any more 
> See above extract from pom.xml 
>       <plugin>
>         <artifactId>maven-war-plugin</artifactId>
>         <version>2.0.2</version>
>         <configuration>
>           <warSourceDirectory>src/main/webapp</warSourceDirectory>
>           <webResources>
>             <resource>
>               <filtering>true</filtering>
>               <directory>src/main/webapp</directory>
>               <targetPath>.</targetPath>
>               <includes>
>                 <include>param.jsp</include>
>               </includes>
>             </resource>
>           </webResources>
>         </configuration>
>       </plugin>

-- 
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

        

[jira] Commented: (MWAR-129) WebRessource not filtered

Posted by "Stephane Nicoll (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MWAR-129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_113176 ] 

Stephane Nicoll commented on MWAR-129:
--------------------------------------

whaouh, that helps!

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.

> WebRessource not filtered
> -------------------------
>
>                 Key: MWAR-129
>                 URL: http://jira.codehaus.org/browse/MWAR-129
>             Project: Maven 2.x War Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1-alpha-1
>         Environment: windows, maven 2.0.7
>            Reporter: Jean-Yves LEBLEU
>             Fix For: 2.1-alpha-2
>
>
> Previously Webressources were correctly filtered and are not filtered any more 
> See above extract from pom.xml 
>       <plugin>
>         <artifactId>maven-war-plugin</artifactId>
>         <version>2.0.2</version>
>         <configuration>
>           <warSourceDirectory>src/main/webapp</warSourceDirectory>
>           <webResources>
>             <resource>
>               <filtering>true</filtering>
>               <directory>src/main/webapp</directory>
>               <targetPath>.</targetPath>
>               <includes>
>                 <include>param.jsp</include>
>               </includes>
>             </resource>
>           </webResources>
>         </configuration>
>       </plugin>

-- 
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

        

[jira] Closed: (MWAR-129) WebRessource not filtered

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MWAR-129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy closed MWAR-129.
-----------------------------

    Resolution: Fixed

fix in rev 600742.
Filtering targetPath which contains only . or ./ because they cause failures in the PathSet recording.

> WebRessource not filtered
> -------------------------
>
>                 Key: MWAR-129
>                 URL: http://jira.codehaus.org/browse/MWAR-129
>             Project: Maven 2.x War Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1-alpha-1
>         Environment: windows, maven 2.0.7
>            Reporter: Jean-Yves LEBLEU
>            Assignee: Olivier Lamy
>             Fix For: 2.1-alpha-2
>
>         Attachments: mwar_129.zip
>
>
> Previously Webressources were correctly filtered and are not filtered any more 
> See above extract from pom.xml 
>       <plugin>
>         <artifactId>maven-war-plugin</artifactId>
>         <version>2.0.2</version>
>         <configuration>
>           <warSourceDirectory>src/main/webapp</warSourceDirectory>
>           <webResources>
>             <resource>
>               <filtering>true</filtering>
>               <directory>src/main/webapp</directory>
>               <targetPath>.</targetPath>
>               <includes>
>                 <include>param.jsp</include>
>               </includes>
>             </resource>
>           </webResources>
>         </configuration>
>       </plugin>

-- 
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

        

[jira] Commented: (MWAR-129) WebRessource not filtered

Posted by "Jean-Yves LEBLEU (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MWAR-129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_113184 ] 

Jean-Yves LEBLEU commented on MWAR-129:
---------------------------------------

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. 
I use 2.0.2 as the filtering of webressouces is not working anymore with alpha version.

> WebRessource not filtered
> -------------------------
>
>                 Key: MWAR-129
>                 URL: http://jira.codehaus.org/browse/MWAR-129
>             Project: Maven 2.x War Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1-alpha-1
>         Environment: windows, maven 2.0.7
>            Reporter: Jean-Yves LEBLEU
>             Fix For: 2.1-alpha-2
>
>
> Previously Webressources were correctly filtered and are not filtered any more 
> See above extract from pom.xml 
>       <plugin>
>         <artifactId>maven-war-plugin</artifactId>
>         <version>2.0.2</version>
>         <configuration>
>           <warSourceDirectory>src/main/webapp</warSourceDirectory>
>           <webResources>
>             <resource>
>               <filtering>true</filtering>
>               <directory>src/main/webapp</directory>
>               <targetPath>.</targetPath>
>               <includes>
>                 <include>param.jsp</include>
>               </includes>
>             </resource>
>           </webResources>
>         </configuration>
>       </plugin>

-- 
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

        

[jira] Updated: (MWAR-129) WebRessource not filtered

Posted by "Stephane Nicoll (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MWAR-129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stephane Nicoll updated MWAR-129:
---------------------------------

    Fix Version/s: 2.1-alpha-2

> WebRessource not filtered
> -------------------------
>
>                 Key: MWAR-129
>                 URL: http://jira.codehaus.org/browse/MWAR-129
>             Project: Maven 2.x War Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1-alpha-1
>         Environment: windows, maven 2.0.7
>            Reporter: Jean-Yves LEBLEU
>             Fix For: 2.1-alpha-2
>
>
> Previously Webressources were correctly filtered and are not filtered any more 
> See above extract from pom.xml 
>       <plugin>
>         <artifactId>maven-war-plugin</artifactId>
>         <version>2.0.2</version>
>         <configuration>
>           <warSourceDirectory>src/main/webapp</warSourceDirectory>
>           <webResources>
>             <resource>
>               <filtering>true</filtering>
>               <directory>src/main/webapp</directory>
>               <targetPath>.</targetPath>
>               <includes>
>                 <include>param.jsp</include>
>               </includes>
>             </resource>
>           </webResources>
>         </configuration>
>       </plugin>

-- 
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

        

[jira] Commented: (MWAR-129) WebRessource not filtered

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MWAR-129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_114768 ] 

Olivier Lamy commented on MWAR-129:
-----------------------------------

Ok Stephane, we have just to find the time to chat.
I have added an it for this issue.


> WebRessource not filtered
> -------------------------
>
>                 Key: MWAR-129
>                 URL: http://jira.codehaus.org/browse/MWAR-129
>             Project: Maven 2.x War Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1-alpha-1
>         Environment: windows, maven 2.0.7
>            Reporter: Jean-Yves LEBLEU
>            Assignee: Olivier Lamy
>             Fix For: 2.1-alpha-2
>
>         Attachments: mwar_129.zip
>
>
> Previously Webressources were correctly filtered and are not filtered any more 
> See above extract from pom.xml 
>       <plugin>
>         <artifactId>maven-war-plugin</artifactId>
>         <version>2.0.2</version>
>         <configuration>
>           <warSourceDirectory>src/main/webapp</warSourceDirectory>
>           <webResources>
>             <resource>
>               <filtering>true</filtering>
>               <directory>src/main/webapp</directory>
>               <targetPath>.</targetPath>
>               <includes>
>                 <include>param.jsp</include>
>               </includes>
>             </resource>
>           </webResources>
>         </configuration>
>       </plugin>

-- 
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

        

[jira] Issue Comment Edited: (MWAR-129) WebRessource not filtered

Posted by "Jean-Yves LEBLEU (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MWAR-129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_113667 ] 

Jean-Yves LEBLEU edited comment on MWAR-129 at 11/13/07 7:15 AM:
-----------------------------------------------------------------

Sample project mwar_129 attached,

The file param.jsp contains properties which are set in the pom.xml.
when you run mvn clean package, these properties are replaced by the one defined in the corresponding profile.

Exemple :

mvn clean package -Dprofile1=1

param.jsp :

<c:set var="app_version" value="1.0-SNAPSHOT"/>
<c:set var="app_mainStyleSheet" value="profile1.css"/>

mvn clean package -Dprofile2=1

param.jsp :

<c:set var="app_version" value="1.0-SNAPSHOT"/>
<c:set var="app_mainStyleSheet" value="profile2.css"/>


This was working well with war plugin version 2.0.2 and not with the alpha version.


 was:
Sample project,

The file param.jsp contains properties which are set in the pom.xml.
when you run mvn clean package, these properties are replaced by the one defined in the corresponding profile.

Exemple :

mvn clean package -Dprofile1=1

param.jsp :

<c:set var="app_version" value="1.0-SNAPSHOT"/>
<c:set var="app_mainStyleSheet" value="profile1.css"/>

mvn clean package -Dprofile2=1

param.jsp :

<c:set var="app_version" value="1.0-SNAPSHOT"/>
<c:set var="app_mainStyleSheet" value="profile2.css"/>


This was working well with war plugin version 2.0.2 and not with the alpha version.

> WebRessource not filtered
> -------------------------
>
>                 Key: MWAR-129
>                 URL: http://jira.codehaus.org/browse/MWAR-129
>             Project: Maven 2.x War Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1-alpha-1
>         Environment: windows, maven 2.0.7
>            Reporter: Jean-Yves LEBLEU
>             Fix For: 2.1-alpha-2
>
>         Attachments: mwar_129.zip
>
>
> Previously Webressources were correctly filtered and are not filtered any more 
> See above extract from pom.xml 
>       <plugin>
>         <artifactId>maven-war-plugin</artifactId>
>         <version>2.0.2</version>
>         <configuration>
>           <warSourceDirectory>src/main/webapp</warSourceDirectory>
>           <webResources>
>             <resource>
>               <filtering>true</filtering>
>               <directory>src/main/webapp</directory>
>               <targetPath>.</targetPath>
>               <includes>
>                 <include>param.jsp</include>
>               </includes>
>             </resource>
>           </webResources>
>         </configuration>
>       </plugin>

-- 
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