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

Not Possible to use 2 versions of Maven2

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: maven-plugin
    • Labels:
      None
    • Environment:
      Platform: All, OS: Windows XP
    • Similar Issues:

      Description

      The architecture of Maven2 means that the system environment variable M2_HOME
      must be set to the correct version as used on the system. (Eg. Maven 2.0.7)
      (Check mvn.bat)

      Take this scenario:

      • Hudson is configured with two Maven2 versions, 2.0.7 and 2.0.5.
      • M2_HOME system environment variable is set as 2.0.7

      A project is configured to use 2.0.7. The project will build correctly.

      However, if the project is configured to use 2.0.5, the following Maven
      exception is thrown and the build terminates:

      java.lang.NoClassDefFoundError: org/codehaus/classworlds/Launcher

      There are two solutions:

      1. When Hudson spawns it's shell process to build, (or whatever it spawns), it
      should also set the M2_HOME variable for that shell to the correct version.

      2. Hudson should only allow one version of Maven2 to be configured, and this
      version of Maven2 should be checked against the M2_HOME environment variable.

      I believe the second option makes the most sense, as I don't see the need for
      two Maven2 versions on the same system.

        Attachments

          Activity

          Hide
          adriancb adriancb added a comment -

          This defect is related to Defect: 1024

          Show
          adriancb adriancb added a comment - This defect is related to Defect: 1024
          Hide
          kohsuke Kohsuke Kawaguchi added a comment -

          I believe I fixed this in 1.159.

          Show
          kohsuke Kohsuke Kawaguchi added a comment - I believe I fixed this in 1.159.

            People

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

              Dates

              Created:
              Updated:
              Resolved: