As suggested by @Godin on the developer list use toolchains.

See README.md and http://maven.apache.org/plugins/maven-toolchains-plugin/toolchains/jdk.html
for further information.