Maven 时出现 Java 版本的错误

[WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireJavaVersion failed with message: Detected JDK Version: 1.5.0-21 is not in the allowed range [1.6.0,]. [HUDSON] Archiving D:\Dkits\hudson\jobs\hudson\workspace\trunk\pom.xml to D:\Dkits\hudson\jobs\hudson\modules\org.jvnet.hudson.main$pom\builds\2010-07-20_22-01-35\archive\org.jvnet.hudson.main\pom\1.363\pom.xml [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 56 seconds [INFO] Finished at: Tue Jul 20 22:02:37 EDT 2010 [INFO] Final Memory: 23M/44M [INFO] ------------------------------------------------------------------------ channel stopped Finished: FAILURE

这是因为 Java 的版本不符合编译 Maven 的要求。

请将 Java 的版本升级到 1.6