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

Maven GlobalSettingsProvider swallows exceptions

      This creates quite a headache when using the Config File Provider and there is for example, malformed XML. This leads to builds failing for no obvious reason until you discover the "failed to get the path to the alternate global settings.xml" message buried at the top of the build log.

      In my case, this is the exception that is thrown once the extra try-catch is removed from Global Settings Provider (pull request forthcoming)

      java.lang.IllegalStateException: the global settings.xml could not be supplied for the current build: The reference to entity "characterEncoding" must end with the ';' delimiter.
      	at org.jenkinsci.plugins.configfiles.maven.job.MvnGlobalSettingsProvider.supplySettings(MvnGlobalSettingsProvider.java:97)
      	at jenkins.mvn.GlobalSettingsProvider.getSettingsFilePath(GlobalSettingsProvider.java:55)
      	at jenkins.mvn.GlobalSettingsProvider.getSettingsRemotePath(GlobalSettingsProvider.java:76)
      	at hudson.tasks.Maven.perform(Maven.java:308)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761)
      	at hudson.model.Build$BuildExecution.build(Build.java:199)
      	at hudson.model.Build$BuildExecution.doRun(Build.java:160)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:536)
      	at hudson.model.Run.execute(Run.java:1718)
      	at com.github.mjdetullio.jenkins.plugins.multibranch.FreeStyleBranchBuild.run(FreeStyleBranchBuild.java:89)
      	at hudson.model.ResourceController.execute(ResourceController.java:89)
      	at hudson.model.Executor.run(Executor.java:240)
      

          [JENKINS-26604] Maven GlobalSettingsProvider swallows exceptions

          Code changed in jenkins
          User: Alex Bertram
          Path:
          core/src/main/java/jenkins/mvn/GlobalSettingsProvider.java
          http://jenkins-ci.org/commit/jenkins/77bc6ad835fc0fc54e4fed16395deb24332a2b49
          Log:
          JENKINS-26604 Removes try-catch from GlobalSettingsProvider unhelpfully which swallows exceptions

          If there is a problem providing the Maven global settings file configured by the user, the build
          should end in error. This is the behavior of SettingsProvider but not of GlobalSettingsProvider, which
          was swallowing the exception and printing only a warning, without details of the exception.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alex Bertram Path: core/src/main/java/jenkins/mvn/GlobalSettingsProvider.java http://jenkins-ci.org/commit/jenkins/77bc6ad835fc0fc54e4fed16395deb24332a2b49 Log: JENKINS-26604 Removes try-catch from GlobalSettingsProvider unhelpfully which swallows exceptions If there is a problem providing the Maven global settings file configured by the user, the build should end in error. This is the behavior of SettingsProvider but not of GlobalSettingsProvider, which was swallowing the exception and printing only a warning, without details of the exception.

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          core/src/main/java/jenkins/mvn/GlobalSettingsProvider.java
          http://jenkins-ci.org/commit/jenkins/0a6e00cb576cf8beb5c971c682029fb1e761b487
          Log:
          [FIXED JENKINS-26604] Ensures GlobalSettingsProvider does not swallow fatal exceptions

          Merge pull request #1546

          Compare: https://github.com/jenkinsci/jenkins/compare/0dd2dbc0bf3b...0a6e00cb576c

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/src/main/java/jenkins/mvn/GlobalSettingsProvider.java http://jenkins-ci.org/commit/jenkins/0a6e00cb576cf8beb5c971c682029fb1e761b487 Log: [FIXED JENKINS-26604] Ensures GlobalSettingsProvider does not swallow fatal exceptions Merge pull request #1546 Compare: https://github.com/jenkinsci/jenkins/compare/0dd2dbc0bf3b...0a6e00cb576c

            Unassigned Unassigned
            akbertram Alexander Bertram
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: