【发布时间】:2018-03-12 02:24:47
【问题描述】:
我的项目依赖于 Netty Epoll 传输。这是依赖关系:
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<version>${netty.version}</version>
<classifier>${epoll.os}</classifier>
</dependency>
这个依赖的自动生成的模块名称是:
netty.transport.native.epoll
由于 native 关键字在 Java 9 中被保留,我无法将此模块作为依赖项添加到我的项目中:
module core {
requires netty.transport.native.epoll;
}
由于:
module not found: netty.transport.<error>
此外,jar 工具--describe-module 报告以下内容:
无法为以下各项派生模块描述符: netty-transport-native-epoll-4.1.17.Final-SNAPSHOT-linux-x86_64.jar netty.transport.native.epoll:无效的模块名称:'native' 不是 Java标识符
有什么解决方法吗? (当然,“发布正确的 netty 工件”除外)。
EDIT:
作为维护者的快速修复 - 您可以添加下一行来构建:
<manifestEntries>
<Automatic-Module-Name>netty.transport.epoll</Automatic-Module-Name>
</manifestEntries>
【问题讨论】:
标签: java netty java-9 java-platform-module-system module-info