在Java 1.6.x下在Mac OSX Lion上构建Netty

时间:2012-05-03 02:51:40

标签: netty

我正在尝试在Mac OS X Lion上构建具有Java 1.6.x的Netty项目。 (IDE:NetBeans)。 然后我收到以下错误:

[enforcer:enforce]
Rule 0: org.apache.maven.plugins.enforcer.RequireJavaVersion failed with message:
Detected JDK Version: 1.6.0-31 is not in the allowed range [1.7.0,).
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------

如果Netty只需要java 1.5或更高版本,我正在寻找一种在java 1.6.x下启用编译的方法。

提前致谢。

1 个答案:

答案 0 :(得分:1)

你需要构建java7但只需要运行java5。这是因为我们在运行时启用/禁用某些功能,具体取决于java版本。

另见[1]。

[1] https://github.com/netty/netty/blob/4e528c10fae3abaa932e751c831aa48a23645744/README.md