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 
> <https://wiki.jenkins-ci.org/display/JENKINS/Artifactory+Plugin> to grab 
> these jars and the EnvInject plugin 
> <https://wiki.jenkins-ci.org/display/JENKINS/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?

 

>
> On Friday, April 8, 2016 at 12:45:02 PM UTC-7, Guy Matz wrote:
>>
>> 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!
>>
>> On Fri, Apr 8, 2016 at 12:23 PM, Mark Waite <mark.ea...@gmail.com> wrote:
>>
>>> 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
>>>>  
>>>> <https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtUAMSe2FkO%3DWSOatWBrVrCaSMnp0BeVbdBH8%2BGsSJ7scQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>> -- 
>>> 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/CAO49JtFRhENWv1U1-2%2BzUgYa418PbDRBsXgf%2BMeGJXGevWnayA%40mail.gmail.com
>>>  
>>> <https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtFRhENWv1U1-2%2BzUgYa418PbDRBsXgf%2BMeGJXGevWnayA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/2dca5d76-eb5f-482d-8639-72d456a1d521%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to