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 ]
          Hide
          Ivan Mrva added a comment -

          In our company, we would like to specify a project URL and distribution management section for site server only at one place - in our organization POM from which all projects inherit. This solution removes the burden from our developers, who don't need to know anything about site deployment and also should not be responsible for defining a project URLs. Currently, this can be acomplished, but only at the cost of having ugly and unpredictable project URLs.

          Show
          Ivan Mrva added a comment - In our company, we would like to specify a project URL and distribution management section for site server only at one place - in our organization POM from which all projects inherit. This solution removes the burden from our developers, who don't need to know anything about site deployment and also should not be responsible for defining a project URLs. Currently, this can be acomplished, but only at the cost of having ugly and unpredictable project URLs.
          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 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          7m 5s 1 Benjamin Bentmann 07/Mar/11 06:20

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development