2

In the team I work for, I need to deploy site artifacts to a maven repo in the following format:

http://therepo/site/${project.groupId}/${project.artifactId}/${project.version}

Because I'm a big fan of doing things in a DRY manner, I have put this in my parent pom within a distributionManagement tag. Like so:

<distributionManagement>
    <site>
        <id>team-site</id>
        <name>Team Snapshot Site Repository</name>
        <url>dav:http://therepo/snapshot/site/${project.groupId}/${project.artifactId}/${project.version}</url>
    </site>
</distributionManagement>

This seems reasonable except that the maven site plugin will automatically add the project artifact id to the end of the URL if the URL is provided by a parent pom. This behavior is documented here: https://maven.apache.org/plugins/maven-site-plugin/usage.html#Deploying_a_Site

Obviously this isn't what I want to happen. As a result of this behavior, my site URL effectively becomes:

http://therepo/site/${project.groupId}/${project.artifactId}/${project.version}/${project.artifactId}

Is there a way to suppress this behavior? Or do I have to put a distributionManagement tag in every single project?

Thanks!

Jason Thompson
  • 4,643
  • 5
  • 50
  • 74
  • 1
    Looking at the code [here](https://github.com/apache/maven-plugins/blob/maven-site-plugin-3.5/src/main/java/org/apache/maven/plugins/site/deploy/AbstractDeployMojo.java#L257-L268), I don't think this is configurable. You'll have to specify it for all modules. – Tunaki Apr 06 '16 at 20:10

0 Answers0