You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Da...@sungard.com on 2010/01/25 21:01:24 UTC
Resource Filter files
Is it possible to define filters by profile? See below for example.
<build>
...
<filters>
<filter> [a filter property] </filter>
</filters>
...
</build>
Thanks,
David
Re: Resource Filter files
Posted by Manuel Grau <ma...@gmail.com>.
You're welcome!!
2010/1/26 <Da...@sungard.com>
> Thanks Manuel!!
>
> -----Original Message-----
> From: Manuel Grau [mailto:mangrar@gmail.com]
> Sent: Monday, January 25, 2010 2:09 PM
> To: Maven Users List
> Subject: Re: Resource Filter files
>
> Yes, is possible, I did it in my work recently. But, there is a better way.
> Notice what I'm doing. I have 4 profiles, activated with a var called env.
> So, when I call maven I always do:
>
> mvn -Denv=pre compile (or anything)
>
> I have four files called ${env}.pom.properties. So, you can put this in
> your main build tag:
>
> <filters>
> <filter>${env}.pom.properties</filter>
> <filters>
>
> So, when activate pre profile, the properties file loaded is
> pre.pom.properties.
>
> El 25/01/2010, a las 21:01, <Da...@sungard.com> escribió:
>
> > Is it possible to define filters by profile? See below for example.
> >
> > <build>
> > ...
> > <filters>
> > <filter> [a filter property] </filter>
> > </filters>
> > ...
> > </build>
> >
> > Thanks,
> >
> > David
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
"Everything should be made as simple as possible, but not simpler" Albert
Einstein
RE: Resource Filter files
Posted by Da...@sungard.com.
Thanks Manuel!!
-----Original Message-----
From: Manuel Grau [mailto:mangrar@gmail.com]
Sent: Monday, January 25, 2010 2:09 PM
To: Maven Users List
Subject: Re: Resource Filter files
Yes, is possible, I did it in my work recently. But, there is a better way. Notice what I'm doing. I have 4 profiles, activated with a var called env. So, when I call maven I always do:
mvn -Denv=pre compile (or anything)
I have four files called ${env}.pom.properties. So, you can put this in your main build tag:
<filters>
<filter>${env}.pom.properties</filter>
<filters>
So, when activate pre profile, the properties file loaded is pre.pom.properties.
El 25/01/2010, a las 21:01, <Da...@sungard.com> escribió:
> Is it possible to define filters by profile? See below for example.
>
> <build>
> ...
> <filters>
> <filter> [a filter property] </filter>
> </filters>
> ...
> </build>
>
> Thanks,
>
> David
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Resource Filter files
Posted by Manuel Grau <ma...@gmail.com>.
Yes, is possible, I did it in my work recently. But, there is a better way. Notice what I'm doing. I have 4 profiles, activated with a var called env. So, when I call maven I always do:
mvn -Denv=pre compile (or anything)
I have four files called ${env}.pom.properties. So, you can put this in your main build tag:
<filters>
<filter>${env}.pom.properties</filter>
<filters>
So, when activate pre profile, the properties file loaded is pre.pom.properties.
El 25/01/2010, a las 21:01, <Da...@sungard.com> escribió:
> Is it possible to define filters by profile? See below for example.
>
> <build>
> ...
> <filters>
> <filter> [a filter property] </filter>
> </filters>
> ...
> </build>
>
> Thanks,
>
> David