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

Consoleoutput Error not informative, if ANT_HOME not correctly set

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Critical Critical
    • ant-plugin
    • None
    • Platform: All, OS: All

      If an Ant installation in a freestyle project is selected where the ANT_HOME is
      not correctly set (e.g. to a directory that does not exist) the console output
      just prints the appended Exception. The Exception is not very informative. It
      should be something like: "The selected Ant installation for the freestyle
      project is broken" or "Cannot find ANT_HOME/bin/ant, please check your
      configuration (System- & Projectconfiguration)"

      ...
      FATAL: 0
      java.lang.ArrayIndexOutOfBoundsException: 0
      at java.lang.ProcessBuilder.start(ProcessBuilder.java:443)
      at hudson.Proc$LocalProc.<init>(Proc.java:104)
      at hudson.Proc$LocalProc.<init>(Proc.java:82)
      at hudson.Launcher$LocalLauncher.createLocalProc(Launcher.java:310)
      at hudson.Launcher$LocalLauncher.launch(Launcher.java:301)
      at hudson.Launcher.launch(Launcher.java:139)
      at hudson.Launcher.launch(Launcher.java:91)
      at hudson.tasks.Ant.perform(Ant.java:200)
      at hudson.model.Build$RunnerImpl.build(Build.java:134)
      at hudson.model.Build$RunnerImpl.doRun(Build.java:109)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:231)
      at hudson.model.Run.run(Run.java:786)
      at hudson.model.Build.run(Build.java:84)
      at hudson.model.ResourceController.execute(ResourceController.java:70)
      at hudson.model.Executor.run(Executor.java:88)

          [JENKINS-2163] Consoleoutput Error not informative, if ANT_HOME not correctly set

          michaelkebe added a comment -

          Created an attachment (id=338)
          Checks the AntInstallation in perform()

          michaelkebe added a comment - Created an attachment (id=338) Checks the AntInstallation in perform()

          Code changed in hudson
          User: : kohsuke
          Path:
          trunk/hudson/main/core/src/main/java/hudson/tasks/Ant.java
          trunk/www/changelog.html
          http://fisheye4.cenqua.com/changelog/hudson/?cs=11239
          Log:
          [FIXED JENKINS-2163] applied a patch to make the error diagnostics more robust.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : kohsuke Path: trunk/hudson/main/core/src/main/java/hudson/tasks/Ant.java trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=11239 Log: [FIXED JENKINS-2163] applied a patch to make the error diagnostics more robust.

          Code changed in hudson
          User: : kohsuke
          Path:
          trunk/hudson/main/core/src/main/java/hudson/tasks/Ant.java
          trunk/www/changelog.html
          http://fisheye4.cenqua.com/changelog/hudson/?cs=11255
          Log:
          [FIXED JENKINS-2177] Fixed a regression introduced by JENKINS-2163. In 1.245.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : kohsuke Path: trunk/hudson/main/core/src/main/java/hudson/tasks/Ant.java trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=11255 Log: [FIXED JENKINS-2177] Fixed a regression introduced by JENKINS-2163 . In 1.245.

            Unassigned Unassigned
            michaelkebe michaelkebe
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: