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

toolchain.xml should support absense of version and/or vendor in the configuraion

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.6.1
    • None
    • Toolchains

    Description

      When a toolchain.xml is configured as follow:

      <?xml version="1.0" encoding="UTF8"?>
      <toolchains>
        <!-- JDK toolchains -->
        <toolchain>
          <type>jdk</type>
          <provides>
            <version>8</version>
            <vendor>oracle</vendor>
          </provides>
          <configuration>
            <jdkHome>${env.JDK_HOME_8}</jdkHome>
          </configuration>
        </toolchain>
        <toolchain>
          <type>jdk</type>
          <provides>
            <version>12</version>
            <vendor>oracle</vendor>
          </provides>
          <configuration>
            <jdkHome>${env.JDK_HOME_12}</jdkHome>
          </configuration>
        </toolchain>
        <toolchain>
          <type>jdk</type>
          <configuration>
            <jdkHome>${env.JAVA_HOME}</jdkHome>
          </configuration>
        </toolchain>
       </toolchains>
      

      The last jdk configuration without version and vendor should match any requested version and/or vendor.

      This would allow us to define a fallback toolchain.

      The idea behind this improvement is that we don't want the toolchain plugin to enforce a jdk, this we would do with the enforcer plugin. We want to use the toolchain plugin just for supply the best JDK. We also want reduce the maintainance of the toolchain.xml on our different development and cicd systems.

      Attachments

        Activity

          People

            Unassigned Unassigned
            hsyn Hüseyin Kartal
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: