Maven
  1. Maven
  2. MNG-5034

Wrong evaluation of {project.artifactId} variable in child POMs if included in <url> element

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 3.0.3
    • Fix Version/s: None
    • Component/s: POM
    • Labels:
      None
    • Environment:
      os: 2.6.37-gentoo; jdk "1.6.0_24"

      Description

      Suppose you have the following snippet in your parent POM:

      ...
      <artifactId>parent</artifactId>
      ...
      <url>https://intranet.xy.sk/javaweb/${project.artifactId}</url>
      <distributionManagement>
      	<site>
      		<id>site-server</id>
      		<name>Site Server</name>
      		<url>https://intranet.xy.sk/javaweb/${project.artifactId}</url>
      	</site>
      </distributionManagement>
      ...
      

      Then 'mvn help:effective-pom' command for this project will produce correct URL values:

      But, if you create a child project that declares above defined POM as a parent (and does not explicitly specify its own <url> or <distributionManagement> sections, i.e. it should inherit these sections from parent), the output from 'mvn help:effective-pom' command will contain wrong values:

        Issue Links

          Activity

          Ivan Mrva created issue -
          Benjamin Bentmann made changes -
          Field Original Value New Value
          Link This issue duplicates MNG-3244 [ MNG-3244 ]
          Benjamin Bentmann made changes -
          Assignee Benjamin Bentmann [ bentmann ]
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Duplicate [ 3 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 08:49:45 UTC 2015 [ 1428223785911 ]
          Mark Thomas made changes -
          Workflow jira [ 12715283 ] Default workflow, editable Closed status [ 12754849 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 21:45:26 UTC 2015 [ 1428270326204 ]
          Mark Thomas made changes -
          Workflow jira [ 12952771 ] Default workflow, editable Closed status [ 12990107 ]

            People

            • Assignee:
              Benjamin Bentmann
              Reporter:
              Ivan Mrva
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development