For projects that use Maven as the build system. This causes Hudson to invoke Maven with the given goals and options. Non-0 exit code from Maven makes Hudson to mark the build as a failure. Some maven versions have a bug where it doesn't return the exit code correctly.

Hudson passes various environment variables to Maven, which you can acecss from Maven as "${env.VARIABLENAME}".

The same variables can be used in the command-line argument (as if you are invoking this from shell.) For example, you can specify -DresultsFile=${WORKSPACE}/${BUILD_TAG}.results.txt