|
||||||||
This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira |
[JIRA] (JENKINS-14154) Groovy script can not resolve import classes like hudson.scm.SubversionSCM
joao.antu...@tagus.ist.utl.pt (JIRA) Thu, 26 Jul 2012 11:40:32 -0700
- [JIRA] (JENKINS-14154) Groovy script ... joao.antu...@tagus.ist.utl.pt (JIRA)
- [JIRA] (JENKINS-14154) Groovy sc... joao.antu...@tagus.ist.utl.pt (JIRA)
- [JIRA] (JENKINS-14154) Groovy sc... joao.antu...@tagus.ist.utl.pt (JIRA)
- [JIRA] (JENKINS-14154) Groovy sc... joao.antu...@tagus.ist.utl.pt (JIRA)
- [JIRA] (JENKINS-14154) Groovy sc... joao.antu...@tagus.ist.utl.pt (JIRA)
- [JIRA] (JENKINS-14154) Groovy sc... joao.antu...@tagus.ist.utl.pt (JIRA)
- [JIRA] (JENKINS-14154) Groovy sc... joao.antu...@tagus.ist.utl.pt (JIRA)
- [JIRA] (JENKINS-14154) Groovy sc... jgl...@cloudbees.com (JIRA)
Nicolas: We had the same problem, but for differente environments of Groovy, you are using it through the groovy-post-build, I was using it through the SSH CLI groovysh. I solved this for my case, and will make a pull request (basicly you have to change the classloader to use the uberClassLoader. I attained it with the following diff:
+final ClassLoader cl = Jenkins.getInstance().getPluginManager().uberClassLoader == null ? Thread.currentThread()
+ .getContextClassLoader() : Jenkins.getInstance().getPluginManager().uberClassLoader;
)
You just have to do the same to the classloader on the Groovy interpreter in groovy-postbuild. If I find some extra time, I'll try to fix that plugin and make a pull request, but no promises (it should be straightforward though if you have some experience with java and git.