Jenkins自动部署:本地jar包无法下载{{1009}}

虽然本地已经安装了jar,但是还是报本地安装的jar无法找到

安装命令:

mvn install:install-file -Dfile=ojdbc-6.0.jar -DgroupId=com.oracle  -DartifactId=ojdbc -Dversion=6.0 -Dpackaging=jar

mvn install:install-file -Dfile=pinyin-2.5.0.jar -DgroupId=pinyin  -DartifactId=pinyin -Dversion=2.5.0 -Dpackaging=jar

mvn install:install-file -Dfile=limp-framework-1.1.3-RELEASE.jar  -DgroupId=com.chinasofti  -DartifactId=limp-framework -Dversion=1.1.3-RELEASE -Dpackaging=jar -DgeneratePom=true  -DcreateChecksum=true

原因是 jenkins 与 操作系统上使用了不同的 maven本地仓库 需要将 操作系统上.m2上的 jar 拷贝到 jenkins的仓库 路径 /var/lib/jenkins/.m2/repository


【总结:配置好maven地址后,配置本地仓库最好配置jenkins默认的仓库地址】

错误信息

[INFO] chinasofti-uums-app ............................... FAILURE [25.568s]
[INFO] chinasofti-uums-web Maven Webapp .................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 26.059s
[INFO] Finished at: Sat May 12 18:54:19 CST 2018
[INFO] Final Memory: 7M/29M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project chinasofti-uums-app: Could not resolve dependencies for project chinasofti-uums:chinasofti-uums-app:jar:1.0-SNAPSHOT: The following artifacts could not be resolved: com.chinasofti:limp-framework:jar:1.1.3-RELEASE, com.oracle:ojdbc:jar:6.0, pinyin:pinyin:jar:2.5.0: Could not find artifact com.chinasofti:limp-framework:jar:1.1.3-RELEASE in central (http://repo.maven.apache.org/maven2) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn  -rf :chinasofti-uums-app
Build step 'Invoke top-level Maven targets' marked build as failure
Finished: FAILURE

你可能感兴趣的:(Jenkins)