Reputation: 25156
I am running my Ant build.xml
file both locally and on a server running Jenkins.
Locally, inside Eclipse, the build works wonderfully. I set the classpath using:
<path id="classpath">
<fileset dir="${lib.dir}" includes="**/*.jar" />
</path>
and then I use the following when I run a target:
<javac srcdir="${src.dir}" destdir="${build.dir}" includeantruntime="false">
<classpath refid="classpath" />
</javac>
When I debug using echo
the classpath shows all the available jars which are in my project/lib
folder.
However, when I Jenkins fetches this build.xml
file and runs it remotely, it prints an empty classpath (using the same echo
target).
Why do my class paths differ based on Eclipse versus Jenkins?
Upvotes: 1
Views: 1954
Reputation: 3915
Your build environment on you Jenkins server is going to look a bit different from your desktop dev env.
Sanity check: where/how is ${lib.dir} provided with a value? Usually it is set with a property in the build file - can you maybe post that here also?
Upvotes: 4