Nick,
The only solution I could find is to create a 'filters' directory at the
project top level. The structure would be:
project/filters/filter-dev.properties
project/module1/src/main/filters/filter-dev.proerties
and define the following in the POM:
<filters>
<filter>${basedir}/../filters/filter-${environment}.properties</filter>
<filter>src/main/filters/filter-${environment}.properties</filter>
</filters>
I don't like the fact it relies on relative path, but it works. Would be
better if there were a variable refering to the top level project directory,
but I couldn't find one.
Hope it helps.
Aymeric
klauer wrote:
>
> Hey Aymeric,
>
> Did you ever find a solution to this? I can see how this might be a
> sticking point in a project or two in our team, so if you do find
> something
> or hear back from anyone else, let us (maven user group) know.
>
> -Nick
>
> On Wed, Mar 17, 2010 at 5:01 AM, Aymeric Alibert
> <[email protected]>wrote:
>
>>
>> I have a maven project with multiples modules.
>> I defined a filter for configuration in my master pom:
>> <filters>
>>
>> <filter>src/main/filters/filter-${environment}.properties</filter>
>> </filters>
>>
>> All is good and I can use a filter properties file at the module level
>> (one
>> for each module).
>> However some of the properties are common to all modules, so I would like
>> to
>> use a global filter for some of the properties. Anybody knows how to
>> achieve
>> that with maven?
>>
>> Thanks,
>>
>> Aymeric
>> --
>> View this message in context:
>> http://old.nabble.com/global-filter-on-multi-modules-project-tp27929774p27929774.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
>
--
View this message in context:
http://old.nabble.com/global-filter-on-multi-modules-project-tp27929774p28188617.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]