maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <joerg.schai...@gmx.de>
Subject Re: What's better, properties or configuration
Date Sat, 26 Jan 2013 21:04:19 GMT
Joachim Durchholz wrote:

> Am 26.01.2013 16:45, schrieb Doug Douglass:
>> @Anders, on the contrary, pom properties work quite well.
> 
> I concur. I've used both approaches, and both did exactly what they were
> supposed to (verified by checking Maven output at "debug" verbosity).
> 
>> @Jo, one consideration I think you missed is when configuring several
>> plugins with the same value it's handy (best?) to have that value
>> maintained in a single location.
> 
> Right, I forgot to add that one.
> I'm setting UTF8 via property because (a) I routinely use UTF-8 for all
> sources and (b) more than one plugin uses that property and complains if
> the character set isn't set.
> 
>  > We do this in our poms, and I've seen it
>> in others, for things like file encoding and java source level that
>> effect several plugins.
> 
> Java source level affects multiple plugins?
> Hm... oh, yes, I guess it's relevant for style checkers and such. I
> haven't had need for that yet, so I missed that the Java version is
> probably really best set via properties.
> 
> Thanks, that settles it :-)
> (unless somebody comes along with entirely new aspects to consider)

We use properties for all dependency versions (in the dependencyMgmt) and 
all plugin versions.

If you inherit from a global master POM you have one big advantage by 
setting in a local POM the property only: It will affect the effective-pom 
i.e. the depMgmt section inherited from the parent will use the locally 
defined properties. This is handy if you have to lock the version for a 
single project only to something else, you would normally use.

Cheers,
Jörg


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


Mime
View raw message