@@ -77,27 +77,25 @@ protected PluginManager instance(Mapping mapping, ConfigurationContext context)
7777 }
7878
7979 @ Override
80- public PluginManager check (CNode c , ConfigurationContext context ) throws ConfiguratorException {
81- return getTargetComponent (context );
82- }
80+ protected void configure (Mapping config , PluginManager instance , boolean dryrun , ConfigurationContext context ) throws ConfiguratorException {
81+
82+ // PluginManager has no dry-run mode : we need to actually install plugins, or we just can't check
83+ // the other elements of the configuration regarding required plugins.
8384
84- @ Override
85- public PluginManager configure (CNode config , ConfigurationContext context ) throws ConfiguratorException {
8685 Mapping map = config .asMapping ();
8786 final Jenkins jenkins = Jenkins .getInstance ();
8887
8988 configureProxy (map , jenkins , context );
9089
9190 final UpdateCenter updateCenter = configureUpdateSites (map , jenkins , context );
9291
93- final PluginManager pluginManager = configurePlugins (map , jenkins , updateCenter , context );
92+ configurePlugins (map , jenkins , updateCenter , context );
9493
9594 try {
9695 jenkins .save ();
9796 } catch (IOException e ) {
9897 throw new ConfiguratorException ("failed to save Jenkins configuration" , e );
9998 }
100- return pluginManager ;
10199 }
102100
103101 private void configureProxy (Mapping map , Jenkins jenkins , ConfigurationContext context ) throws ConfiguratorException {
0 commit comments