[英]java modularization and cxf-xjc-plugin generated packages from xsd files
I have a module我有一个模块
module-info.java
-- --
module my.module.with.cxf.generated.packages {
requires slf4j.api;
requires spring.context;
requires java.persistence;
requires spring.beans;
requires org.apache.cxf.core;
requires java.xml;
requires java.xml.bind;
opens cxf.generated.package.no.one to my.other.module
opens cxf.generated.package.no.two to my.other.module
exports cxf.generated.package.no.one to my.other.module
exports cxf.generated.package.no.two to my.other.module
}
-- --
and then my.other.module
然后
my.other.module
module-info.java
-- --
module my.other.module {
requires my.module.with.cxf.generated.packages
}
-- --
and I get that that我明白了
package cxf.generated.package.no.one is not visible
while compiling the code.在编译代码时。 What I'm doing wrong?
我做错了什么? How to fix this issue?
如何解决这个问题?
Additional information附加信息
IntelliJ IDEA 2020.3.1
Java 11
cxf-xjc-plugin 3.3.1
So, after trial and error I discovered that arranging packages so that exports go prior to opens yields a compiled result因此,经过反复试验,我发现安排包以便在打开之前导出 go 会产生编译结果
module my.module.with.cxf.generated.packages {
requires slf4j.api;
requires spring.context;
requires java.persistence;
requires spring.beans;
requires org.apache.cxf.core;
requires java.xml;
requires java.xml.bind;
exports cxf.generated.package.no.one to my.other.module
exports cxf.generated.package.no.two to my.other.module
opens cxf.generated.package.no.one to my.other.module
opens cxf.generated.package.no.two to my.other.module
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.