Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
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"
-
Complexity:Intermediate
-
Number of attachments :
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:
- <url>https://intranet.xy.sk/javaweb/parent</url>
- <url>dav:https://intranet.xy.sk/javaweb/parent</url>
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:
- e.g. for the child POM with artifactId = 'child', the output is:
- <url>https://intranet.xy.sk/javaweb/child/child</url>
- and <url>dav:https://intranet.xy.sk/javaweb/child/child</url> in 'distributionManagement' section.
- I think correct output should end only with one 'child' at the end of the url as follows: https://intranet.xy.sk/javaweb/child
- and if you have a sub-module 'grandchild' of this child project, which also defines this 'child' artifact as its parent, the output is:
- <url>https://intranet.xy.sk/javaweb/grandchild/child/grandchild</url>
- <url>dav:https://intranet.xy.sk/javaweb/grandchild/child/grandchild</url>
- The correct output should be: https://intranet.xy.sk/javaweb/child/grandchild
Issue Links
- duplicates
-
MNG-3244
inherited site url not properly handling parameters
-
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.