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

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development