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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Platform: All, OS: All

      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

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

              Created:
              Updated:
              Resolved: