> -----Original Message-----
> From: Brett Porter [mailto:[EMAIL PROTECTED]
> Sent: 16 June 2003 06:59
> To: Maven Developers List
> Subject: Re: New feature: filtering
> 
> Hi Vincent,
> 
> This is great! However, there is one problem: you'll need to add
> <fileset ... overwrite="${resource.filtering}"> as well, as overwrite
> needs to be enabled for filtering.

Why is that? I never use the "overwrite" attribute and all my filtering
work fine...

BTW, do you have any idea why the sample-filtering project in
plugin-builds/examples does not work WRT filtering?

> 
> Also, I'd prefer to see filter loading incorporated into the POM.
> <build>
>    <resources>
>      <filters>
>        <id>my.filters</id>
>        <directory>${basedir}/../filters</directory>
>        <includes>
>          <include>**/*.properties</include>
>        </includes>
>      </filters>
>      <resource>
>        <filtersets>
>          <filterset>my.filters</filterset>
>          <filterset>base.filters</filterset>
>        </filtersets>
>        ...
>      </resource>
>    </resources>
> </build>
> 
> Resulting copy:
> <fileset dir="..." overwrite="${!resources.filtersets.isEmpty()}">
>    ...
>    <j:forEach var="filterset" items="${resources.filtersets}">
>      <filterset refid="${filterset}"/>
>    </j:forEach>
> </fileset>
> 
> I'd be happy to implement this if others agree this belongs in the
POM.

Hmmm.... Not sure. It seems to me that it is complicating the POM quite
a bit. Also, I'd prefer the following format:

<resource>
  <filters>
     <filter>
       <token/>
       <value/>
     </filter>
  </filters>
  [...]
</resource>

I'm curious to see what other think.

Thanks
-Vincent

> 
> - Brett
> 
> Vincent Massol wrote:
> > Hi,
> >
> > I've just committed a new feature in CVS: filtering of runtime
resources
> > and test resources. I've also committed a sample project that shows
how
> > to use it, in src/plugins-build/examples/simple-filtering
> >
> > Basically, whenever you want to filter some tokens in resources, use
the
> > following syntax in your project.xml:
> >
> >   <build>
> >     <sourceDirectory>src/java</sourceDirectory>
> >
> >     <resources>
> >       <resource>
> > -->     <filtering>true</filtering>
> >         <directory>src/conf</directory>
> >         <includes>
> >           <include>test.properties</include>
> >         </includes>
> >       </resource>
> >       <resource>
> >         <directory>src/conf</directory>
> >         <includes>
> >           <include>test-nofilter.properties</include>
> >         </includes>
> >       </resource>
> >     </resources>
> >
> >   </build>
> >
> > Then write a pregoal on java:jar-resources or test:test-resources in
> > your project's maven.xml and create your Ant filter tokens there.
> >
> > By default, filtering is off.
> >
> > NOTE: For some unknown reasons the filtering does not seem to work
yet
> > on the simple-filtering project. Not sure why... I'm debugging it...
> > Help welcome :-)
> >
> > Thanks
> > -Vincent
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> 
> --
> Web Developer
> f2 network ~ everything essential
> 02 8596 4437
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to