[英]How to add Spark dependencies in spring-boot multi module Java 11 project
Whenever I am adding a module-info.java in my multi-module project I cannot import my Spark dependencies - everything else seems to be working每当我在我的多模块项目中添加 module-info.java 时,我都无法导入我的 Spark 依赖项 - 其他一切似乎都在工作
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.12</artifactId>
<version>3.0.0-preview2</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-sql_2.12</artifactId>
<version>3.0.0-preview2</version>
</dependency>
IntelliJ tries to readd Maven Dependency without any result. IntelliJ 尝试读取 Maven 依赖项,但没有任何结果。
My module-info looks like:我的模块信息看起来像:
module common {
exports [...]
requires lombok;
requires spring.data.jpa;
requires spring.data.commons;
requires org.apache.commons.lang3;
requires spring.context;
requires spring.web;
requires spring.security.core;
requires com.google.common;
requires org.json;
requires spring.core;
requires spring.beans;
requires com.fasterxml.jackson.core;
requires com.fasterxml.jackson.databind;
requires spring.jcl;
requires spring.webmvc;
requires mongo.java.driver;
requires org.hibernate.orm.core;
requires com.fasterxml.jackson.dataformat.csv;
requires java.sql;
}
It is not possible to add org.apache.* in my module-info.java either.也不可能在我的 module-info.java 中添加 org.apache.*。
Is it possible that Spark is not ready for Jigsaw modules and Java 9+? Spark 是否可能还没有为 Jigsaw 模块和 Java 9+ 做好准备?
Is it possible that spark is not ready for Jigsaw modules and Java 9+?
spark 是否有可能没有为 Jigsaw 模块和 Java 9+ 做好准备?
It does hold true for spark
.它确实适用于
spark
。 Two straight reasons that I can vouch for are:我可以保证的两个直接原因是:
They do not have an entry for他们没有条目
Automatic-Module-Name: <module-name>
in the artifact's MANIFEST.MF
file.在工件的
MANIFEST.MF
文件中。
If you try describing their artifacts using the jar
tool如果您尝试使用
jar
工具描述他们的工件
jar --describe-module --file=<complete-path>/spark-core_2.12-3.0.0-preview2.jar
This would fail to derive the module descriptor for a similar reason as mentioned in this answer.由于本答案中提到的类似原因,这将无法派生模块描述符。
Few resources that might be useful once you reach here:到达此处后可能有用的资源很少:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.