You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Kees de Kooter <kd...@gmail.com> on 2005/10/10 11:36:50 UTC
[m2] Filtering again: how to fit in with "package" phase?
After some communication on this user list I got filtering figured
out. I am now able to filter some config files (specifically web.xml)
to a directory.
I now want to fit this in with the standard packaging or war:war
command. How can I do this?
thanx,
Kees de Kooter
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] Filtering again: how to fit in with "package" phase?
Posted by Kees de Kooter <kd...@gmail.com>.
Forget that. It does not work.
On 10/10/05, Kees de Kooter <kd...@gmail.com> wrote:
> Figured that out myself: set <filtering>false</filtering> for the part
> that does not need replacements.
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] Filtering again: how to fit in with "package" phase?
Posted by Kees de Kooter <kd...@gmail.com>.
Figured that out myself: set <filtering>false</filtering> for the part
that does not need replacements.
On 10/10/05, Kees de Kooter <kd...@gmail.com> wrote:
> Thanks Andrius. I am wondering if this is not a little inefficient,
> filtering the entire dir (in my case containing some 180 files) while
> I only need to do replacements in 2 files?
>
> Kees
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] Filtering again: how to fit in with "package" phase?
Posted by Mark Hobson <ma...@gmail.com>.
On 10/10/05, Kees de Kooter <kd...@gmail.com> wrote:
> Thanks Andrius. I am wondering if this is not a little inefficient,
> filtering the entire dir (in my case containing some 180 files) while
> I only need to do replacements in 2 files?
See also http://jira.codehaus.org/browse/MNG-791.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] Filtering again: how to fit in with "package" phase?
Posted by Kees de Kooter <kd...@gmail.com>.
Thanks Andrius. I am wondering if this is not a little inefficient,
filtering the entire dir (in my case containing some 180 files) while
I only need to do replacements in 2 files?
Kees
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] Filtering again: how to fit in with "package" phase?
Posted by Andrius Karpavicius <An...@sintagma.lt>.
Here is a solution:
Filter the whole webapps directory into som temp directory, an overwrite
war plugin description to package from temp directory instead.
Andrius
<build>
<!-- When packaging war file, both "/src/main/resources" and
"/src/main/webapp"
should pass through a resource filter to replace @property@
properties with a value from a filter file
-->
<filters>
<filter>${basedir}/src/filters/${filterFile}</filter>
</filters>
<resources>
<resource>
<targetPath>../filtered-webapp-resources</targetPath>
<filtering>true</filtering>
<directory>${basedir}/src/main/webapp</directory>
</resource>
<resource>
<targetPath>../filtered-webapp-resources/WEB-INF/classes</targetPath>
<filtering>true</filtering>
<directory>${basedir}/src/main/resources</directory>
</resource>
</resources>
<plugins>
<!-- War plugin configuration to package files from
"/filtered-webapp-resources" directory instead of "/src/main/webapp".
This configuration is necesary if filtering of
"/src/main/webapp" was requested - see Resources plugin configuration
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>war</goal>
</goals>
<configuration>
<warSourceDirectory>${project.build.directory}/filtered-webapp-resources</warSourceDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Kees de Kooter <kd...@gmail.com>
2005.10.10 12:36
Please respond to
"Maven Users List" <us...@maven.apache.org>
To
Maven Users List <us...@maven.apache.org>
cc
Subject
[m2] Filtering again: how to fit in with "package" phase?
After some communication on this user list I got filtering figured
out. I am now able to filter some config files (specifically web.xml)
to a directory.
I now want to fit this in with the standard packaging or war:war
command. How can I do this?
thanx,
Kees de Kooter
---------------------------------------------------------------------
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