You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "mr.x" <mr...@tele2.ch> on 2004/07/09 12:02:09 UTC

Using ${pom.*} variables while filtering

Hi 

Im want to filter some files while creating my app
(Manifest, some *.properties) and i would like to use some pom variables in
my filtered output.

            <resource>
                <directory>${basedir}/src/resources</directory>
                <includes>
                    <include>*.properties</include>
                    <include>**/*.whatever</include>
                </includes>
                <filtering>true</filtering>
            </resource>
Seems to work only if some ant-like filter files are loaded before
filtering. 

Is there a way to access pom variables for filtering ? Other ideas?

Thanks for help

Rolf


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: AW: Using ${pom.*} variables while filtering

Posted by Brett Porter <br...@gmail.com>.
You can do this:

<ant:filter token="pom.artifactId" value="${pom.artifactId}" />

If you want to dig into Jelly, you could possibly loop through
${context.variables} and create a filter for each, or for all starting
in pom.*. The tutorials on dIon's blog would help there.

dIon: any progress on turning those into xdoc?

Thanks,
Brett

On Sun, 11 Jul 2004 14:26:08 +0200, mr.x <mr...@tele2.ch> wrote:
> Hmm...
> 
> Idealy i wanted to use ${pom.artifactId} from project.xml as filter
> argument:
> 
> <ant:filter filtersfile="[a property file]" />
> 
> Only supports property-files -> Problem
> 
> Or is there a way to create a property-file from the project.xml
> (jelly-script)
> 
> Thx
> rolf
> 
> -----Ursprüngliche Nachricht-----
> Von: Brett Porter [mailto:brett.porter@gmail.com]
> Gesendet: Sonntag, 11. Juli 2004 02:49
> An: Maven Users List
> Betreff: Re: Using ${pom.*} variables while filtering
> 
> for now, you need to set the ant filters manually.
> 
> On Fri, 9 Jul 2004 12:02:09 +0200, mr.x <mr...@tele2.ch> wrote:
> > Hi
> >
> > Im want to filter some files while creating my app (Manifest, some
> > *.properties) and i would like to use some pom variables in my
> > filtered output.
> >
> >             <resource>
> >                 <directory>${basedir}/src/resources</directory>
> >                 <includes>
> >                     <include>*.properties</include>
> >                     <include>**/*.whatever</include>
> >                 </includes>
> >                 <filtering>true</filtering>
> >             </resource>
> > Seems to work only if some ant-like filter files are loaded before
> > filtering.
> >
> > Is there a way to access pom variables for filtering ? Other ideas?
> >
> > Thanks for help
> >
> > Rolf
> >
> > ---------------------------------------------------------------------
> > 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


AW: Using ${pom.*} variables while filtering

Posted by "mr.x" <mr...@tele2.ch>.
Hmm...

Idealy i wanted to use ${pom.artifactId} from project.xml as filter
argument:

<ant:filter filtersfile="[a property file]" /> 

Only supports property-files -> Problem 

Or is there a way to create a property-file from the project.xml
(jelly-script)

Thx
rolf


-----Ursprüngliche Nachricht-----
Von: Brett Porter [mailto:brett.porter@gmail.com] 
Gesendet: Sonntag, 11. Juli 2004 02:49
An: Maven Users List
Betreff: Re: Using ${pom.*} variables while filtering

for now, you need to set the ant filters manually.

On Fri, 9 Jul 2004 12:02:09 +0200, mr.x <mr...@tele2.ch> wrote:
> Hi
> 
> Im want to filter some files while creating my app (Manifest, some 
> *.properties) and i would like to use some pom variables in my 
> filtered output.
> 
>             <resource>
>                 <directory>${basedir}/src/resources</directory>
>                 <includes>
>                     <include>*.properties</include>
>                     <include>**/*.whatever</include>
>                 </includes>
>                 <filtering>true</filtering>
>             </resource>
> Seems to work only if some ant-like filter files are loaded before 
> filtering.
> 
> Is there a way to access pom variables for filtering ? Other ideas?
> 
> Thanks for help
> 
> Rolf
> 
> ---------------------------------------------------------------------
> 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: Using ${pom.*} variables while filtering

Posted by Brett Porter <br...@gmail.com>.
for now, you need to set the ant filters manually.

On Fri, 9 Jul 2004 12:02:09 +0200, mr.x <mr...@tele2.ch> wrote:
> Hi
> 
> Im want to filter some files while creating my app
> (Manifest, some *.properties) and i would like to use some pom variables in
> my filtered output.
> 
>             <resource>
>                 <directory>${basedir}/src/resources</directory>
>                 <includes>
>                     <include>*.properties</include>
>                     <include>**/*.whatever</include>
>                 </includes>
>                 <filtering>true</filtering>
>             </resource>
> Seems to work only if some ant-like filter files are loaded before
> filtering.
> 
> Is there a way to access pom variables for filtering ? Other ideas?
> 
> Thanks for help
> 
> Rolf
> 
> ---------------------------------------------------------------------
> 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