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!