On Oct 16, 2011, at 11:43 AM, Ted Archibald wrote:
I have a simple framework that encapsulates some third party jars (httpclient). My framework builds fine on my local machine but fails on my build server. It can't find the third party jars I'm guessing.
The jars are in in Libraries/httpclient/... and I confirmed the jars exist in the hudson workspace.
My class path is:
<classpathentry kind="lib" path="Libraries/httpclient/commons-codec-1.4.jar"/>
<classpathentry kind="lib" path="Libraries/httpclient/commons-logging-1.1.1.jar"/>
<classpathentry kind="lib" path="Libraries/httpclient/httpclient-4.1.1.jar"/>
<classpathentry kind="lib" path="Libraries/httpclient/httpclient-cache-4.1.1.jar"/>
<classpathentry kind="lib" path="Libraries/httpclient/httpcore-4.1.jar"/>
<classpathentry kind="lib" path="Libraries/httpclient/httpmime-4.1.1.jar"/>
The Console output on the server is:
compile:
[mkdir] Created dir: /Library/Hudson/jobs/httpclient/workspace/bin
[wocompile] Compiling 1 source file to /Library/Hudson/jobs/httpclient/workspace/bin
[wocompile] /Library/Hudson/jobs/httpclient/workspace/Sources/com/atl/extensions/ATLHttpClientUtilities.java:7: package org.apache.http does not exist
[wocompile] import org.apache.http.HttpEntity;
Any ideas?
When you say it builds fine on your local machine, I assume you mean that it build fine using ant, yes?
It looks as though you have included the jar files in your project. If so, you should see them when you do:
ls /Library/Hudson/jobs/httpclient/workspace/httpclient/Libraries/httpclient/*jar
It is a bit non-standard that you seem to have a "httpclient" project and then, inside the Libraries folder, you have an "httpclient" directory. Is this indeed how you have it set up? Is there any reason not to put the jars into the Libraries directory directly instead of introducing another, perhaps unnecessary, build artifact?
If the jar files are being copied to the build product correctly, you should also see them when you do:
ls /Library/Hudson/jobs/httpclient/workspace/httpclient/dist/httpclient.framework/Contents/Resources/Java/*.jar
Do you also see them there?
If so, it should be working. If not, you do not have things laid out quite as you seem to intend.
- ray