Thanks for the response R Tyler Croy, I'm suddenly kicking myself for not finding that plugin when I looked for stuff like this!
I notice the plugin is currently at 0.1 alpha, do (or do other folks here) have any experience using it? It it fairly reliable doing the things it mentions in the docs (LDAP config etc)? I'm torn as we have additional requirements such as loading up trust stores etc and I'd rather not have 2 separate mechanisms to configure different bits of Jenkins. Cheers, Edd On Monday, 12 March 2018 21:57:42 UTC, Edd Grant wrote: > > Hi folks, > > I'm using the init hook script mechanism ($JENKINS_HOME/init.groovy.d) to > programmatically configure Jenkins. I'm building up quite a library of code > and want to split it out in to re-usable classes, to keep things > maintainable and make it easier to write well focused tests etc. I have > tried the following with no luck: > > 1: Trying to split classes out in to separate scripts and using Groovy's > 'evaluate' function to load the classes from each script (basically trying > to re-implement some sort of importing behaviour). This doesn't work at all > due to the way Groovy manipulates scripts. > > 2: Putting my classes in a jar file and adding this to WEB-INF/lib in the > Jenkins war. This approach leads to classloader errors, presumably because > the jar classloader that my code belongs to doesn't have access to Jenkins' > PluginManager 'uberClassLoader'? > > 3: Same as  but adding the jar to the JVM's classpath rather than > adding it to the jar. Same result as . > > Has anyone tried doing anything similar to this before? I'm really keen to > be able to do things like organise my code in packages and keep it in small > maintainable units. Grateful for any suggestions. > > Cheers, > > Edd > -- 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/69f48e62-b013-4721-9413-1a43ef53ab2d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.