-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
jdk21模块化项目集成nacos.client报错 #12551
Comments
因为模块命名为com.google.gson,在META-INF/version/9/module-info中,😮💨 |
不理解官方为何如此命名 |
没看懂问题,麻烦提供更详细的描述和报错上下文信息。 |
原因我想我明白了,maven-shade-plugin插件打包时会把gson里的模块化描述文件带过来,导致nacos-client错误的使用了gson的模块化描述文件 |
还是没明白, 这个shaded进来的描述文件会影响什么? |
就会导致当前issues的问题,shade阶段不会编译,只是二次打包,所以不会暴露问题,https://openjdk.org/jeps/201。复现方法,构建一个模块化工程,requires nacos-client就会复现问题 |
还是没太理解。 2.0.0也使用了shaded,为什么没有问题呢。 |
2.0.0依赖的gson还没有模块化,所以没有问题 |
那有办法修复吗 |
shaded排除掉所有的模块描述文件,因为也不确定后续哪个依赖突然模块化了 |
编译报错 java: 找不到模块: nacos.client
The text was updated successfully, but these errors were encountered: