Can anybody explain the difference in behavior between these two APIs? The 
only thing that I can make out is that UpdateSite's dependency properties 
seem to mirror exactly the dependencies declared in each plugin's 
MANIFEST.MF file. The PluginWrapper APIs usually return more dependencies, 
but the nature of the "extra" dependencies returned is unclear. I thought 
perhaps it was transitive dependencies but tracing 2nd- and N-order 
dependencies of a few plugins by hand didn't seem to reflect that.

Here's an example console script:

final plug = 'nodelabelparameter'
println "Plugin-Plugin Dependencies for $plug:\n"

println 'PluginManager/PluginWrapper'
println '-' * 80
println Jenkins.instance.pluginManager.getPlugin(plug).dependencies
println Jenkins.instance.pluginManager.getPlugin(plug).optionalDependencies

println '\nUpdateCenter/UpdateSite.Plugin'
println '-' * 80
println Jenkins.instance.updateCenter.getPlugin(plug).dependencies
println Jenkins.instance.updateCenter.getPlugin(plug).optionalDependencies

println '\nUpdateCenter/UpdateSite.Plugin alt'
println '-' * 80
println Jenkins.instance.updateCenter.getPlugin(plug).getNeededDependencies
()


And output:

Plugin-Plugin Dependencies for nodelabelparameter:

PluginManager/PluginWrapper
--------------------------------------------------------------------------------
[token-macro (1.9), jquery (1.7.2-1), parameterized-trigger 
(2.22;resolution:=optional), matrix-auth (1.0.2), windows-slaves (1.0), 
antisamy-markup-formatter (1.0), matrix-project (1.0), junit (1.0)]
[parameterized-trigger (2.22;resolution:=optional), matrix-auth (1.0.2), 
windows-slaves (1.0), antisamy-markup-formatter (1.0), matrix-project (1.0), 
junit (1.0)]

UpdateCenter/UpdateSite.Plugin
--------------------------------------------------------------------------------
[token-macro:1.9, jquery:1.7.2-1]
[parameterized-trigger:2.22]

UpdateCenter/UpdateSite.Plugin alt
--------------------------------------------------------------------------------
[]



-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/8ee26d84-5ef5-4c53-85bc-26279ad706ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to