【发布时间】:2016-09-24 23:11:14
【问题描述】:
我正在尝试使用 jenkins 的性能插件,但最新版本存在一些问题,如链接中所述:
https://issues.jenkins-ci.org/browse/JENKINS-27100
其中一个 cmets 是: “我认为这个问题已在主干中修复,签出并在本地构建似乎可以解决问题。我使用的是 Jenkins 版本 1.596.2”
我正在尝试做同样的事情,下载项目并在本地构建它。这是我不知道该怎么做的部分。我已经下载了eclipse(mars),但我什至不知道如何导入项目并构建它。
这是项目:
https://github.com/jenkinsci/performance-plugin
我已经下载并研究了如何导入它。显然这是一个 maven 项目(我知道 maven 可以创建 .hpi 文件)。但我无法更多地了解如何实际导入它。我可以尝试不同的教程,但我什至不确定我的方向是否正确。
我的计划是弄清楚如何将其作为 maven 项目导入并研究如何生成 .hpi。我猜这应该可行,如果我弄错了,请告诉我如何继续。
谢谢
更新
我已经能够在本地和 Eclipse 中安装 maven。但是,在这两种情况下,我都会遇到一些错误:
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Unable to locate the Javac Compiler in:
C:\Program Files\Java\jre1.8.0_91\..\lib\tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable.
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.571 s
[INFO] Finished at: 2016-05-26T17:34:22-05:00
[INFO] Final Memory: 17M/248M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project performance: Compilation failure
[ERROR] Unable to locate the Javac Compiler in:
[ERROR] C:\Program Files\Java\jre1.8.0_91\..\lib\tools.jar
[ERROR] Please ensure you are using JDK 1.4 or above and
[ERROR] not a JRE (the com.sun.tools.javac.Main class is required).
[ERROR] In most cases you can change the location of your Java
[ERROR] installation by setting the JAVA_HOME environment variable.
现在,我已经在 JAVA_HOME 中设置了 jdk。我不确定我在这里会做错什么。
编辑 2
固定编辑 1。 我已经能够使用 -mvn 命令成功构建它。但是从eclipse我得到了错误:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.9:test (default-test) on project performance: There are test failures.
[ERROR]
[ERROR] Please refer to E:\eclipseWorkSpace\performance-plugin-master\target\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
只要错误仍然存在,我似乎就无法生成 .hpi。我正在尝试找出如何解决它,但到目前为止我还没有运气。
【问题讨论】:
标签: java maven jenkins eclipse-plugin jenkins-plugins