Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-6665

toolchain.xml file should support environment variables

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.6.1
    • Fix Version/s: 3.6.2
    • Component/s: None
    • Labels:
    • Environment:
      Windows 7 64bit

      Description

      When the toolchain.xml file is configured as follow :

      <toolchain>
          <type>jdk</type>
          <provides>
            <version>1.8</version>
            <vendor>sun</vendor>
          </provides>
          <configuration>
      	<jdkHome>${env.JDK_HOME_8}</jdkHome>
          </configuration>
      </toolchain>
      

      The execution of a maven compile fail with the following error :

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-toolchains-plugin:
      1.1:toolchain (default) on project monitoring-mq-web: Misconfigured toolchains.
      Non-existing JDK home configuration at L:\test-monitoring-mq\${env.JDK_HOME_8} -> [Help 1]
      

      While the environment variable JDK_HOME_8 exist.

      Using environment variable is a very convenient way to have the same toolchain.xml file for all developers or jenkins slaves and would be a nice addition to the plugin.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rfscholte Robert Scholte
                Reporter:
                nickho Nicolas Radde
              • Votes:
                6 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m