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

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

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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.

        Attachments

          Activity

          Hide
          domi Dominik Bartholdi added a comment -

          We are already thinking about an other strategy, which would solve this issue too.
          The idea is to introduce an new extension point for e.g. MvnSettingsProvider
          That would allow to remove the dependency to the config-file-provider plugin.

          Show
          domi Dominik Bartholdi added a comment - We are already thinking about an other strategy, which would solve this issue too. The idea is to introduce an new extension point for e.g. MvnSettingsProvider That would allow to remove the dependency to the config-file-provider plugin.
          Hide
          jglick Jesse Glick added a comment -

          @domi: introducing an extension point to remove the dependency would be a good idea in any event. It would solve this instance of the bug, but there may be other cases that crop up. (Does this appear even for nonoptional dependencies? What about for hpi:run from a nonbundled plugin? Need to test a bit more.)

          I just noticed a related, and more visible, problem: /manage links to /configfiles/, which works, but uses an icon /plugin/config-file-provider/images/cfg_logo.png, which is broken.

          Show
          jglick Jesse Glick added a comment - @domi: introducing an extension point to remove the dependency would be a good idea in any event. It would solve this instance of the bug, but there may be other cases that crop up. (Does this appear even for nonoptional dependencies? What about for hpi:run from a nonbundled plugin? Need to test a bit more.) I just noticed a related, and more visible, problem: /manage links to /configfiles/ , which works, but uses an icon /plugin/config-file-provider/images/cfg_logo.png , which is broken.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: imod
          Path:
          maven-plugin/pom.xml
          http://jenkins-ci.org/commit/jenkins/0879051bdfe25a3f60e1cb7cc9546d905f82f637
          Log:
          [FIXED JENKINS-14914] remove dependency to config-file-provider

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: imod Path: maven-plugin/pom.xml http://jenkins-ci.org/commit/jenkins/0879051bdfe25a3f60e1cb7cc9546d905f82f637 Log: [FIXED JENKINS-14914] remove dependency to config-file-provider
          Hide
          dogfood dogfood added a comment -

          Integrated in jenkins_main_trunk #2060
          [FIXED JENKINS-14914] remove dependency to config-file-provider (Revision 0879051bdfe25a3f60e1cb7cc9546d905f82f637)

          Result = UNSTABLE
          imod : 0879051bdfe25a3f60e1cb7cc9546d905f82f637
          Files :

          • maven-plugin/pom.xml
          Show
          dogfood dogfood added a comment - Integrated in jenkins_main_trunk #2060 [FIXED JENKINS-14914] remove dependency to config-file-provider (Revision 0879051bdfe25a3f60e1cb7cc9546d905f82f637) Result = UNSTABLE imod : 0879051bdfe25a3f60e1cb7cc9546d905f82f637 Files : maven-plugin/pom.xml
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: imod
          Path:
          src/main/java/org/jenkinsci/plugins/configfiles/maven/job/MvnGlobalSettingsProvider.java
          src/main/java/org/jenkinsci/plugins/configfiles/maven/job/MvnSettingsProvider.java
          src/main/resources/org/jenkinsci/plugins/configfiles/maven/job/MvnGlobalSettingsProvider/config.jelly
          src/main/resources/org/jenkinsci/plugins/configfiles/maven/job/MvnGlobalSettingsProvider/help.html
          src/main/resources/org/jenkinsci/plugins/configfiles/maven/job/MvnSettingsProvider/config.jelly
          src/main/resources/org/jenkinsci/plugins/configfiles/maven/job/MvnSettingsProvider/help.html
          http://jenkins-ci.org/commit/config-file-provider-plugin/369811ef3a2e549bb54cc7bbfc7114b6b9d62989
          Log:
          [FIXED JENKINS-14914] migrate to new EP from core and change dependency direction between maven-maven and config file provider

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: imod Path: src/main/java/org/jenkinsci/plugins/configfiles/maven/job/MvnGlobalSettingsProvider.java src/main/java/org/jenkinsci/plugins/configfiles/maven/job/MvnSettingsProvider.java src/main/resources/org/jenkinsci/plugins/configfiles/maven/job/MvnGlobalSettingsProvider/config.jelly src/main/resources/org/jenkinsci/plugins/configfiles/maven/job/MvnGlobalSettingsProvider/help.html src/main/resources/org/jenkinsci/plugins/configfiles/maven/job/MvnSettingsProvider/config.jelly src/main/resources/org/jenkinsci/plugins/configfiles/maven/job/MvnSettingsProvider/help.html http://jenkins-ci.org/commit/config-file-provider-plugin/369811ef3a2e549bb54cc7bbfc7114b6b9d62989 Log: [FIXED JENKINS-14914] migrate to new EP from core and change dependency direction between maven-maven and config file provider
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: imod
          Path:
          src/main/java/org/jenkinsci/plugins/configfiles/maven/job/MvnGlobalSettingsProvider.java
          src/main/java/org/jenkinsci/plugins/configfiles/maven/job/MvnSettingsProvider.java
          src/main/resources/org/jenkinsci/plugins/configfiles/maven/job/MvnGlobalSettingsProvider/config.jelly
          src/main/resources/org/jenkinsci/plugins/configfiles/maven/job/MvnGlobalSettingsProvider/help.html
          src/main/resources/org/jenkinsci/plugins/configfiles/maven/job/MvnSettingsProvider/config.jelly
          src/main/resources/org/jenkinsci/plugins/configfiles/maven/job/MvnSettingsProvider/help.html
          http://jenkins-ci.org/commit/config-file-provider-plugin/65715a76822a2598d24d7a032853b8635fa46e46
          Log:
          [FIXED JENKINS-14914] migrate to new EP from core and change dependency direction between maven-maven and config file provider

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: imod Path: src/main/java/org/jenkinsci/plugins/configfiles/maven/job/MvnGlobalSettingsProvider.java src/main/java/org/jenkinsci/plugins/configfiles/maven/job/MvnSettingsProvider.java src/main/resources/org/jenkinsci/plugins/configfiles/maven/job/MvnGlobalSettingsProvider/config.jelly src/main/resources/org/jenkinsci/plugins/configfiles/maven/job/MvnGlobalSettingsProvider/help.html src/main/resources/org/jenkinsci/plugins/configfiles/maven/job/MvnSettingsProvider/config.jelly src/main/resources/org/jenkinsci/plugins/configfiles/maven/job/MvnSettingsProvider/help.html http://jenkins-ci.org/commit/config-file-provider-plugin/65715a76822a2598d24d7a032853b8635fa46e46 Log: [FIXED JENKINS-14914] migrate to new EP from core and change dependency direction between maven-maven and config file provider
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: imod
          Path:
          pom.xml
          http://jenkins-ci.org/commit/maven-plugin/1049a4bed47eae387437f0fbc78d2ca7820813b0
          Log:
          [FIXED JENKINS-14914] remove dependency to config-file-provider

          Originally-Committed-As: 0879051bdfe25a3f60e1cb7cc9546d905f82f637

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: imod Path: pom.xml http://jenkins-ci.org/commit/maven-plugin/1049a4bed47eae387437f0fbc78d2ca7820813b0 Log: [FIXED JENKINS-14914] remove dependency to config-file-provider Originally-Committed-As: 0879051bdfe25a3f60e1cb7cc9546d905f82f637

            People

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

              Dates

              • Created:
                Updated:
                Resolved: