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

Not Possible to use 2 versions of Maven2

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • maven-plugin
    • None
    • Platform: All, OS: Windows XP

      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.

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

              Created:
              Updated:
              Resolved: