Customize the SCM Report
By default, the SCM Report uses the information configured (or inherited) in the <scm>
element of pom.xml
. To override these values, you can configure the webAccessUrl
, anonymousConnection
and developerConnection
properties.
This feature is useful when the project website is stored in a separate module, and you want the SCM report to give instructions for checking out the project trunk.
<project> ... <scm> <connection>scm:svn:http://svn.example.org/repo/project/trunk/site</connection> <developerConnection>scm:svn:https://svn.example.org/repo/project/trunk/site</developerConnection> <url>http://svn.example.org/viewvc/project/trunk/site</url> </scm> ... <reporting> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-project-info-reports-plugin</artifactId> <version>3.4.0</version> <configuration> <webAccessUrl>http://svn.example.org/viewvc/project/trunk</webAccessUrl> <anonymousConnection>scm:svn:http://svn.example.org/repo/project/trunk</anonymousConnection> <developerConnection>scm:svn:https://svn.example.org/repo/project/trunk</developerConnection> </configuration> </plugin> ... </plugins> </reporting> ... </project>
How to exclude SCM anonymous access info?
Just do not specify the <connection/>
tag in the <scm/>
tag. For instance, you could have:
<project> ... <scm> <!-- Unspecified <connection/> tag --> <developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-project-info-reports-plugin/</developerConnection> <url>http://svn.apache.org/viewvc/maven/plugins/trunk/maven-project-info-reports-plugin/</url> </scm> ... </project>
Note: Due to Plexus design, it is not possible to specify an empty value using the <anonymousConnection/>
configuration element.