Where can I drop a jar for it to be generally available to jenkins?

46 views
Skip to first unread message

Guy Matz

unread,
Apr 8, 2016, 9:53:49 AM4/8/16
to jenkins...@googlegroups.com
Is there a magic directory I can put a jar for it to available to Jenkins?  Or - ugh - Do I need to put it in a plugin?

Thanks!!

Mark Waite

unread,
Apr 8, 2016, 12:23:52 PM4/8/16
to jenkins...@googlegroups.com
The userContent directory on the Jenkins server serves content over http if that would help. 

On Fri, Apr 8, 2016 at 7:53 AM Guy Matz <guy...@gmail.com> wrote:
Is there a magic directory I can put a jar for it to available to Jenkins?  Or - ugh - Do I need to put it in a plugin?

Thanks!!

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtUAMSe2FkO%3DWSOatWBrVrCaSMnp0BeVbdBH8%2BGsSJ7scQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Guy Matz

unread,
Apr 8, 2016, 3:45:02 PM4/8/16
to jenkins...@googlegroups.com
Thanks for the reply!  I'm not actually looking to server content, if that's what you're getting at.  I'm looking for a way to make a jar available to groovy scripts run as a build step.

Thanks again!

Brian Ray

unread,
Apr 11, 2016, 5:15:58 PM4/11/16
to Jenkins Users
We download jars in the job's workspace after checking out Groovy scripts and set the classpath env variable prior to running the Groovy build step. In Freestyle jobs we use the Artifactory plugin to grab these jars and the EnvInject plugin to set the classpath. In our Pipeline jobs we use Groovy scripts to grab them and the Pipeline script to set the classpath. There are probably dozens of other ways to get jars to the workspace.

Chris Price

unread,
Aug 2, 2016, 12:20:06 PM8/2/16
to Jenkins Users


On Monday, April 11, 2016 at 2:15:58 PM UTC-7, Brian Ray wrote:
We download jars in the job's workspace after checking out Groovy scripts and set the classpath env variable prior to running the Groovy build step. In Freestyle jobs we use the Artifactory plugin to grab these jars and the EnvInject plugin to set the classpath. In our Pipeline jobs we use Groovy scripts to grab them and the Pipeline script to set the classpath. There are probably dozens of other ways to get jars to the workspace.

Sorry for resurrecting an old thread, but I've been battling with a similar issue today and my searching led me to this post.  When you say "<use> the Pipeline script to set the classpath", do you mean something like a call to `this.class.classLoader.addURL` from within your Pipeline script?  Or is there another way to manipulate the classpath for Pipeline scripts?  Also, if you're doing it via reference to the classLoader from within the Pipeline script, I presume that that means that you needed to manipulate the sandbox permissions?

 
Reply all
Reply to author
Forward
0 new messages