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

"default maven" should try to sniff the workspace to determine the maven version

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Platform: All, OS: All
    • Similar Issues:

      Description

      I discovered this when trying to make hudson eat my own dog food (compiling the
      plugins I'm messing with)

      When running a Maven 2.0.4 based build on *nix, Hudson attempts to spawn a
      process using the wrong script, "maven". Maven2 comes only with one script that
      can be used to launch maven, its named "mvn". The windows batch file is named
      "mvn.bat".

      There are m2 and m2.bat files as well, but these will fail immediately and tell
      you to run mvn or mvn.bat.

      One solution might be that if the "maven" or "maven.bat" files can't be found,
      then "mvn" or "mvn.bat" should be used.

      Console Output:

      [trunk] $ maven test
      FATAL: command execution failed
      java.io.IOException: Cannot run program "maven" (in directory
      "/whatever/hudson/jobs/FindBugsPlugin/workspace/trunk"): java.io.IOException:
      error=2, No such file or directory
      at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
      at java.lang.Runtime.exec(Runtime.java:593)
      at hudson.Proc$LocalProc.<init>(Proc.java:79)
      at hudson.Launcher$LocalLauncher.launch(Launcher.java:130)
      at hudson.Launcher.launch(Launcher.java:74)
      at hudson.Launcher.launch(Launcher.java:70)
      at hudson.Launcher.launch(Launcher.java:58)
      at hudson.tasks.Maven.perform(Maven.java:94)
      at hudson.model.Build$RunnerImpl.build(Build.java:251)
      at hudson.model.Build$RunnerImpl.doRun(Build.java:223)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:114)
      at hudson.model.Run.run(Run.java:533)
      at hudson.model.Build.run(Build.java:203)
      at hudson.model.Executor.run(Executor.java:61)
      Caused by: java.io.IOException: java.io.IOException: error=2, No such file or
      directory
      at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
      at java.lang.ProcessImpl.start(ProcessImpl.java:65)
      at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
      ... 13 more
      finished: FAILURE

        Attachments

          Activity

          crahen crahen created issue -
          kohsuke Kohsuke Kawaguchi made changes -
          Field Original Value New Value
          Status Open [ 1 ] In Progress [ 3 ]
          kohsuke Kohsuke Kawaguchi made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Resolved [ 5 ]
          abayer Andrew Bayer made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          ircbot Jenkins IRC Bot made changes -
          Component/s core [ 15593 ]
          Component/s www [ 15484 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 130346 ] JNJira + In-Review [ 199730 ]

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            crahen crahen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: