@Anders, on the contrary, pom properties work quite well. @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. 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.
HTH, Doug On Sat, Jan 26, 2013 at 8:15 AM, Anders Hammar <[email protected]> wrote: > Config is the way to go. I don't even think that pom properties work, it > has to be Java system properties (i.e. specified on command line). > > /Anders > > > On Sat, Jan 26, 2013 at 9:10 AM, Joachim Durchholz <[email protected]> > 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< > [email protected]> > > For additional commands, e-mail: [email protected] > > > > >
