I've noticed that some plugins feature expressions that, when present as
properties, will override configuration values.

So, taking the maven-compiler-plugin as an arbitrary example, I can
configure its "source" property like this:

<configuration>
  <source>1.6</source>
</configuration>

...or I could simply set a property in my pom.xml file (i.e. instead of the
configuration above):

<maven.compiler.source>1.6</maven.compiler.source> <!-- the expression is
defined according to the docs as maven.compiler.source -->

...or I could eliminate that and make sure that I always specified the
following on the command line (an admittedly contrived solution):

-Dmaven.compiler.source=1.6

So far this all makes sense to me.

Now let's introduce inheritance.  Suppose I have a pom.xml that extends
another one.  Suppose the parent opts for solution #2 above.  That is,
inside its <properties> section it does this:

<maven.compiler.source>*1.6*</maven.compiler.source>

...and furthermore does not specify an explicit configuration for the
maven-compiler-plugin.  Now suppose the child introduces this:

<configuration>
  <source>*1.5*</source>
</configuration>

Will the maven-compiler-plugin executed in the child be configured with (at
build time) a source value of 1.6 or 1.5?

Thanks,
Laird
-- 
http://about.me/lairdnelson

Reply via email to