【发布时间】:2015-09-19 03:48:59
【问题描述】:
我的项目在我的本地机器上编译并运行,但在 Jenkins 上,由于找不到我的包,构建项目目标无法编译。我可以看到我认为我需要的 jar 在我的 ./bin/ 文件夹中,所以我预计类路径或我的构建项目目标会导致问题。
build.xml -> 构建项目:
<target depends="init" name="build-project">
<echo message="${ant.project.name}: ${ant.file}" />
<javac debug="true" debuglevel="${debuglevel}" destdir="bin" includeantruntime="false" source="${source}" target="${target}">
<src path="src" />
<classpath refid="sierraMadreTestScripts.classpath" />
</javac>
</target>
关于 Jenkins 的错误消息摘录:
build-project:
[echo] sierraMadreTestScripts: /data/builds/jenkins/workspace/build.xml
[javac] Compiling 1 source file to /data/builds/jenkins/workspace/bin
[javac] /data/builds/jenkins/workspace/src/testScripts/TranslatorWorkflow.java:3: error: package org.junit does not exist
[javac] import static org.junit.Assert.fail;
[javac] ^
我可以发布我的完整 build.xml、ivy.xml、ivysettings.xml 或诊断问题所需的任何其他内容。对不起,如果这真的很基本;常春藤对我来说仍然相当神秘。我正在 Eclipse 中运行我的本地项目。
【问题讨论】:
标签: java xml jenkins ivy build.xml