Reputation: 35843
I define a URL for a Maven site by
<distributionManagement>
<site>
<id>site-nexus</id>
<url>dav:http://ik-repo1:8084/nexus/content/sites/site/${project.groupId}/${project.artifactId}/${project.version} </url>
</site>
</distributionManagement>
If I add this to my pom, the site gets deployed as expected: It can be accessed through the URL that was specified. But, if I add this to a parent POM, subdirectories are added to this url. I guess this happens along the lines of
"If subprojects inherit the (distribution) site URL from a parent POM, they will automatically append their artifactId to form their effective deployment location. This goes for both the project url and the url defined in the element of the pom."
in https://maven.apache.org/plugins/maven-site-plugin/examples/multimodule.html .
My parent POMs are not part of a multi-module build, but are just used to share configuration for all of our projects (some hundred projects, actually). So I would like to specify a URL in the parent POM that should be used for each project as if it was specified in the POM itself (i.e. without subdirectories in the URL beyond the ${project.version}
directory that I defined myself).
How can I achieve that?
Upvotes: 3
Views: 859
Reputation: 12345
It's marked as an improvement for Maven, see https://issues.apache.org/jira/browse/MNG-5951 for all the details.
Upvotes: 2