Yes, that part I understand, but what I want to do is determine if the correct version of an optional dependency is available. The PluginWrapper has a getOptionalDepdencies() method that returns the optional dependencies (I'm assuming those that are mentioned in the pom.xml). I would like to use this method because then I don't have to keep a minimum version string in two places (the pom.xml and a java file). The issue I am running into is that PluginWrapper.Dependency is private in the version of core that my plugin depends on. I guess my question is if there is another way to determine the dependencies as noted in the pom.xml from source code?
Thanks, slide On Mon, Jul 9, 2012 at 7:43 AM, Sandell, Robert <[email protected]> wrote: > 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 -- Website: http://earl-of-code.com
