tools:require-java-version

Forces the build to fail if the version of Java is not compatible.

Mojo Attributes:

  • Requires a Maven 2.0 project to execute.
  • Automatically executes within the lifecycle phase: validate

Required Parameters

Name Type Description
version String Specify the required version of Java (1.1, 1.2, 1.3, 1.4, 1.5). Can specify a suffix of '+' to allow any version equal to or newer or '*' to allow versions in the same group. For example, version=1.4+ would be allowed on a JDK 1.5 VM, version=1.5* would allow any JDK 1.5, but not JDK 1.6.

Optional Parameters

Name Type Description
skip boolean Flag to skip the version check. Default value is false.

Parameter Details

skip

Flag to skip the version check.

  • Type: boolean
  • Required: No
  • Expression: ${requirejavaversion.skip}
  • Default: false

version Specify the required version of Java (1.1, 1.2, 1.3, 1.4, 1.5). Can specify a suffix of '+' to allow any version equal to or newer or '*' to allow versions in the same group. For example, version=1.4+ would be allowed on a JDK 1.5 VM, version=1.5* would allow any JDK 1.5, but not JDK 1.6.
  • Type: java.lang.String
  • Required: Yes