Index: D:/APT/projects/maven/plugins/maven-changelog-plugin/src/main/java/org/apache/maven/plugin/changelog/ChangeLogReport.java =================================================================== --- D:/APT/projects/maven/plugins/maven-changelog-plugin/src/main/java/org/apache/maven/plugin/changelog/ChangeLogReport.java (revision 560535) +++ D:/APT/projects/maven/plugins/maven-changelog-plugin/src/main/java/org/apache/maven/plugin/changelog/ChangeLogReport.java (working copy) @@ -84,6 +84,13 @@ private static final String FILE_TOKEN = "%FILE%"; /** + * A special token that represents the SCM relative path for a file. + * It can be used in displayFileRevisionDetailUrl and + * displayChangeSetDetailUrl + */ + private static final String REV_TOKEN = "%REV%"; + + /** * The number of days to use as a range, when this is not specified. */ private static final int DEFAULT_RANGE = 30; @@ -291,6 +298,28 @@ */ protected String displayFileDetailUrl; + /** + * A template string that is used to create the changeset URL. + * + * If not defined not change set link will be created + * + * There is one special tokens that you can use in your template: + * + *

+ * Example: + * http://fisheye.sourceforge.net/changelog/a-project/?cs=%REV% + *

+ *

+ * Note: If you don't supply the %REV% token in your template, + * the revision will simply be appended to your template URL. + *

+ * + * @parameter expression="${displayChangeSetDetailUrl}" + */ + protected String displayChangeSetDetailUrl; + // temporary field holder while generating the report private String rptRepository, rptOneRepoParam, rptMultiRepoParam; @@ -1285,6 +1314,18 @@ sink.text( " " ); + if ( linkRev == null && revision != null && displayChangeSetDetailUrl != null ) + { + if ( displayChangeSetDetailUrl.indexOf( REV_TOKEN ) > 0 ) + { + linkRev = displayChangeSetDetailUrl.replaceAll( REV_TOKEN, revision ); + } + else + { + linkRev = displayChangeSetDetailUrl + revision; + } + } + if ( linkRev != null ) { sink.link( linkRev );