我试图在jenkins中安排以下ANT构建来执行java类。当我在Eclipse中运行构建配置时,它编译并执行我的java类。当我计划和执行构建时。Jenkins中的xml执行构建,但未能编译我的java类。然后,它会将构建标记为成功完成。我正在eclipse和jenkins中运行ANT版本1.8.4和Java版本1.7.003。我不知道詹金斯为什么没能编译这个类?
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- WARNING: Eclipse auto-generated file.
Any modifications will be overwritten.
To include a user specific buildfile here, simply create one in the same
directory with the processing instruction <?eclipse.ant.import?>
as the first entry and export the buildfile again. -->
<project basedir="." default="build" name="Sel_Framework_Grid">
<property environment="env"/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.7"/>
<property name="source" value="1.7"/>
<path id="TestNG.libraryclasspath">
<pathelement location="../../../.eclipse/com.springsource.sts_2.9.1.RELEASE_1574885722/plugins/org.testng.eclipse_6.7.0.20120802_0752/lib/testng.jar"/>
</path>
<path id="Sel_Framework_Grid.classpath">
<pathelement location="bin"/>
<pathelement location="lib/activation.jar"/>
<pathelement location="lib/apache-mime4j-0.6.jar"/>
<pathelement location="lib/axis.jar"/>
<pathelement location="lib/bsh-1.3.0.jar"/>
<pathelement location="lib/cglib-nodep-2.1_3.jar"/>
<pathelement location="lib/commons-codec-1.4.jar"/>
<pathelement location="lib/commons-collections-3.2.1.jar"/>
<pathelement location="lib/commons-discovery.jar"/>
<pathelement location="lib/commons-exec-1.1.jar"/>
<pathelement location="lib/commons-io-2.0.1.jar"/>
<pathelement location="lib/commons-jxpath-1.3.jar"/>
<pathelement location="lib/commons-lang-2.6.jar"/>
<pathelement location="lib/commons-logging-1.1.1.jar"/>
<pathelement location="lib/commons-logging.jar"/>
<pathelement location="lib/cssparser-0.9.5.jar"/>
<pathelement location="lib/cxf-2.5.2.jar"/>
<pathelement location="lib/geronimo-activation_1.1_spec-1.1.jar"/>
<pathelement location="lib/geronimo-annotation_1.0_spec-1.1.1.jar"/>
<pathelement location="lib/geronimo-javamail_1.4_spec-1.7.1.jar"/>
<pathelement location="lib/geronimo-stax-api_1.0_spec-1.0.1.jar"/>
<pathelement location="lib/guava-10.0.1.jar"/>
<pathelement location="lib/hamcrest-all-1.1.jar"/>
<pathelement location="lib/htmlunit-2.9.jar"/>
<pathelement location="lib/htmlunit-core-js-2.9.jar"/>
<pathelement location="lib/httpclient-4.1.2.jar"/>
<pathelement location="lib/httpcore-4.1.3.jar"/>
<pathelement location="lib/httpmime-4.1.2.jar"/>
<pathelement location="lib/jaxb-api-2.2.3.jar"/>
<pathelement location="lib/jaxb-impl-2.2.4-1.jar"/>
<pathelement location="lib/jaxb-xjc-2.2.4-1.jar"/>
<pathelement location="lib/jaxen-core.jar"/>
<pathelement location="lib/jaxen-jdom.jar"/>
<pathelement location="lib/jaxrpc.jar"/>
<pathelement location="lib/jcommander-1.13.jar"/>
<pathelement location="lib/jcspclasses.jar"/>
<pathelement location="lib/jdom.jar"/>
<pathelement location="lib/jna-3.3.0.jar"/>
<pathelement location="lib/json-20080701.jar"/>
<pathelement location="lib/junit-dep-4.10.jar"/>
<pathelement location="lib/jython.jar"/>
<pathelement location="lib/log4j-1.2.8.jar"/>
<pathelement location="lib/mail.jar"/>
<pathelement location="lib/neethi-3.0.1.jar"/>
<pathelement location="lib/nekohtml-1.9.15.jar"/>
<pathelement location="lib/operadriver-v0.8.1.jar"/>
<pathelement location="lib/phwclasses.jar"/>
<pathelement location="lib/protobuf-java-2.4.1.jar"/>
<pathelement location="lib/saaj.jar"/>
<pathelement location="lib/sac-1.3.jar"/>
<pathelement location="lib/saxpath.jar"/>
<pathelement location="lib/serializer-2.7.1.jar"/>
<pathelement location="lib/sqljdbc4.jar"/>
<pathelement location="lib/stax2-api-3.1.1.jar"/>
<pathelement location="lib/velocity-1.7.jar"/>
<pathelement location="lib/woodstox-core-asl-4.1.1.jar"/>
<pathelement location="lib/wsdl4j-1.6.2.jar"/>
<pathelement location="lib/wsdl4j.jar"/>
<pathelement location="lib/xalan-2.7.1.jar"/>
<pathelement location="lib/xercesImpl-2.9.1.jar"/>
<pathelement location="lib/xml-apis-1.3.04.jar"/>
<pathelement location="lib/xml-resolver-1.2.jar"/>
<pathelement location="lib/xmlschema-core-2.0.1.jar"/>
<pathelement location="lib/AspriseJavaPDF-free.jar"/>
<pathelement location="lib/im4java-1.3.1-1.5.jar"/>
<pathelement location="lib/im4java-1.3.1.jar"/>
<pathelement location="lib/antlr-runtime-3.4.jar"/>
<pathelement location="lib/jna-3.4.0.jar"/>
<pathelement location="lib/testng-6.5.1.jar"/>
<pathelement location="lib/testng-6.5.1.zip"/>
<pathelement location="lib/slf4j-api-1.6.4.jar"/>
<pathelement location="lib/slf4j-nop-1.6.4.jar"/>
<pathelement location="lib/dom4j-1.6.1.jar"/>
<pathelement location="lib/poi-3.8-20120326.jar"/>
<pathelement location="lib/netty-3.2.7.Final.jar"/>
<pathelement location="lib/webbit-0.4.8-SNAPSHOT.jar"/>
<pathelement location="lib/dbunit-2.4.8-compatibileWithPoi-3.5-XLSXSupport.jar"/>
<pathelement location="lib/poi-ooxml-3.8-20120326.jar"/>
<pathelement location="lib/poi-ooxml-schemas-3.8-20120326.jar"/>
<pathelement location="lib/xbean.jar"/>
<pathelement location="lib/Aspose.Words.jdk16.jar"/>
<pathelement location="lib/ojdbc14.jar"/>
<pathelement location="lib/selenium-java-2.24.1-srcs.jar"/>
<pathelement location="lib/selenium-java-2.24.1.jar"/>
<pathelement location="lib/vim25.jar"/>
<path refid="TestNG.libraryclasspath"/>
</path>
<target name="init">
<mkdir dir="bin"/>
<copy includeemptydirs="false" todir="bin">
<fileset dir="src">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="bin"/>
</target>
<target depends="clean" name="cleanall"/>
<target depends="build-subprojects,build-project" name="build"/>
<target name="build-subprojects"/>
<target depends="init" name="build-project">
<echo message="${ant.project.name}: ${ant.file}"/>
<javac debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}">
<src path="src"/>
<classpath refid="Sel_Framework_Grid.classpath"/>
</javac>
</target>
<target name="BaseSet Test">
<java classname="BaseSet" failonerror="true" fork="yes">
<arg line="C:\temp\testng-customsuite.xml c:\Jenkinstest Firefox,IE,EN,Ready"/>
<classpath refid="Sel_Framework_Grid.classpath"/>
</java>
</target>
詹金斯控制台输出
由工作区C:\Users\blank\Documents\workspace-sts-2.9.1中的用户匿名构建启动。RELEASE\Sel_Framework_Grid[Sel_Framework_Grid]$cmd。exe/C''C:\AutomatedTesting\apache-ant-1.8.4-bin\apache-ant-1.8.4\bin\ant.bat-file buildA.xml-Dbuild.sysclasspath=false-buildfile C:\Users\blank\Documents\workspace-sts-2.9.1.RELEASE\Sel\u Framework\u Grid\buildA.xml
构建子项目:
初始化:
Build-project:[echo]Sel_Framework_Grid: C:\用户\空白\Documents\workspace-sts-2.9.1。Sel_Framework_Gridxml
构建:
构建成功总时间: 0秒完成:成功
Eclipse控制台输出
构建文件:C:\Users\blank\Documents\workspace-sts-2.9.1。发布\Sel\u框架\u网格\buildf。xml构建子项目:init:build project:[echo]Sel_Framework_Grid:C:\Users\blank\Documents\workspace-sts-2.9.1。发布\Sel\u框架\u网格\buildf。xml[javac]C:\Users\blank\Documents\workspace-sts-2.9.1。发布\Sel\u框架\u网格\buildf。xml:build:BaseSet Test:[java][TestNG]Running:[java]C:\temp\TestNG customsuite。xml
似乎您没有指定从Jenkins构建运行的一组目标。这意味着将运行默认的目标“构建”:
<target depends="build-subprojects,build-project" name="build"/>
目标“BaseSet测试”是运行java类的测试。似乎不见了。我建议你改变Jenkins的工作,转而运行以下目标
build, BaseSet Test
当我尝试在maven项目上构建Jenkins时,我收到了这个错误: java和maven插件是自动安装的,经过几次研究,我找不到解决方案! 有没有人遇到过这个问题?
我创建了一个有测试的selenium Cumber框架。 测试需要打开chromeDriver,当我在IDE中运行它时,它可以正常工作,没有任何问题。 当我在Jenkins中运行项目时,虽然测试运行,但chromeDriver根本没有打开。控制台日志为: 17:32:14在4816端口启动ChromeDriver 89.0.4389.23(61B08EE2C50024BAB0004E48D2B1B
问题内容: 我希望Jenkins为开放拉取请求中的每个分支自动找到并运行测试套件。我找不到的某些Jenkins插件有可能吗? 问题答案: 最近为Jenkins发布了一个新插件-Github pull request builder 。 如果它按锡罐上的说明去做,那可能就是您想要的。
我正在使用Jenkins版本1.554.2。我有各种maven项目作业。我最近在Jenkins上创建了一个新的maven作业。它在Jenkins上运行过一次。现在当我点击立即构建时,它只显示工具提示,但不安排构建。我的另一个maven项目运行得很好。 Maven版本:3.2.1Java版本:1.7.0_55 工作类型:maven2/3项目 已安装的插件:
悬而未决-詹金斯没有mypod标签 我指的是Kubernetes Jenkins插件--总是离线的从机来配置Jenkins系统。我发现这个问题被描述为一个缺陷,我不知道这是否更新到最新的詹金斯图像。以下是链接:https://github.com/jenkinsci/kubernetes-plugin/pull/127 下一个错误: 这会不会是因为400D1ED?那么KuberNetesDecla
我正在运行下面的管道,它为DotNetCore2.2运行“构建+声呐扫描程序分析”阶段 舞台设置如下 我已经按照Sonarqube文档的建议在全局配置中安装了该工具 该dll存在并且权限已分配给Jenkins 该dll是可执行的 在该路径中手动运行时的dll-它运行 提前感谢你的帮助。