maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mirko Friedenhagen <mfriedenha...@gmail.com>
Subject Re: What's better, properties or configuration
Date Sat, 26 Jan 2013 19:58:50 GMT
I use properties a lot especially in parent poms and especially for
versions of dependencies and plugins.

By this testing new versions in "real" projects is much easier.

Regards Mirko
-- 
Sent from my mobile
On Jan 26, 2013 9:10 AM, "Joachim Durchholz" <jo@durchholz.org> wrote:

> E.g.
>
>   <properties>
>     <maven.compiler.source>1.7</**maven.compiler.source>
>     <maven.compiler.target>1.7</**maven.compiler.target>
>   </properties>
>
> vs.
>
>   <build>
>     <plugins>
>       <plugin>
>         <groupId>org.apache.maven.**plugins</groupId>
>         <artifactId>maven-compiler-**plugin</artifactId>
>         <version>3.0</version>
>         <configuration>
>           <source>1.7</source>
>           <target>1.7</target>
>         </configuration>
>       </plugin>
>     </plugins>
>   </build>
>
> I can see several points that might factor into a decision, but I'm not
> sure which of them are relevant in practice:
>
> - Configuration can be varied on a per-<execution> level, properties
> cannot. Not so relevant for compiling where you typically split each
> compiler run into a separate pom, more for other plugins.
> - Properties can be varied using profiles, configuration cannot.
> - At least for the compiler plugin, examples in the tutorials and docs
> invariably show the configuration approach. (Is there a reason why
> properties are generally not as good as configuration?)
> - Properties are FAR more compact.
> - When configuring a plugin, only a subset of its configuration is usually
> taken from properties, so once you need to configure, using properties does
> not give an advantage anymore.
> - Anything else?
>
> Regards,
> Jo
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@maven.**apache.org<users-unsubscribe@maven.apache.org>
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message