Build properties

Maven allows for additional build properties to be defined in the POM under the <properties> tag. This documents the standard that would be followed and the general exceptions.

General rules

Note that it is not mandated that all versions should be properties. In fact doing it would create another level of indirection which we would want to avoid especially since it is not common that there would be a dependency version interdependence.

Format Example Usage
dependencyGroupId.version selenium.version

Versions for two or more dependencies that are tied to one another. The dependencyGroupId would be the last component of the groupId for example org.seleniumhq.selenium would just be selenium.

Should there be a plugin that relies on the same version as a dependency, then only use the dependency version rather than making a new property for the plugin.

mainPluginId-plugin.version surefire-plugin.version Versions for two or more plugins that are tied to one another. The mainPluginId is generally derived from the shortest possible segment on the artifactId.

Exceptions

  • jdk.version the version of the JDK used in maven-compiler-plugin and maven-pmd-plugin. The wording jdk was used as it has a value of 1.x rather than the marketting terms 6.0, 7.0, 8.0 in which case that would java.version.
  • maven.version the version of the Maven API when working with plugins.
  • coding-standards.version the version of the coding standards being enforced by the plugins.