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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to