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

ToolchainManagerPrivate.getToolchainsForType() returns toolchains that are not of expected type

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.0.5, 3.2.3
    • 3.2.5
    • Toolchains
    • None

    Description

      found while working on maven-toolchains-plugin 1.1:

      [INFO] Required toolchain: fake-type [ other-attribute='other-value' attribute='value' ]
      [DEBUG] Toolchain JDK[/home/opt/jdk1.5] is missing required property: other-attribute
      [DEBUG] Toolchain JDK[/home/opt/jdk1.6] is missing required property: other-attribute
      [DEBUG] Toolchain JDK[/home/opt/jdk1.7] is missing required property: other-attribute
      [DEBUG] Toolchain JDK[/home/opt/jdk1.8] is missing required property: other-attribute
      [ERROR] No toolchain matched for type fake-type
      [INFO] Required toolchain: another-fake-type [ any ]
      [INFO] Toolchain matched for type another-fake-type: JDK[/home/opt/jdk1.5]

      these jdk toochains should not have been ever tested again non-jdk type requirement

      Attachments

        1. MNG-3891-MNG-5716.patch
          0.8 kB
          Herve Boutemy
        2. MNG-5716.patch
          7 kB
          Robert Scholte

        Issue Links

          Activity

            hboutemy Herve Boutemy added a comment -

            IT added in fbe579d3
            fix done in 2252862e

            hboutemy Herve Boutemy added a comment - IT added in fbe579d3 fix done in 2252862e
            rfscholte Robert Scholte added a comment -

            I'm wondering if the fix was good enough. I've started to write junit tests for toolchains and I'm getting unexpected results. Could you verify the tests in my patch?

            rfscholte Robert Scholte added a comment - I'm wondering if the fix was good enough. I've started to write junit tests for toolchains and I'm getting unexpected results. Could you verify the tests in my patch?
            hboutemy Herve Boutemy added a comment -

            here is the fix: no problem in the unit test, which is really good since it proved a mistake in MNG-3891

            it was the same mistake that required current issue: don't use every toolchain factory but only the one for expected toolchain type

            hboutemy Herve Boutemy added a comment - here is the fix: no problem in the unit test, which is really good since it proved a mistake in MNG-3891 it was the same mistake that required current issue: don't use every toolchain factory but only the one for expected toolchain type
            hudson Hudson added a comment -

            Build failed in Jenkins: Maven TLP » maven-studies » maven-metrics #4

            See https://builds.apache.org/job/maven-box/job/maven-studies/job/maven-metrics/4/

            hudson Hudson added a comment - Build failed in Jenkins: Maven TLP » maven-studies » maven-metrics #4 See https://builds.apache.org/job/maven-box/job/maven-studies/job/maven-metrics/4/

            People

              hboutemy Herve Boutemy
              hboutemy Herve Boutemy
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: