crash/restart during install may result in installer not completed,
ensure the user may not get locked out if they've created an admin user
but not completed the installer
* Check that dependencies are enabled. A disabled optional dependency
will not prevent a plugin from loading.
* Check versions of dependencies declared by a plugin before loading it.
If any dependency (even optional) is older than what is required,
then the plugin isn't loaded.
This should prevent use cases where a plugin is loaded but one of its
dependencies is too old so that :
* its @Extension annotated classes cannot be loaded, causing the full
Jenkins to blow up with crapload of exceptions which are tedious to
investigate to understand the root cause.
* NoSuchMethodError and the likes at runtime even though boot has
completed.
Version check (for setups where version list is manually crafted but yet
works) can be disabled by starting Jenkins with
-Dhudson.PluginWrapper.dependenciesVersionCheck.enabled=true
Minor fixes done while implementing this change :
* Fix version parsing in PluginWrapper.Dependency
* Dynamic plugin load didn't check for disabled flag
Of course the import being used is in a package name that is reserved for artifacts produced by a JSR... and the JSR that the dependency is claiming to come from has not actually published anything... thus whoever produced the artifact has broken the JSR policy... and it is also not safe for us to actually use these annotations as we do not know what a JSR may change on the road to actually providing this... but that is a war for a different PR
- Also expose via servlet context parameter of same name to allow multiple instances of Jenkins in the same servlet container to have different directories
- As we are no longer a constant, change the system property to camelCase
Squashed commit of the following:
commit f2c6ad272f
Author: Sam Van Oort <samvanoort@gmail.com>
Date: Thu Aug 20 18:28:09 2015 -0400
After much discussion, just remove the helper method to let a plugin manager override easily get instance of the PluginManager
commit a96f933d8d
Author: Sam Van Oort <samvanoort@gmail.com>
Date: Thu Aug 20 16:59:07 2015 -0400
Add javadocs and restrict access on the PluginManagerStaplerOverride getManager method
commit 7e1facf887
Author: Sam Van Oort <samvanoort@gmail.com>
Date: Thu Aug 20 12:50:47 2015 -0400
Simplify plugin manager test using @TestExtension
commit b9f2841f6d
Author: Sam Van Oort <samvanoort@gmail.com>
Date: Thu Aug 20 10:32:49 2015 -0400
Modify the Since version for pluginmanager overrides
commit 3af45ce579
Author: Sam Van Oort <samvanoort@gmail.com>
Date: Thu Aug 20 10:28:14 2015 -0400
Add test for PluginManagerStaplerOverride
commit 7864094565
Author: Sam Van Oort <samvanoort@gmail.com>
Date: Mon Aug 17 20:59:33 2015 -0400
Changes from review, mostly comments and rename of class
commit 1c23f086ec
Author: Sam Van Oort <samvanoort@gmail.com>
Date: Mon Aug 17 12:58:07 2015 -0400
Cleanup for PluginManager extensibility/UI overrides
commit e105a13bcf
Author: Sam Van Oort <samvanoort@gmail.com>
Date: Fri Aug 14 15:23:07 2015 -0400
Different approach to plugin manager UX pluggability, using Extension and StaplerOverridable
commit 81f21fba08
Author: Sam Van Oort <samvanoort@gmail.com>
Date: Thu Aug 13 21:32:45 2015 -0400
Initial round of changes to allow overriding PluginManager
This includes renaming the setTarget method to setUIProxy and defining an interface to retain APIs
Fields have not been mapped through yet as that is still in progress
Also, an AbstractStaplerUIProxy has been defined to delegate Stapler bound calls to the pluginManager
commit eeef666de7
Author: Sam Van Oort <samvanoort@gmail.com>
Date: Wed Aug 5 17:40:50 2015 -0400
Make plugin manager pluggable
Although the plugiun manager was vulnerable getting information
out of Jenkins was harder - however it would still be possible to
do bad things such as reading from /dev/zero on Linux