Maven
  1. Maven
  2. MNG-4369

Maven does not expand expressions while installing artifacts locally

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      When a pom uses expressions like: grizzly.version in the following pom.xml

      > <project>
      > <parent>
      ...
      > <artifactId>grizzly-module</artifactId>
      > <packaging>jar</packaging>
      > <version>$

      {grizzly.version}

      </version>

      Everything works well when the project.version above is defined as a property as 'grizzly.version'
      The local repository layout also seems to be correct, for a given property value for, grizzly.version.

      What's going wrong is, maven just copies the same pom.xml to the local repo directory and from there to the remote repo while deploying the
      artifacts of the same project, whose version is parameterized.

      In the strict sense, while parsing the pom and resolving the artifacts, maven got the right version for the project.version for the project; the same should have been used inside the pom file while installing locally. By doing this, the expanded pom files will have right artifact information.
      Users should be given a choice if they want maven to expand expressions in the pom.xml or leave them as it is.

      I don't know the right category of the project and component. Please reassign / redirect as appropriate.
      This belongs somewhere pom parsing, artifact resolver and mvn install.

      thanks..

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Brett Porter
              Reporter:
              Harsha Rai
            • Votes:
              3 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: