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

          hsyn HĂĽseyin Kartal created issue -
          hsyn HĂĽseyin Kartal made changes -
          Field Original Value New Value
          Description When a toolchain.xml is configured as follow:
          {quote}{{<?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>}}
          {quote}
          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.
          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>

          {{<?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.
          hsyn HĂĽseyin Kartal made changes -
          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>

          {{<?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.
          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.
          hsyn HĂĽseyin Kartal made changes -
          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.
          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.
          hsyn HĂĽseyin Kartal made changes -
          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.
          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.
          hsyn HĂĽseyin Kartal made changes -
          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.
          When a toolchain.xml is configured as follow:

          {noformat}
          <?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>
          {noformat}

          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.
          hsyn HĂĽseyin Kartal made changes -
          Description When a toolchain.xml is configured as follow:

          {noformat}
          <?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>
          {noformat}

          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.
          When a toolchain.xml is configured as follow:
          {noformat}
          <?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>
          {noformat}
          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.

          People

            Unassigned Unassigned
            hsyn HĂĽseyin Kartal

            Dates

              Created:
              Updated:

              Slack