You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Henri Gomez <he...@gmail.com> on 2008/05/16 00:11:52 UTC
filtering web.xml
Hi to all,
In a war project I'd like to filter the src/main/webapp/WEB-INF/web.xml :
ie : update the display name to include the pom version
<display-name>My Site Application v${pom.version}</display-name>
I read some threads and it's not clear if it should be done by
web-resources or standard filtering.
ie : http://www.nabble.com/War-plugin-and-filtering-webapp-files-to4384723.html
Advice welcome, I'm using maven-war-plugin 2.0.2
regards and thanks for your help, I'm being crasy :)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: filtering web.xml
Posted by Henri Gomez <he...@gmail.com>.
Any news about this problem ?
2008/5/17 Henri Gomez <he...@gmail.com>:
> 2008/5/17 Tim Kettler <ti...@udo.edu>:
>> There's currently a discussion on the dev list [1] about releasing the next
>> version of the war plugin. I posted there yesterday that this bug should be
>> fixed before a release, you can express your opinion there as well.
>
> I'll send a note on the dev list
>
>> Additionally, you can vote on the bug report in jira, to make it more
>> visible to the developers that this is an urgent issue for users.
>
> Done
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: filtering web.xml
Posted by Henri Gomez <he...@gmail.com>.
2008/5/17 Tim Kettler <ti...@udo.edu>:
> There's currently a discussion on the dev list [1] about releasing the next
> version of the war plugin. I posted there yesterday that this bug should be
> fixed before a release, you can express your opinion there as well.
I'll send a note on the dev list
> Additionally, you can vote on the bug report in jira, to make it more
> visible to the developers that this is an urgent issue for users.
Done
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: filtering web.xml
Posted by Tim Kettler <ti...@udo.edu>.
There's currently a discussion on the dev list [1] about releasing the
next version of the war plugin. I posted there yesterday that this bug
should be fixed before a release, you can express your opinion there as
well. Additionally, you can vote on the bug report in jira, to make it
more visible to the developers that this is an urgent issue for users.
-Tim
[1]
http://www.nabble.com/Releasng-the-war-and-deploy-plugins-to17155510.html
Henri Gomez schrieb:
> There is a patch provided in http://jira.codehaus.org/browse/MWAR-133.
>
> How can I contact the maintener for a fix ?
>
> 2008/5/16 Henri Gomez <he...@gmail.com>:
>> I tested with 2.1-alpha and same problem ;(
>>
>> 2008/5/16 Tim Kettler <ti...@udo.edu>:
>>> It's a bug in the war plugin. The resource filtering is seriously borked
>>> there, see here [1] for a bug report back from Nov 2007. The obvious and
>>> simple workaround would be to filter web.xml as a normal resource in a
>>> custom invocation of the resource plugin. But unfortunately there is a bug
>>> in the resource plugin as well [2] (open since 2006), causing it to not
>>> recognize a resources element in the plugin configuration.
>>>
>>> Sometimes maven is no fun at all :-(
>>>
>>> [1] http://jira.codehaus.org/browse/MWAR-133
>>> [2] http://jira.codehaus.org/browse/MRESOURCES-8
>>>
>>> Henri Gomez schrieb:
>>>> I suspect something weird in maven-war plugin (2.0.2) since I get the
>>>> same error from m2eclipse which use maven 2.1 embedded
>>>>
>>>> 2008/5/16 Henri Gomez <he...@gmail.com>:
>>>>> *.version => pom.version
>>>>>
>>>>> *.name => pom.name
>>>>>
>>>>> 2008/5/16 Henri Gomez <he...@gmail.com>:
>>>>>> Problem in maven-war 2.0.2 or in maven 2.0.9 ?
>>>>>>
>>>>>> 2008/5/16 Tim Kettler <ti...@udo.edu>:
>>>>>>> Strange, indeed.
>>>>>>>
>>>>>>> Looks like a bug to me. I tried with this in web.xml and no filter
>>>>>>> property
>>>>>>> files:
>>>>>>>
>>>>>>> pom.name: ${pom.name}
>>>>>>> user.name: ${user.name}
>>>>>>> name: ${name}
>>>>>>> foo.name: ${foo.name}
>>>>>>>
>>>>>>> pom.version: ${pom.version}
>>>>>>> os.version: ${os.version}
>>>>>>> version: ${version}
>>>>>>> foo.version: ${foo.version}
>>>>>>>
>>>>>>> And the filtered result is this:
>>>>>>>
>>>>>>> pom.name: servlet
>>>>>>> user.name: servlet
>>>>>>> name: servlet
>>>>>>> foo.name: servlet
>>>>>>>
>>>>>>> pom.version: 1.0
>>>>>>> os.version: 1.0
>>>>>>> version: 1.0
>>>>>>> foo.version: 1.0
>>>>>>>
>>>>>>> It seems that the system properties get somehow shadowed by the
>>>>>>> standard pom
>>>>>>> properties. This seems to be the case even for custom properties like
>>>>>>> foo.version that are not defined anywhere.
>>>>>>>
>>>>>>> -Tim
>>>>>>>
>>>>>>> Henri Gomez schrieb:
>>>>>>>> Strange.
>>>>>>>>
>>>>>>>> I could get thru filter ${user.home} or ${java.version} but not
>>>>>>>> ${user.name}
>>>>>>>>
>>>>>>>> Any idea ?
>>>>>>>>
>>>>>>>> 2008/5/16 Henri Gomez <he...@gmail.com>:
>>>>>>>>> Many thanks Tim.
>>>>>>>>>
>>>>>>>>> I was using the same thing, excepted <targetPath>WEB-INF</targetPath>
>>>>>>>>>
>>>>>>>>> It works now !
>>>>>>>>>
>>>>>>>>> 2008/5/16 Tim Kettler <ti...@udo.edu>:
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> I do it like this:
>>>>>>>>>>
>>>>>>>>>> <build>
>>>>>>>>>> <plugins>
>>>>>>>>>> <plugin>
>>>>>>>>>> <groupId>org.apache.maven.plugins</groupId>
>>>>>>>>>> <artifactId>maven-war-plugin</artifactId>
>>>>>>>>>> <configuration>
>>>>>>>>>> <webResources>
>>>>>>>>>> <webResource>
>>>>>>>>>> <directory>${basedir}/src/main/webapp/WEB-INF</directory>
>>>>>>>>>> <includes>
>>>>>>>>>> <include>web.xml</include>
>>>>>>>>>> </includes>
>>>>>>>>>> <targetPath>WEB-INF</targetPath>
>>>>>>>>>> <filtering>true</filtering>
>>>>>>>>>> </webResource>
>>>>>>>>>> </webResources>
>>>>>>>>>> </configuration>
>>>>>>>>>> </plugin>
>>>>>>>>>> </plugins>
>>>>>>>>>> </build>
>>>>>>>>>>
>>>>>>>>>> and I think this is the right way to do it since standard resources
>>>>>>>>>> end
>>>>>>>>>> up
>>>>>>>>>> somewhere under 'target/classes' and I don't want that polluted with
>>>>>>>>>> a
>>>>>>>>>> web.xml file.
>>>>>>>>>>
>>>>>>>>>> -Tim
>>>>>>>>>>
>>>>>>>>>> Henri Gomez schrieb:
>>>>>>>>>>> Hi to all,
>>>>>>>>>>>
>>>>>>>>>>> In a war project I'd like to filter the
>>>>>>>>>>> src/main/webapp/WEB-INF/web.xml
>>>>>>>>>>> :
>>>>>>>>>>>
>>>>>>>>>>> ie : update the display name to include the pom version
>>>>>>>>>>>
>>>>>>>>>>> <display-name>My Site Application
>>>>>>>>>>> v${pom.version}</display-name>
>>>>>>>>>>>
>>>>>>>>>>> I read some threads and it's not clear if it should be done by
>>>>>>>>>>> web-resources or standard filtering.
>>>>>>>>>>>
>>>>>>>>>>> ie :
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> http://www.nabble.com/War-plugin-and-filtering-webapp-files-to4384723.html
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Advice welcome, I'm using maven-war-plugin 2.0.2
>>>>>>>>>>>
>>>>>>>>>>> regards and thanks for your help, I'm being crasy :)
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>>>>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>>>>>>>
>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>>>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>>>
>>>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: filtering web.xml
Posted by Henri Gomez <he...@gmail.com>.
There is a patch provided in http://jira.codehaus.org/browse/MWAR-133.
How can I contact the maintener for a fix ?
2008/5/16 Henri Gomez <he...@gmail.com>:
> I tested with 2.1-alpha and same problem ;(
>
> 2008/5/16 Tim Kettler <ti...@udo.edu>:
>> It's a bug in the war plugin. The resource filtering is seriously borked
>> there, see here [1] for a bug report back from Nov 2007. The obvious and
>> simple workaround would be to filter web.xml as a normal resource in a
>> custom invocation of the resource plugin. But unfortunately there is a bug
>> in the resource plugin as well [2] (open since 2006), causing it to not
>> recognize a resources element in the plugin configuration.
>>
>> Sometimes maven is no fun at all :-(
>>
>> [1] http://jira.codehaus.org/browse/MWAR-133
>> [2] http://jira.codehaus.org/browse/MRESOURCES-8
>>
>> Henri Gomez schrieb:
>>>
>>> I suspect something weird in maven-war plugin (2.0.2) since I get the
>>> same error from m2eclipse which use maven 2.1 embedded
>>>
>>> 2008/5/16 Henri Gomez <he...@gmail.com>:
>>>>
>>>> *.version => pom.version
>>>>
>>>> *.name => pom.name
>>>>
>>>> 2008/5/16 Henri Gomez <he...@gmail.com>:
>>>>>
>>>>> Problem in maven-war 2.0.2 or in maven 2.0.9 ?
>>>>>
>>>>> 2008/5/16 Tim Kettler <ti...@udo.edu>:
>>>>>>
>>>>>> Strange, indeed.
>>>>>>
>>>>>> Looks like a bug to me. I tried with this in web.xml and no filter
>>>>>> property
>>>>>> files:
>>>>>>
>>>>>> pom.name: ${pom.name}
>>>>>> user.name: ${user.name}
>>>>>> name: ${name}
>>>>>> foo.name: ${foo.name}
>>>>>>
>>>>>> pom.version: ${pom.version}
>>>>>> os.version: ${os.version}
>>>>>> version: ${version}
>>>>>> foo.version: ${foo.version}
>>>>>>
>>>>>> And the filtered result is this:
>>>>>>
>>>>>> pom.name: servlet
>>>>>> user.name: servlet
>>>>>> name: servlet
>>>>>> foo.name: servlet
>>>>>>
>>>>>> pom.version: 1.0
>>>>>> os.version: 1.0
>>>>>> version: 1.0
>>>>>> foo.version: 1.0
>>>>>>
>>>>>> It seems that the system properties get somehow shadowed by the
>>>>>> standard pom
>>>>>> properties. This seems to be the case even for custom properties like
>>>>>> foo.version that are not defined anywhere.
>>>>>>
>>>>>> -Tim
>>>>>>
>>>>>> Henri Gomez schrieb:
>>>>>>>
>>>>>>> Strange.
>>>>>>>
>>>>>>> I could get thru filter ${user.home} or ${java.version} but not
>>>>>>> ${user.name}
>>>>>>>
>>>>>>> Any idea ?
>>>>>>>
>>>>>>> 2008/5/16 Henri Gomez <he...@gmail.com>:
>>>>>>>>
>>>>>>>> Many thanks Tim.
>>>>>>>>
>>>>>>>> I was using the same thing, excepted <targetPath>WEB-INF</targetPath>
>>>>>>>>
>>>>>>>> It works now !
>>>>>>>>
>>>>>>>> 2008/5/16 Tim Kettler <ti...@udo.edu>:
>>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> I do it like this:
>>>>>>>>>
>>>>>>>>> <build>
>>>>>>>>> <plugins>
>>>>>>>>> <plugin>
>>>>>>>>> <groupId>org.apache.maven.plugins</groupId>
>>>>>>>>> <artifactId>maven-war-plugin</artifactId>
>>>>>>>>> <configuration>
>>>>>>>>> <webResources>
>>>>>>>>> <webResource>
>>>>>>>>> <directory>${basedir}/src/main/webapp/WEB-INF</directory>
>>>>>>>>> <includes>
>>>>>>>>> <include>web.xml</include>
>>>>>>>>> </includes>
>>>>>>>>> <targetPath>WEB-INF</targetPath>
>>>>>>>>> <filtering>true</filtering>
>>>>>>>>> </webResource>
>>>>>>>>> </webResources>
>>>>>>>>> </configuration>
>>>>>>>>> </plugin>
>>>>>>>>> </plugins>
>>>>>>>>> </build>
>>>>>>>>>
>>>>>>>>> and I think this is the right way to do it since standard resources
>>>>>>>>> end
>>>>>>>>> up
>>>>>>>>> somewhere under 'target/classes' and I don't want that polluted with
>>>>>>>>> a
>>>>>>>>> web.xml file.
>>>>>>>>>
>>>>>>>>> -Tim
>>>>>>>>>
>>>>>>>>> Henri Gomez schrieb:
>>>>>>>>>>
>>>>>>>>>> Hi to all,
>>>>>>>>>>
>>>>>>>>>> In a war project I'd like to filter the
>>>>>>>>>> src/main/webapp/WEB-INF/web.xml
>>>>>>>>>> :
>>>>>>>>>>
>>>>>>>>>> ie : update the display name to include the pom version
>>>>>>>>>>
>>>>>>>>>> <display-name>My Site Application
>>>>>>>>>> v${pom.version}</display-name>
>>>>>>>>>>
>>>>>>>>>> I read some threads and it's not clear if it should be done by
>>>>>>>>>> web-resources or standard filtering.
>>>>>>>>>>
>>>>>>>>>> ie :
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> http://www.nabble.com/War-plugin-and-filtering-webapp-files-to4384723.html
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Advice welcome, I'm using maven-war-plugin 2.0.2
>>>>>>>>>>
>>>>>>>>>> regards and thanks for your help, I'm being crasy :)
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>>>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>>>>>
>>>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>>
>>>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: filtering web.xml
Posted by Henri Gomez <he...@gmail.com>.
I tested with 2.1-alpha and same problem ;(
2008/5/16 Tim Kettler <ti...@udo.edu>:
> It's a bug in the war plugin. The resource filtering is seriously borked
> there, see here [1] for a bug report back from Nov 2007. The obvious and
> simple workaround would be to filter web.xml as a normal resource in a
> custom invocation of the resource plugin. But unfortunately there is a bug
> in the resource plugin as well [2] (open since 2006), causing it to not
> recognize a resources element in the plugin configuration.
>
> Sometimes maven is no fun at all :-(
>
> [1] http://jira.codehaus.org/browse/MWAR-133
> [2] http://jira.codehaus.org/browse/MRESOURCES-8
>
> Henri Gomez schrieb:
>>
>> I suspect something weird in maven-war plugin (2.0.2) since I get the
>> same error from m2eclipse which use maven 2.1 embedded
>>
>> 2008/5/16 Henri Gomez <he...@gmail.com>:
>>>
>>> *.version => pom.version
>>>
>>> *.name => pom.name
>>>
>>> 2008/5/16 Henri Gomez <he...@gmail.com>:
>>>>
>>>> Problem in maven-war 2.0.2 or in maven 2.0.9 ?
>>>>
>>>> 2008/5/16 Tim Kettler <ti...@udo.edu>:
>>>>>
>>>>> Strange, indeed.
>>>>>
>>>>> Looks like a bug to me. I tried with this in web.xml and no filter
>>>>> property
>>>>> files:
>>>>>
>>>>> pom.name: ${pom.name}
>>>>> user.name: ${user.name}
>>>>> name: ${name}
>>>>> foo.name: ${foo.name}
>>>>>
>>>>> pom.version: ${pom.version}
>>>>> os.version: ${os.version}
>>>>> version: ${version}
>>>>> foo.version: ${foo.version}
>>>>>
>>>>> And the filtered result is this:
>>>>>
>>>>> pom.name: servlet
>>>>> user.name: servlet
>>>>> name: servlet
>>>>> foo.name: servlet
>>>>>
>>>>> pom.version: 1.0
>>>>> os.version: 1.0
>>>>> version: 1.0
>>>>> foo.version: 1.0
>>>>>
>>>>> It seems that the system properties get somehow shadowed by the
>>>>> standard pom
>>>>> properties. This seems to be the case even for custom properties like
>>>>> foo.version that are not defined anywhere.
>>>>>
>>>>> -Tim
>>>>>
>>>>> Henri Gomez schrieb:
>>>>>>
>>>>>> Strange.
>>>>>>
>>>>>> I could get thru filter ${user.home} or ${java.version} but not
>>>>>> ${user.name}
>>>>>>
>>>>>> Any idea ?
>>>>>>
>>>>>> 2008/5/16 Henri Gomez <he...@gmail.com>:
>>>>>>>
>>>>>>> Many thanks Tim.
>>>>>>>
>>>>>>> I was using the same thing, excepted <targetPath>WEB-INF</targetPath>
>>>>>>>
>>>>>>> It works now !
>>>>>>>
>>>>>>> 2008/5/16 Tim Kettler <ti...@udo.edu>:
>>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I do it like this:
>>>>>>>>
>>>>>>>> <build>
>>>>>>>> <plugins>
>>>>>>>> <plugin>
>>>>>>>> <groupId>org.apache.maven.plugins</groupId>
>>>>>>>> <artifactId>maven-war-plugin</artifactId>
>>>>>>>> <configuration>
>>>>>>>> <webResources>
>>>>>>>> <webResource>
>>>>>>>> <directory>${basedir}/src/main/webapp/WEB-INF</directory>
>>>>>>>> <includes>
>>>>>>>> <include>web.xml</include>
>>>>>>>> </includes>
>>>>>>>> <targetPath>WEB-INF</targetPath>
>>>>>>>> <filtering>true</filtering>
>>>>>>>> </webResource>
>>>>>>>> </webResources>
>>>>>>>> </configuration>
>>>>>>>> </plugin>
>>>>>>>> </plugins>
>>>>>>>> </build>
>>>>>>>>
>>>>>>>> and I think this is the right way to do it since standard resources
>>>>>>>> end
>>>>>>>> up
>>>>>>>> somewhere under 'target/classes' and I don't want that polluted with
>>>>>>>> a
>>>>>>>> web.xml file.
>>>>>>>>
>>>>>>>> -Tim
>>>>>>>>
>>>>>>>> Henri Gomez schrieb:
>>>>>>>>>
>>>>>>>>> Hi to all,
>>>>>>>>>
>>>>>>>>> In a war project I'd like to filter the
>>>>>>>>> src/main/webapp/WEB-INF/web.xml
>>>>>>>>> :
>>>>>>>>>
>>>>>>>>> ie : update the display name to include the pom version
>>>>>>>>>
>>>>>>>>> <display-name>My Site Application
>>>>>>>>> v${pom.version}</display-name>
>>>>>>>>>
>>>>>>>>> I read some threads and it's not clear if it should be done by
>>>>>>>>> web-resources or standard filtering.
>>>>>>>>>
>>>>>>>>> ie :
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> http://www.nabble.com/War-plugin-and-filtering-webapp-files-to4384723.html
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Advice welcome, I'm using maven-war-plugin 2.0.2
>>>>>>>>>
>>>>>>>>> regards and thanks for your help, I'm being crasy :)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>>>>>
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>>>>
>>>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>
>>>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: filtering web.xml
Posted by Tim Kettler <ti...@udo.edu>.
It's a bug in the war plugin. The resource filtering is seriously borked
there, see here [1] for a bug report back from Nov 2007. The obvious and
simple workaround would be to filter web.xml as a normal resource in a
custom invocation of the resource plugin. But unfortunately there is a
bug in the resource plugin as well [2] (open since 2006), causing it to
not recognize a resources element in the plugin configuration.
Sometimes maven is no fun at all :-(
[1] http://jira.codehaus.org/browse/MWAR-133
[2] http://jira.codehaus.org/browse/MRESOURCES-8
Henri Gomez schrieb:
> I suspect something weird in maven-war plugin (2.0.2) since I get the
> same error from m2eclipse which use maven 2.1 embedded
>
> 2008/5/16 Henri Gomez <he...@gmail.com>:
>> *.version => pom.version
>>
>> *.name => pom.name
>>
>> 2008/5/16 Henri Gomez <he...@gmail.com>:
>>> Problem in maven-war 2.0.2 or in maven 2.0.9 ?
>>>
>>> 2008/5/16 Tim Kettler <ti...@udo.edu>:
>>>> Strange, indeed.
>>>>
>>>> Looks like a bug to me. I tried with this in web.xml and no filter property
>>>> files:
>>>>
>>>> pom.name: ${pom.name}
>>>> user.name: ${user.name}
>>>> name: ${name}
>>>> foo.name: ${foo.name}
>>>>
>>>> pom.version: ${pom.version}
>>>> os.version: ${os.version}
>>>> version: ${version}
>>>> foo.version: ${foo.version}
>>>>
>>>> And the filtered result is this:
>>>>
>>>> pom.name: servlet
>>>> user.name: servlet
>>>> name: servlet
>>>> foo.name: servlet
>>>>
>>>> pom.version: 1.0
>>>> os.version: 1.0
>>>> version: 1.0
>>>> foo.version: 1.0
>>>>
>>>> It seems that the system properties get somehow shadowed by the standard pom
>>>> properties. This seems to be the case even for custom properties like
>>>> foo.version that are not defined anywhere.
>>>>
>>>> -Tim
>>>>
>>>> Henri Gomez schrieb:
>>>>> Strange.
>>>>>
>>>>> I could get thru filter ${user.home} or ${java.version} but not
>>>>> ${user.name}
>>>>>
>>>>> Any idea ?
>>>>>
>>>>> 2008/5/16 Henri Gomez <he...@gmail.com>:
>>>>>> Many thanks Tim.
>>>>>>
>>>>>> I was using the same thing, excepted <targetPath>WEB-INF</targetPath>
>>>>>>
>>>>>> It works now !
>>>>>>
>>>>>> 2008/5/16 Tim Kettler <ti...@udo.edu>:
>>>>>>> Hi,
>>>>>>>
>>>>>>> I do it like this:
>>>>>>>
>>>>>>> <build>
>>>>>>> <plugins>
>>>>>>> <plugin>
>>>>>>> <groupId>org.apache.maven.plugins</groupId>
>>>>>>> <artifactId>maven-war-plugin</artifactId>
>>>>>>> <configuration>
>>>>>>> <webResources>
>>>>>>> <webResource>
>>>>>>> <directory>${basedir}/src/main/webapp/WEB-INF</directory>
>>>>>>> <includes>
>>>>>>> <include>web.xml</include>
>>>>>>> </includes>
>>>>>>> <targetPath>WEB-INF</targetPath>
>>>>>>> <filtering>true</filtering>
>>>>>>> </webResource>
>>>>>>> </webResources>
>>>>>>> </configuration>
>>>>>>> </plugin>
>>>>>>> </plugins>
>>>>>>> </build>
>>>>>>>
>>>>>>> and I think this is the right way to do it since standard resources end
>>>>>>> up
>>>>>>> somewhere under 'target/classes' and I don't want that polluted with a
>>>>>>> web.xml file.
>>>>>>>
>>>>>>> -Tim
>>>>>>>
>>>>>>> Henri Gomez schrieb:
>>>>>>>> Hi to all,
>>>>>>>>
>>>>>>>> In a war project I'd like to filter the src/main/webapp/WEB-INF/web.xml
>>>>>>>> :
>>>>>>>>
>>>>>>>> ie : update the display name to include the pom version
>>>>>>>>
>>>>>>>> <display-name>My Site Application v${pom.version}</display-name>
>>>>>>>>
>>>>>>>> I read some threads and it's not clear if it should be done by
>>>>>>>> web-resources or standard filtering.
>>>>>>>>
>>>>>>>> ie :
>>>>>>>>
>>>>>>>> http://www.nabble.com/War-plugin-and-filtering-webapp-files-to4384723.html
>>>>>>>>
>>>>>>>>
>>>>>>>> Advice welcome, I'm using maven-war-plugin 2.0.2
>>>>>>>>
>>>>>>>> regards and thanks for your help, I'm being crasy :)
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>>>
>>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: filtering web.xml
Posted by Henri Gomez <he...@gmail.com>.
I suspect something weird in maven-war plugin (2.0.2) since I get the
same error from m2eclipse which use maven 2.1 embedded
2008/5/16 Henri Gomez <he...@gmail.com>:
> *.version => pom.version
>
> *.name => pom.name
>
> 2008/5/16 Henri Gomez <he...@gmail.com>:
>> Problem in maven-war 2.0.2 or in maven 2.0.9 ?
>>
>> 2008/5/16 Tim Kettler <ti...@udo.edu>:
>>> Strange, indeed.
>>>
>>> Looks like a bug to me. I tried with this in web.xml and no filter property
>>> files:
>>>
>>> pom.name: ${pom.name}
>>> user.name: ${user.name}
>>> name: ${name}
>>> foo.name: ${foo.name}
>>>
>>> pom.version: ${pom.version}
>>> os.version: ${os.version}
>>> version: ${version}
>>> foo.version: ${foo.version}
>>>
>>> And the filtered result is this:
>>>
>>> pom.name: servlet
>>> user.name: servlet
>>> name: servlet
>>> foo.name: servlet
>>>
>>> pom.version: 1.0
>>> os.version: 1.0
>>> version: 1.0
>>> foo.version: 1.0
>>>
>>> It seems that the system properties get somehow shadowed by the standard pom
>>> properties. This seems to be the case even for custom properties like
>>> foo.version that are not defined anywhere.
>>>
>>> -Tim
>>>
>>> Henri Gomez schrieb:
>>>>
>>>> Strange.
>>>>
>>>> I could get thru filter ${user.home} or ${java.version} but not
>>>> ${user.name}
>>>>
>>>> Any idea ?
>>>>
>>>> 2008/5/16 Henri Gomez <he...@gmail.com>:
>>>>>
>>>>> Many thanks Tim.
>>>>>
>>>>> I was using the same thing, excepted <targetPath>WEB-INF</targetPath>
>>>>>
>>>>> It works now !
>>>>>
>>>>> 2008/5/16 Tim Kettler <ti...@udo.edu>:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I do it like this:
>>>>>>
>>>>>> <build>
>>>>>> <plugins>
>>>>>> <plugin>
>>>>>> <groupId>org.apache.maven.plugins</groupId>
>>>>>> <artifactId>maven-war-plugin</artifactId>
>>>>>> <configuration>
>>>>>> <webResources>
>>>>>> <webResource>
>>>>>> <directory>${basedir}/src/main/webapp/WEB-INF</directory>
>>>>>> <includes>
>>>>>> <include>web.xml</include>
>>>>>> </includes>
>>>>>> <targetPath>WEB-INF</targetPath>
>>>>>> <filtering>true</filtering>
>>>>>> </webResource>
>>>>>> </webResources>
>>>>>> </configuration>
>>>>>> </plugin>
>>>>>> </plugins>
>>>>>> </build>
>>>>>>
>>>>>> and I think this is the right way to do it since standard resources end
>>>>>> up
>>>>>> somewhere under 'target/classes' and I don't want that polluted with a
>>>>>> web.xml file.
>>>>>>
>>>>>> -Tim
>>>>>>
>>>>>> Henri Gomez schrieb:
>>>>>>>
>>>>>>> Hi to all,
>>>>>>>
>>>>>>> In a war project I'd like to filter the src/main/webapp/WEB-INF/web.xml
>>>>>>> :
>>>>>>>
>>>>>>> ie : update the display name to include the pom version
>>>>>>>
>>>>>>> <display-name>My Site Application v${pom.version}</display-name>
>>>>>>>
>>>>>>> I read some threads and it's not clear if it should be done by
>>>>>>> web-resources or standard filtering.
>>>>>>>
>>>>>>> ie :
>>>>>>>
>>>>>>> http://www.nabble.com/War-plugin-and-filtering-webapp-files-to4384723.html
>>>>>>>
>>>>>>>
>>>>>>> Advice welcome, I'm using maven-war-plugin 2.0.2
>>>>>>>
>>>>>>> regards and thanks for your help, I'm being crasy :)
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>>
>>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: filtering web.xml
Posted by Henri Gomez <he...@gmail.com>.
*.version => pom.version
*.name => pom.name
2008/5/16 Henri Gomez <he...@gmail.com>:
> Problem in maven-war 2.0.2 or in maven 2.0.9 ?
>
> 2008/5/16 Tim Kettler <ti...@udo.edu>:
>> Strange, indeed.
>>
>> Looks like a bug to me. I tried with this in web.xml and no filter property
>> files:
>>
>> pom.name: ${pom.name}
>> user.name: ${user.name}
>> name: ${name}
>> foo.name: ${foo.name}
>>
>> pom.version: ${pom.version}
>> os.version: ${os.version}
>> version: ${version}
>> foo.version: ${foo.version}
>>
>> And the filtered result is this:
>>
>> pom.name: servlet
>> user.name: servlet
>> name: servlet
>> foo.name: servlet
>>
>> pom.version: 1.0
>> os.version: 1.0
>> version: 1.0
>> foo.version: 1.0
>>
>> It seems that the system properties get somehow shadowed by the standard pom
>> properties. This seems to be the case even for custom properties like
>> foo.version that are not defined anywhere.
>>
>> -Tim
>>
>> Henri Gomez schrieb:
>>>
>>> Strange.
>>>
>>> I could get thru filter ${user.home} or ${java.version} but not
>>> ${user.name}
>>>
>>> Any idea ?
>>>
>>> 2008/5/16 Henri Gomez <he...@gmail.com>:
>>>>
>>>> Many thanks Tim.
>>>>
>>>> I was using the same thing, excepted <targetPath>WEB-INF</targetPath>
>>>>
>>>> It works now !
>>>>
>>>> 2008/5/16 Tim Kettler <ti...@udo.edu>:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I do it like this:
>>>>>
>>>>> <build>
>>>>> <plugins>
>>>>> <plugin>
>>>>> <groupId>org.apache.maven.plugins</groupId>
>>>>> <artifactId>maven-war-plugin</artifactId>
>>>>> <configuration>
>>>>> <webResources>
>>>>> <webResource>
>>>>> <directory>${basedir}/src/main/webapp/WEB-INF</directory>
>>>>> <includes>
>>>>> <include>web.xml</include>
>>>>> </includes>
>>>>> <targetPath>WEB-INF</targetPath>
>>>>> <filtering>true</filtering>
>>>>> </webResource>
>>>>> </webResources>
>>>>> </configuration>
>>>>> </plugin>
>>>>> </plugins>
>>>>> </build>
>>>>>
>>>>> and I think this is the right way to do it since standard resources end
>>>>> up
>>>>> somewhere under 'target/classes' and I don't want that polluted with a
>>>>> web.xml file.
>>>>>
>>>>> -Tim
>>>>>
>>>>> Henri Gomez schrieb:
>>>>>>
>>>>>> Hi to all,
>>>>>>
>>>>>> In a war project I'd like to filter the src/main/webapp/WEB-INF/web.xml
>>>>>> :
>>>>>>
>>>>>> ie : update the display name to include the pom version
>>>>>>
>>>>>> <display-name>My Site Application v${pom.version}</display-name>
>>>>>>
>>>>>> I read some threads and it's not clear if it should be done by
>>>>>> web-resources or standard filtering.
>>>>>>
>>>>>> ie :
>>>>>>
>>>>>> http://www.nabble.com/War-plugin-and-filtering-webapp-files-to4384723.html
>>>>>>
>>>>>>
>>>>>> Advice welcome, I'm using maven-war-plugin 2.0.2
>>>>>>
>>>>>> regards and thanks for your help, I'm being crasy :)
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>
>>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: filtering web.xml
Posted by Henri Gomez <he...@gmail.com>.
Problem in maven-war 2.0.2 or in maven 2.0.9 ?
2008/5/16 Tim Kettler <ti...@udo.edu>:
> Strange, indeed.
>
> Looks like a bug to me. I tried with this in web.xml and no filter property
> files:
>
> pom.name: ${pom.name}
> user.name: ${user.name}
> name: ${name}
> foo.name: ${foo.name}
>
> pom.version: ${pom.version}
> os.version: ${os.version}
> version: ${version}
> foo.version: ${foo.version}
>
> And the filtered result is this:
>
> pom.name: servlet
> user.name: servlet
> name: servlet
> foo.name: servlet
>
> pom.version: 1.0
> os.version: 1.0
> version: 1.0
> foo.version: 1.0
>
> It seems that the system properties get somehow shadowed by the standard pom
> properties. This seems to be the case even for custom properties like
> foo.version that are not defined anywhere.
>
> -Tim
>
> Henri Gomez schrieb:
>>
>> Strange.
>>
>> I could get thru filter ${user.home} or ${java.version} but not
>> ${user.name}
>>
>> Any idea ?
>>
>> 2008/5/16 Henri Gomez <he...@gmail.com>:
>>>
>>> Many thanks Tim.
>>>
>>> I was using the same thing, excepted <targetPath>WEB-INF</targetPath>
>>>
>>> It works now !
>>>
>>> 2008/5/16 Tim Kettler <ti...@udo.edu>:
>>>>
>>>> Hi,
>>>>
>>>> I do it like this:
>>>>
>>>> <build>
>>>> <plugins>
>>>> <plugin>
>>>> <groupId>org.apache.maven.plugins</groupId>
>>>> <artifactId>maven-war-plugin</artifactId>
>>>> <configuration>
>>>> <webResources>
>>>> <webResource>
>>>> <directory>${basedir}/src/main/webapp/WEB-INF</directory>
>>>> <includes>
>>>> <include>web.xml</include>
>>>> </includes>
>>>> <targetPath>WEB-INF</targetPath>
>>>> <filtering>true</filtering>
>>>> </webResource>
>>>> </webResources>
>>>> </configuration>
>>>> </plugin>
>>>> </plugins>
>>>> </build>
>>>>
>>>> and I think this is the right way to do it since standard resources end
>>>> up
>>>> somewhere under 'target/classes' and I don't want that polluted with a
>>>> web.xml file.
>>>>
>>>> -Tim
>>>>
>>>> Henri Gomez schrieb:
>>>>>
>>>>> Hi to all,
>>>>>
>>>>> In a war project I'd like to filter the src/main/webapp/WEB-INF/web.xml
>>>>> :
>>>>>
>>>>> ie : update the display name to include the pom version
>>>>>
>>>>> <display-name>My Site Application v${pom.version}</display-name>
>>>>>
>>>>> I read some threads and it's not clear if it should be done by
>>>>> web-resources or standard filtering.
>>>>>
>>>>> ie :
>>>>>
>>>>> http://www.nabble.com/War-plugin-and-filtering-webapp-files-to4384723.html
>>>>>
>>>>>
>>>>> Advice welcome, I'm using maven-war-plugin 2.0.2
>>>>>
>>>>> regards and thanks for your help, I'm being crasy :)
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: filtering web.xml
Posted by Tim Kettler <ti...@udo.edu>.
Strange, indeed.
Looks like a bug to me. I tried with this in web.xml and no filter
property files:
pom.name: ${pom.name}
user.name: ${user.name}
name: ${name}
foo.name: ${foo.name}
pom.version: ${pom.version}
os.version: ${os.version}
version: ${version}
foo.version: ${foo.version}
And the filtered result is this:
pom.name: servlet
user.name: servlet
name: servlet
foo.name: servlet
pom.version: 1.0
os.version: 1.0
version: 1.0
foo.version: 1.0
It seems that the system properties get somehow shadowed by the standard
pom properties. This seems to be the case even for custom properties
like foo.version that are not defined anywhere.
-Tim
Henri Gomez schrieb:
> Strange.
>
> I could get thru filter ${user.home} or ${java.version} but not ${user.name}
>
> Any idea ?
>
> 2008/5/16 Henri Gomez <he...@gmail.com>:
>> Many thanks Tim.
>>
>> I was using the same thing, excepted <targetPath>WEB-INF</targetPath>
>>
>> It works now !
>>
>> 2008/5/16 Tim Kettler <ti...@udo.edu>:
>>> Hi,
>>>
>>> I do it like this:
>>>
>>> <build>
>>> <plugins>
>>> <plugin>
>>> <groupId>org.apache.maven.plugins</groupId>
>>> <artifactId>maven-war-plugin</artifactId>
>>> <configuration>
>>> <webResources>
>>> <webResource>
>>> <directory>${basedir}/src/main/webapp/WEB-INF</directory>
>>> <includes>
>>> <include>web.xml</include>
>>> </includes>
>>> <targetPath>WEB-INF</targetPath>
>>> <filtering>true</filtering>
>>> </webResource>
>>> </webResources>
>>> </configuration>
>>> </plugin>
>>> </plugins>
>>> </build>
>>>
>>> and I think this is the right way to do it since standard resources end up
>>> somewhere under 'target/classes' and I don't want that polluted with a
>>> web.xml file.
>>>
>>> -Tim
>>>
>>> Henri Gomez schrieb:
>>>> Hi to all,
>>>>
>>>> In a war project I'd like to filter the src/main/webapp/WEB-INF/web.xml :
>>>>
>>>> ie : update the display name to include the pom version
>>>>
>>>> <display-name>My Site Application v${pom.version}</display-name>
>>>>
>>>> I read some threads and it's not clear if it should be done by
>>>> web-resources or standard filtering.
>>>>
>>>> ie :
>>>> http://www.nabble.com/War-plugin-and-filtering-webapp-files-to4384723.html
>>>>
>>>>
>>>> Advice welcome, I'm using maven-war-plugin 2.0.2
>>>>
>>>> regards and thanks for your help, I'm being crasy :)
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: filtering web.xml
Posted by Henri Gomez <he...@gmail.com>.
Strange.
I could get thru filter ${user.home} or ${java.version} but not ${user.name}
Any idea ?
2008/5/16 Henri Gomez <he...@gmail.com>:
> Many thanks Tim.
>
> I was using the same thing, excepted <targetPath>WEB-INF</targetPath>
>
> It works now !
>
> 2008/5/16 Tim Kettler <ti...@udo.edu>:
>> Hi,
>>
>> I do it like this:
>>
>> <build>
>> <plugins>
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-war-plugin</artifactId>
>> <configuration>
>> <webResources>
>> <webResource>
>> <directory>${basedir}/src/main/webapp/WEB-INF</directory>
>> <includes>
>> <include>web.xml</include>
>> </includes>
>> <targetPath>WEB-INF</targetPath>
>> <filtering>true</filtering>
>> </webResource>
>> </webResources>
>> </configuration>
>> </plugin>
>> </plugins>
>> </build>
>>
>> and I think this is the right way to do it since standard resources end up
>> somewhere under 'target/classes' and I don't want that polluted with a
>> web.xml file.
>>
>> -Tim
>>
>> Henri Gomez schrieb:
>>>
>>> Hi to all,
>>>
>>> In a war project I'd like to filter the src/main/webapp/WEB-INF/web.xml :
>>>
>>> ie : update the display name to include the pom version
>>>
>>> <display-name>My Site Application v${pom.version}</display-name>
>>>
>>> I read some threads and it's not clear if it should be done by
>>> web-resources or standard filtering.
>>>
>>> ie :
>>> http://www.nabble.com/War-plugin-and-filtering-webapp-files-to4384723.html
>>>
>>>
>>> Advice welcome, I'm using maven-war-plugin 2.0.2
>>>
>>> regards and thanks for your help, I'm being crasy :)
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: filtering web.xml
Posted by Henri Gomez <he...@gmail.com>.
Many thanks Tim.
I was using the same thing, excepted <targetPath>WEB-INF</targetPath>
It works now !
2008/5/16 Tim Kettler <ti...@udo.edu>:
> Hi,
>
> I do it like this:
>
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-war-plugin</artifactId>
> <configuration>
> <webResources>
> <webResource>
> <directory>${basedir}/src/main/webapp/WEB-INF</directory>
> <includes>
> <include>web.xml</include>
> </includes>
> <targetPath>WEB-INF</targetPath>
> <filtering>true</filtering>
> </webResource>
> </webResources>
> </configuration>
> </plugin>
> </plugins>
> </build>
>
> and I think this is the right way to do it since standard resources end up
> somewhere under 'target/classes' and I don't want that polluted with a
> web.xml file.
>
> -Tim
>
> Henri Gomez schrieb:
>>
>> Hi to all,
>>
>> In a war project I'd like to filter the src/main/webapp/WEB-INF/web.xml :
>>
>> ie : update the display name to include the pom version
>>
>> <display-name>My Site Application v${pom.version}</display-name>
>>
>> I read some threads and it's not clear if it should be done by
>> web-resources or standard filtering.
>>
>> ie :
>> http://www.nabble.com/War-plugin-and-filtering-webapp-files-to4384723.html
>>
>>
>> Advice welcome, I'm using maven-war-plugin 2.0.2
>>
>> regards and thanks for your help, I'm being crasy :)
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: filtering web.xml
Posted by the_tfulton <to...@gmail.com>.
Hi,
Just to build on this a bit, the maven plugin definitely supports the
filtering of resources (outside of WEB-INF/classes). Here is a full <build>
config which filters web.xml (*.xml, actually) and places it in the WEB-INF
directory:
<build>
<plugins>
<!-- the below filters src/.../WEB-INF resources and places the
filtered files in WEB-INF of our target war -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webResources>
<webResource>
<directory>${basedir}/src/main/webapp/WEB-INF</directory>
<includes>
<include>*.xml</include>
</includes>
<targetPath>WEB-INF</targetPath>
<filtering>true</filtering>
</webResource>
</webResources>
</configuration>
</plugin>
</plugins>
<filters>
<filter>src/main/filters/filter-${env}.properties</filter>
</filters>
<!-- the below filters general resources and places the filtered
files in WEB-INF/classes of our target war -->
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
<!--
<resource>
<directory>src/main/webapp/WEB-INF</directory>
<filtering>true</filtering>
</resource>
-->
</resources>
</build>
Todd Fulton
Tim Kettler wrote:
>
> Hi,
>
> I do it like this:
>
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-war-plugin</artifactId>
> <configuration>
> <webResources>
> <webResource>
> <directory>${basedir}/src/main/webapp/WEB-INF</directory>
> <includes>
> <include>web.xml</include>
> </includes>
> <targetPath>WEB-INF</targetPath>
> <filtering>true</filtering>
> </webResource>
> </webResources>
> </configuration>
> </plugin>
> </plugins>
> </build>
>
> and I think this is the right way to do it since standard resources end
> up somewhere under 'target/classes' and I don't want that polluted with
> a web.xml file.
>
> -Tim
>
> Henri Gomez schrieb:
>> Hi to all,
>>
>> In a war project I'd like to filter the src/main/webapp/WEB-INF/web.xml :
>>
>> ie : update the display name to include the pom version
>>
>> <display-name>My Site Application v${pom.version}</display-name>
>>
>> I read some threads and it's not clear if it should be done by
>> web-resources or standard filtering.
>>
>> ie :
>> http://www.nabble.com/War-plugin-and-filtering-webapp-files-to4384723.html
>>
>>
>> Advice welcome, I'm using maven-war-plugin 2.0.2
>>
>> regards and thanks for your help, I'm being crasy :)
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/filtering-web.xml-tp17263714p23410000.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: filtering web.xml
Posted by Tim Kettler <ti...@udo.edu>.
Hi,
I do it like this:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webResources>
<webResource>
<directory>${basedir}/src/main/webapp/WEB-INF</directory>
<includes>
<include>web.xml</include>
</includes>
<targetPath>WEB-INF</targetPath>
<filtering>true</filtering>
</webResource>
</webResources>
</configuration>
</plugin>
</plugins>
</build>
and I think this is the right way to do it since standard resources end
up somewhere under 'target/classes' and I don't want that polluted with
a web.xml file.
-Tim
Henri Gomez schrieb:
> Hi to all,
>
> In a war project I'd like to filter the src/main/webapp/WEB-INF/web.xml :
>
> ie : update the display name to include the pom version
>
> <display-name>My Site Application v${pom.version}</display-name>
>
> I read some threads and it's not clear if it should be done by
> web-resources or standard filtering.
>
> ie : http://www.nabble.com/War-plugin-and-filtering-webapp-files-to4384723.html
>
>
> Advice welcome, I'm using maven-war-plugin 2.0.2
>
> regards and thanks for your help, I'm being crasy :)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org