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

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

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 3.0.3
    • None
    • POM
    • None
    • 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:

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            bentmann Benjamin Bentmann
            imrva Ivan Mrva
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment