1.在Teminal执行install命令和在Maven project --> Lifecircle直接点击 install, 依赖生成和下载的仓库不一样。
Terminal命令行执行结果(命令执行会失败):
[INFO] Installing G:\ryzh\pom.xml to E:\MavenRepository\com\ryzh0310\ryzh-manager\0.0.1-SNAPSHOT\ryzh-manager-0.0.1-SNAPSHOT.pom
[WARNING] The POM for com.ryzh0310:ryzh-common:jar:0.0.1-SNAPSHOT is missing, no dependency information available
[ERROR] Failed to execute goal on project ryzh-manager-pojo: Could not resolve dependencies for project com.ryzh0310:ryzh-manager-pojo:jar:0.0.1-SNAPSHOT: Could not find artifact com.ryzh0310:ryzh-common:jar:0.0.1-SNAPSHOT -> [Help 1]
Lifecircle直接点击 install(或者package打包):
[INFO] Installing G:\ryzh-idea\ryzh-common\target\ryzh-common.jar to E:\MavenRepository\jar\com\ryzh0310\ryzh-common\0.0.1-SNAPSHOT\ryzh-common-0.0.1-SNAPSHOT.jar
[INFO] Installing G:\ryzh-idea\ryzh-common\pom.xml to E:\MavenRepository\jar\com\ryzh0310\ryzh-common\0.0.1-SNAPSHOT\ryzh-common-0.0.1-SNAPSHOT.pom
问题原因:
maven仓库乱糟糟的,设置了一个目录放jar包和其他生成的依赖包,结果还是给我下载到和setting同目录下。
懒得检查,所以直接把原来的仓库拷贝到原来相同的一个目录里了。不然怎么样啊?还要再下一遍?