maven安装jar包到本地仓库和myeclipse开发报错Missing artifact xx解决方法

来源:互联网 发布:淘宝上很火的安娜家 编辑:程序博客网 时间:2024/06/07 02:46

maven安装jar包到本地仓库和myeclipse开发报错Missing artifact xx解决方法

1.前提:maven安装正确,可以在cmd窗口使用命令 mvn -v查看是否成功。报错是因为本地仓库没有安装jar。
2.如报错pom.xml如下:
<dependency><groupId>com.epudge</groupId><artifactId>core</artifactId><version>1.0.1</version></dependency>

在cmd窗口对应的安装命令如下:
mvn install:install-file -DgroupId=com.epudge -DartifactId=core -Dversion=1.0.1 -Dfile=E:\MyEclipse2014\bgyProject\com\epudge\core\1.0.1\core-1.0.1.jar -Dpackaging=jar
解释如下:
mvn install:install-file -Dfile=jar包的位置 -DgroupId=上面的groupId -DartifactId=上面的artifactId -Dversion=上面的version -Dpackaging=jar

在对应的本地仓库如下:


3.使用meven update project  错误即可消失

阅读全文
0 0
原创粉丝点击