To find out if a plugin is available and you know the name of it I guess you 
could use
Jenkins.getInstance().getPluginManager().getPlugin(String shortName)

That should give you an instance of PluginWrapper if the plugin is installed.
http://javadoc.jenkins-ci.org/hudson/PluginWrapper.html 
http://javadoc.jenkins-ci.org/hudson/PluginManager.html 

Robert Sandell
Software Tools Engineer - Tools and Integration
Sony Mobile Communications


> -----Original Message-----
> From: [email protected] [mailto:jenkinsci-
> [email protected]] On Behalf Of Slide
> Sent: den 9 juli 2012 14:25
> To: Jenkins Dev
> Subject: PluginWrapper.Dependency
> 
> The PluginWrapper.Dependency class in LTS is not marked as public,
> which means it can't be used outside the package. Is there any other
> way to get a look at the dependencies for a plugin? I'm trying to
> determine if one of the optional dependencies for email-ext is
> available and has the correct version. In a later, non-LTS release of
> the core, this class was made public, but I would like to keep my
> plugin on LTS as the base dependency in the pom.xml.
> 
> Thanks,
> 
> slide
> 
> --
> Website: http://earl-of-code.com

Reply via email to