Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-14914

Errors in hudson-dev:run relating to config-file-provider

XMLWordPrintable

      mvn -f war/pom.xml hudson-dev:run, turn on the JavaScript error console, and create a job. You will see some errors in its .../configure page:

      Failed to load resource: the server responded with a status of 404 (Not Found)
      http://localhost:8080/plugin/config-file-provider/js/fileprovider.js
      configure:108 Uncaught ReferenceError: fp_initDetailLink is not defined
      

      These errors are due to the fact that (after imod's changes cca. c2639c0) maven-plugin has an optional dependency on config-file-provider-plugin. maven-plugin/target/test-classes/the.hpl therefore lists that plugin in its Libraries classpath, so it is in the über-classloader, even though the plugin is not actually installed so far as Jenkins is concerned. Therefore SezPoz sees ConfigFileBuildWrapper.DescriptorImpl and this build wrapper is offered on the config page, yet when org/jenkinsci/plugins/configfiles/buildwrapper/ConfigFileBuildWrapper/config.jelly is inserted into the rendered page it is referring to a JavaScript file which gives a 404 since the /plugin/config-file-provider namespace is inactive.

      Possible fixes:

      1. Make maven-hpi-plugin refuse to list optional dependencies. But this is probably undesirable as you generally want to test with them, to see if the dependencies actually work.
      2. Make ExtensionFinder.Sezpoz or UberClassLoader avoid loading extensions from classpath dependencies of plugins. As #1, may be undesirable.
      3. Make ClassicPluginStrategy.createPluginWrapper be able to return multiple plugins when isLinked. But this implies a signature change in PluginStrategy.
      4. Make InitStrategy.listPluginArchives expand *.hpi (or anything with appropriate manifest headers, perhaps) from the classpath of *.hpl. Means sharing some impl with ClassicPluginStrategy.parseClassPath.

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: