Uploaded image for project: 'ShrinkWrap Resolvers'
  1. ShrinkWrap Resolvers
  2. SHRINKRES-223

ClasspathWorkspaceReader does not resolve version variables

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 2.2.0-beta-2
    • maven
    • None
    • Hide

      1. Create a artifact whose version is a variable defined in the parent pom.
      2. Create a second artifact which depends on the first artifact with the version being the same variable from the same parent pom.
      3. Maven.configureResolver().loadPomFromFile("second-artifact-pom.xml").importRuntimeDependencies().resolve().withTransitivity().asFile()

      Show
      1. Create a artifact whose version is a variable defined in the parent pom. 2. Create a second artifact which depends on the first artifact with the version being the same variable from the same parent pom. 3. Maven.configureResolver().loadPomFromFile("second-artifact-pom.xml").importRuntimeDependencies().resolve().withTransitivity().asFile()

      The ClasspathWorkspaceReader does not resolve variables in artifact versions. We have an artifact whose version is a variable that is defined in its parent pom. "ClasspathWorkspaceReader.createFoundArtifact" reads the variable as-is and does not resolve it to the real version. However, when resolving the dependencies for the "root" artifacts (the one whose pom has been loaded by the resolver via "loadPomFromFile") version variables are resolved and therefore there will always be a mismatch.

            Unassigned Unassigned
            thorsten.meinl Thorsten Meinl (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: