This seems reasonable but you might want to change the order of those
filters. I am fairly certain variable values in Maven2 work like Ant
-- first value for a variable "wins". (Happy to be proven wrong here,
but I believe I've read this on the list or run into it myself, forget
now...)

If you put the src/main/filters value last, and none of the other
files existed in the file system, then its values would be used.

Otherwise, one of the other file values would be used, as these values
are local to this particular workstation deployment.

Wayne

On 4/6/06, EJ Ciramella <[EMAIL PROTECTED]> wrote:
> Nvm - I'm using the filters now and have a list:
>
>      <filters>
>       <filter>src/main/filters/filter.properties</filter>  default one
>       <filter>${user.home}/${pom.name}.properties</filter> usr override
> per project
>
> <filter>${user.home}/${pom.name}-${pom.version}.properties</filter> user
> override per project per version
>      </filters>
>
> Is this the right way to do this?
>
> -----Original Message-----
> From: EJ Ciramella [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 06, 2006 6:58 PM
> To: Maven Users List
> Subject: Config files
>
> I thought I had a solution for this, but I'm left wondering now.
>
> say I have a config file with a db connection string in it.  By default,
> users should be able to build/connect/test/etc. So I created a filter
> and am applying that filter to these config files.
>
> But say a user wants to override this setting.  I created a profile in
> my settings.xml file:
>
> <settings>
>  <profiles>
>    <profile>
>      <activation>
>        <activeByDefault/>
>      </activation>
>      <properties>
>       <db.port>9999</db.port>
>      </properties>
>    </profile>
>  </profiles>
> </settings>
>
> But this port setting is ignored (and when I comment it out from the
> filter file, it simply isn't expanded).
>
> What am I missing?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to