import hudson.model.* It worked fine for me in my groovy scripts and i was able to able use access jenkins classes.Can i know which version of jenkins are you using.As far i now in jewnkins 2.7.4 ,there are some security updates
On Tuesday, 18 October 2016 01:10:01 UTC+5:30, ZT wrote: > > Hello, > > I have written some custom groovy scripts (bundled as Jars) which need to > access the class jenkins.model.Jenkins > > I have my custom JARS installed into Jenkins and they are loaded properly > (verified through the Jenkins Script Console). However, When my script > imports jenkins.model.Jenkins, it fails with a NoClassDef error. > > I can see the jenkins core jar in /var/jenkins_home/war/WEB-INF/lib but > they do not seem to be visible to my scripts. > > I am guessing this is either a classloader or a security restriction. > > Any pointers to resolve this would be appreciated. > > Regards, > Rahul > -- 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/8ca6f934-86a7-4b2b-90a6-ff666d6c5a5a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.