错误信息:
[ERROR] Failed to execute goal on project xiaoyiweifu-core: Could not resolve dependencies for project com.xiaoyiweifu:x
iaoyiweifu-core:jar:0.0.1-SNAPSHOT: The following artifacts could not be resolved: javax.jms:jms:jar:1.1, com.sun.jdmk:j
mxtools:jar:1.2.1, com.sun.jmx:jmxri:jar:1.2.1: Could not transfer artifact javax.jms:jms:jar:1.1 from/to java.net (http
s://maven-repository.dev.java.net/nonav/repository): No connector available to access repository java.net (https://maven
-repository.dev.java.net/nonav/repository) of type legacy using the available factories WagonRepositoryConnectorFactory
解决方法是:
消除多模块依赖配置重复,我们知道依赖是可以继承的,既父模块中定义的依赖,子模块可自动继承,但是有些子模块需要,有些不需要的情况下该怎么办呢?
那就必须用 <dependencyManagement> (在父pom中使用)标签了,子模块的 pom 中就可以 <dependency><groupId>junit</groupId><artifactid>junit</artifactId> </dependency>,
这样引用,没有引用的就不会自动继承;