You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Brett Porter <br...@yahoo.com> on 2003/06/23 16:10:03 UTC

PROPOSAL: filtering resolution

Hi again,

There was recently a discussion about filtering, and a preliminary
implementation that depends on Ant and using maven.xml to configure the
filters.

I would like to propose a generic solution via the POM and whatever
filter-enabled copying technique that is being used. Let me know what
you think.

Firstly, inside <build>:
<filters>
  <file>${basedir}/conf/${maven.username}.properties</file>
  <file>${basedir}/conf/filters.properties</file>
  <file>${basedir}/../common/filters.properties</file>
  <filter>
    <token>some.property</token>
    <value>some.value</value>
  </filter>
</filters>

Or to go really crazy, have the above as a filterset, and wrap them up
in a list of filtersets. Ant introduced this functionality, but
personally I don't see the use for it as long as you keep your property
names a little different.

I also think build.properties, project.properties and
driver/default.properties should be included by default when filtering
is enabled.

Now, each <resource/> element can keep the <filtering>true</filtering>
property to acknowledge it wants to be filtered.

The reason to allow different files is that the purpose of filters is
to be able to substitute varying values, so you may not want to hard
code them into project.xml. And this configuration should be flexible
enough to work without Ant if necessary.

What are people's thoughts?

I have opened MAVEN-514 to track it.

Cheers,
Brett


http://mobile.yahoo.com.au - Yahoo! Mobile
- Check & compose your email via SMS on your Telstra or Vodafone mobile.

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