首页

通过Maven构建的项目pom文件报错"[ERROR] Failed to execute goal on project ..proxool:jar:0.9.1.."

标签:maven,POM,依赖包,Proxool,repository,pom.xml,error,构建     发布时间:2016-07-25   

一、问题描述

通过maven构建项目,配置完项目(插件配置参考“eclipse-maven-plugin关于eclipse的maven插件下载”页面),编译pom.xml报出错误,打开文件提示“Miss artifact proxool:proxool-cglib.jar:0.9.1:compile”错误,具体问题图片如下

通过Maven构建的项目pom文件报错"[ERROR] Failed to execute goal on project ..proxool:jar:0.9.1.."

运行项目报错如下,

[ERROR] Failed to execute goal on project xxx: Could not resolve dependencies for project com.xxx:xxx:war:xxx-SNAPSHOT: The following artifacts could @b@    not be resolved: proxool:proxool:jar:0.9.1, proxool:proxool-cglib:jar:0.9.1, apache-oro:jakarta-oro:jar:2.0.8, flexjson:flexjson:jar:1.9.2,@b@     com.webssky:jcseg-core:jar:1.7.2.5-1, org.ajaxanywhere:ajaxanywhere:jar:1.2.1:   The repository system is offline but the artifact  @b@     proxool:proxool:jar:0.9.1 is not available in the local repository. -> [Help 1@b@ ...@b@[ERROR] Failed to execute goal on project mds: Missing:@b@----------@b@1) proxool:proxool-cglib:jar:0.9.1@b@  Try downloading the file manually from the project website.@b@  Then, install it using the command: @b@      mvn install:install-file -DgroupId=proxool -DartifactId=proxool-cglib -Dversion=0.9.1 -Dpackaging=jar -Dfile=/path/to/file@b@  Alternatively, if you host your own repository you can deploy the file there: @b@      mvn deploy:deploy-file -DgroupId=proxool -DartifactId=proxool-cglib -Dversion=0.9.1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]@b@  Path to dependency: @b@  	1) com.xxxx:pom:pom:xxxx-SNAPSHOT@b@  	2) com.xxx:xxx-persist:jar:xxxx-SNAPSHOT@b@  	3) proxool:proxool-cglib:jar:0.9.1@b@2) proxool:proxool:jar:0.9.1@b@  Try downloading the file manually from the project website.@b@  Then, install it using the command: @b@      mvn install:install-file -DgroupId=proxool -DartifactId=proxool -Dversion=0.9.1 -Dpackaging=jar -Dfile=/path/to/file@b@  Alternatively, if you host your own repository you can deploy the file there: @b@      mvn deploy:deploy-file -DgroupId=proxool -DartifactId=proxool -Dversion=0.9.1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]@b@  Path to dependency: @b@  	1) com.xxxx:pom:pom:xxxx-SNAPSHOT@b@  	2) com.xxx:xxx-persist:jar:xxxx-SNAPSHOT@b@  	3) proxool:proxool:jar:0.9.1@b@----------@b@2 required artifacts are missing.@b@@b@for artifact: @b@  com.xx:pom:xxxx-SNAPSHOT@b@@b@from the specified remote repositories:@b@  maven2 (http://repo1.maven.org/maven2, releases=true, snapshots=true)@b@-> [Help 1]@b@[ERROR] @b@[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.@b@[ERROR] Re-run Maven using the -X switch to enable full debug logging.@b@[ERROR] @b@[ERROR] For more information about the errors and possible solutions, please read the following articles:@b@[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MultipleArtifactsNotFoundException

二、解决步骤

1. 切换到"Dependency Hierarchy"视图,搜索"proxool"查找父节点依赖包“xx-common-persist.jar”,双击“proxool:0.9.1”打开依赖包信息提示“Could not resolve artifact”

通过Maven构建的项目pom文件报错"[ERROR] Failed to execute goal on project ..proxool:jar:0.9.1.."

2. 综合分析判断本地库没有成功下载proxool依赖包,复制正确的依赖包到本地库路径下(如不知道proxool报文路径,可以全路径搜索或打开步骤1中父节点依赖pom文件查找)

通过Maven构建的项目pom文件报错"[ERROR] Failed to execute goal on project ..proxool:jar:0.9.1.."

3. 右击项目如下图所示,刷新依赖包

通过Maven构建的项目pom文件报错"[ERROR] Failed to execute goal on project ..proxool:jar:0.9.1.."

4. 项目pom.xml没有问题,运行项目一切正常

通过Maven构建的项目pom文件报错"[ERROR] Failed to execute goal on project ..proxool:jar:0.9.1.."