• Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • core
    • None
    • Jenkins 1.606, Windows 7

      The "Invoke top-level Maven targets" pre-build step is broken when using Maven 3.3.1. The cause appears to be in hudson.tasks.Maven$DecideDefaultMavenCommand, which automatically appends ".bat" if running on Windows. In Maven 3.3.1, mvn.bat was renamed to mvn.cmd.

      Obviously this could be fixed but it might be a better idea to move this functionality to the Maven Plugin, which has more sophisticated Maven handling and works fine with 3.3.1.

          [JENKINS-27705] Maven pre-build step is broken with Maven 3.3.1

          John Tatum added a comment -

          John Tatum added a comment - Would https://wiki.jenkins-ci.org/display/JENKINS/Maven+Project+Plugin be the Maven plugin you mentioned?

          Rich DiCroce added a comment -

          Yes, that is the plugin I was referring to.

          Rich DiCroce added a comment - Yes, that is the plugin I was referring to.

          John Tatum added a comment - - edited

          I agree that the functionality mentioned should probably be moved to the Maven Project Plugin, however, I cannot say what that might involve. After a quick look at the code it appears to me that the biggest concern would be that hudson.model.Project implements ProjectWithMaven, which in turn requires use of the MavenInstallation class. The interface itself is only one method, so the actual change would not be huge.

          A quick search through Jenkins core did not find anywhere that inferMavenInstallation() was being used, but I have no idea wether or not any plugins would be making use of that(either directly or indirectly). I am fairly new to Jenkins from a development perspective, so it would probably be better to have somebody else handle these changes. I will help if I can though.

          John Tatum added a comment - - edited I agree that the functionality mentioned should probably be moved to the Maven Project Plugin, however, I cannot say what that might involve. After a quick look at the code it appears to me that the biggest concern would be that hudson.model.Project implements ProjectWithMaven, which in turn requires use of the MavenInstallation class. The interface itself is only one method, so the actual change would not be huge. A quick search through Jenkins core did not find anywhere that inferMavenInstallation() was being used, but I have no idea wether or not any plugins would be making use of that(either directly or indirectly). I am fairly new to Jenkins from a development perspective, so it would probably be better to have somebody else handle these changes. I will help if I can though.

          Daniel Beck added a comment -

          Resolved as JENKINS-28232.

          Daniel Beck added a comment - Resolved as JENKINS-28232 .

            Unassigned Unassigned
            rcd Rich DiCroce
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: