现在,我们正尝试使用Jenkins CI工具来部署maven项目。
我已经创建了一个示例maven项目,并添加了本地存储库的存储库URL和凭据,然后单击了Build。然后Jenkins将我的代码下载到特定作业的工作空间中,并下载了所有的依赖项,但是我在Jenkins控制台输出中得到了如下错误,如下所示。
Downloaded: http://repo.maven.apache.org/maven2/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar (61 KB at 31.6 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.6/commons-codec-1.6.jar (228 KB at 74.4 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.jar (425 KB at 42.2 KB/sec)
Downloading: http://repo.bodar.com/com/googlecode/totallylazy/totallylazy/1.20/totallylazy-1.20.jar
Downloaded: http://repo.bodar.com/com/googlecode/totallylazy/totallylazy/1.20/totallylazy-1.20.jar (949 KB at 718.8 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3:00.677s
[INFO] Finished at: Thu Aug 20 01:44:31 IST 2015
[INFO] Final Memory: 9M/22M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project gcrtesting: Could not resolve dependencies for project com.vidyayug.testing:gcrtesting:jar:0.0.1-SNAPSHOT: Could not find artifact com.sun:tools:jar:0 at specified path /usr/lib/jvm/java-7-openjdk-i386/jre/../lib/tools.jar -> [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
[JENKINS] Archiving /var/lib/jenkins/workspace/Maven testing selenium/pom.xml to com.vidyayug.testing/gcrtesting/0.0.1-SNAPSHOT/gcrtesting-0.0.1-SNAPSHOT.pom
channel stopped
Finished: FAILURE有人能帮我解决这个问题吗?
发布于 2015-08-20 12:26:29
看起来它在搜索特定于甲骨文的库,并且您正在使用打开的jdk。切换到Oracle jdk可能会解决您的问题。
在Jenkins服务器中安装Oracle jdk,并将JAVA_HOME/PATH变量指向Oracle jdk。
发布于 2015-08-20 12:32:18
签入cmd (或shell,取决于您的操作系统)
java -version和这条路
echo %JAVA_HOME%您可能使用的是jre而不是jdk。
https://stackoverflow.com/questions/32118166
复制相似问题