Kenney Westerhof wrote:
> On Wed, 24 Aug 2005, Carsten Ziegeler wrote:
> 
> 
> The difference is that you only define the _tokens_ in the pom, not their
> values. This indicates which tokens are used by the resource files.
Ah, sorry, I didn't notice this detail in your previous post. Ok, now I
get it.

> 
> Specifying both key and value pairs in the pom doesn't allow for users of
> the project to specify their own values without modifying the pom itself.
True.

> You could specify a 'src/main/conf/config.properties' in the pom,
> and supply a sample file 'src/main/conf/config.properties.sample' (or even
> in the current dir) that users have copy & edit to fill in their specific
> settings (smtp servers, hostname, port, location of tomcat/j2ee containers
> etc..)
> 
> That way even in a big team each teammember should configure their
> test/build environment using the sample file (if this is needed).
> 
> I used to work on projects using this mechanism (using ant), having
> a build-dev.properties, build-live.properties, build-test.properties
> for different environments, running and with -Dbuild=dev would load
> that set of properties.
> 
> (as you can see, my main concern in specifying properties file is for use
> in different environments, not centralizing the token data per se).
> 
Ok, I see now and partially agree :) I think you have two different
kinds of property files: one for the project maintenance (or whatever
you call this) and one for user settings. The first one is not intended
to be changed by a user, it contains important settings for the project
at a central place.
Now, what do you think of the following:
a) the resource plugin by default uses a filters.properties file (if
present) - we can of course use a different name/location.

b) You can specify additional property files on the resource plugin. If
two property files contain the same property, the last one wins (or the
first one?) You can specify for each property file if the absence of the
file is an error. This allows to simply specify a "property.samples" and
the "property" file and it's not an error if the "property" file is
missing and the "property" file has precedence over the
"property.samples" file.

c) The POM gets the filtering tags at the resource element: in this
filtering element you can specify which tokens are replaced. In addition
we provide a way to say: replace all tokens. This is to make it more
user friendly.

WDYT?
-- 
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

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

Reply via email to