hudson-ubuntu-users team mailing list archive
-
hudson-ubuntu-users team
-
Mailing list archive
-
Message #00090
Re: Initial attempt at using jenkins ppa
On Mon, 2011-04-11 at 08:42 +0100, James Page wrote:
> > 1) the first thing I tried to do was to add monitoring of a couple
> > of
> > cron jobs I run, following the documentation at
> > https://wiki.jenkins-ci.org/display/JENKINS/Monitoring+external
> > +jobs
> > However, when I did this and ran my jobs, I found that when
> > attempting to submit results, it would fail with:
> >
> > Exception in thread "main" java.lang.NoClassDefFoundError:
> > org/jruby/ext/posix/POSIX
> > at hudson.Main.remotePost(Main.java:177)
> > at hudson.Main.run(Main.java:75)
> > at hudson.Main.main(Main.java:57)
> >
> > It seems there's a missing dependency on jnr-posix
> >
> <http://mvnrepository.com/artifact/org.jruby.ext.posix/jnr-posix>
> > that isn't being included somewhere. If I download the jar and
> > include it in the run like so:
> >
> > java -classpath ${HOME}/share/jenkins/jenkins-core-1.396.jar:
> > ${HOME}/share/jenkins/jnr-posix-1.1.6.jar hudson.Main "job"
> script.sh
> >
> > then it works
>
> I'll look into this; might be broken upstream and well looking at a
> vanilla jenkins build as well.
Looks like Jenkins does so weird Java foo to make sure it gets all of
the dependencies it needs; When jenkins runs it expands
into /var/run/jenkins/war - I managed to get this working fine using the
following command:
export HUDSON_HOME=http://localhost:8080
java -jar /var/run/jenkins/war/WEB-INF/lib/jenkins-core-1.396.jar
external-test echo hello 4
JNA posix is packaged in the web application - I guess core picks it up
auto-magically based on where it is running from.
This is all really ugly so I will work on a separate package and wrapper
script to make this much more elegant and installable outside of a
Jenkins master server.
--
James Page
Software Engineer, Ubuntu Server Team
Attachment:
signature.asc
Description: This is a digitally signed message part
Follow ups
References