maven依赖的项目报错Could not resolve dependencies for project

时间:2021-07-16 10:52:10

maven依赖的项目报错Could not resolve dependencies for project问题
maven如果依赖本地项目
如图,myservice依赖了myinterface,
maven依赖的项目报错Could not resolve dependencies for project
1 则首先将myinterface 执行clean , package

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO] --- maven-jar-plugin:2.3.2:jar (default-jar) @ myinterface ---
[INFO] Building jar: D:\dubbo-zookeeper\dubbo-zookeeper\myinterface\target\myinterface-2.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.600s
[INFO] Finished at: Mon Jul 18 12:37:11 CST 2016
[INFO] Final Memory: 19M/221M
[INFO] ------------------------------------------------------------------------

Process finished with exit code 0

2 然后执行install,将上一步执行成功的jar文件安装到responsitory

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO] --- maven-jar-plugin:2.3.2:jar (default-jar) @ myinterface ---
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ myinterface ---
[INFO] Installing D:\dubbo-zookeeper\dubbo-zookeeper\myinterface\target\myinterface-2.0-SNAPSHOT.jar to D:\Repository\dubbo-zookeeper\com\yt\dubbo\myinterface\2.0-SNAPSHOT\myinterface-2.0-SNAPSHOT.jar
[INFO] Installing D:\dubbo-zookeeper\dubbo-zookeeper\myinterface\pom.xml to D:\Repository\dubbo-zookeeper\com\yt\dubbo\myinterface\2.0-SNAPSHOT\myinterface-2.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

3 接下来myinterface 项目可以依赖myinterface的jar文件了,执行package并部署到tomcat