Skip to content

Instantly share code, notes, and snippets.

@axdotl
Last active November 6, 2018 13:08
Show Gist options
  • Save axdotl/cda2010ff2fa57bf0bdfcdf158201586 to your computer and use it in GitHub Desktop.
Save axdotl/cda2010ff2fa57bf0bdfcdf158201586 to your computer and use it in GitHub Desktop.
Which Jenkins Plugin is providing this class?
String className = "org.yaml.snakeyaml.Yaml"
def clazzResource = className.replaceAll("\\.", "/") + ".class"
println "Looking for: ${clazzResource}\n"
Jenkins.instance.pluginManager.activePlugins.forEach { PluginWrapper plugin ->
def c = plugin.classLoader.getResources(clazzResource)
if (c.hasMoreElements()) {
println "Found in ${plugin}"
println Collections.list(c).join("\n") + "\n"
}
}
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment