Author: brett
Date: Fri Jun 3 22:07:07 2005
New Revision: 179949
URL: http://svn.apache.org/viewcvs?rev=179949&view=rev
Log:
PR: MPCHANGELOG-25
Submitted by: Neil Palmer
Reviewed by: Brett Porter
Various clearcase fixes
Modified:
maven/maven-1/plugins/trunk/changelog/plugin.jelly
maven/maven-1/plugins/trunk/changelog/src/main/org/apache/maven/changelog/AbstractChangeLogGenerator.java
maven/maven-1/plugins/trunk/changelog/src/main/org/apache/maven/changelog/ChangeLog.java
maven/maven-1/plugins/trunk/changelog/src/main/org/apache/maven/clearcaselib/ClearcaseChangeLogGenerator.java
maven/maven-1/plugins/trunk/changelog/src/main/org/apache/maven/clearcaselib/ClearcaseChangeLogParser.java
maven/maven-1/plugins/trunk/changelog/src/plugin-resources/changelog.jsl
maven/maven-1/plugins/trunk/changelog/xdocs/changes.xml
maven/maven-1/plugins/trunk/changelog/xdocs/properties.xml
Modified: maven/maven-1/plugins/trunk/changelog/plugin.jelly
URL:
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/changelog/plugin.jelly?rev=179949&r1=179948&r2=179949&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/changelog/plugin.jelly (original)
+++ maven/maven-1/plugins/trunk/changelog/plugin.jelly Fri Jun 3 22:07:07 2005
@@ -104,6 +104,7 @@
tag="${maven.changelog.tag}"
repositoryConnection="${_connection}"
dateFormat="${maven.changelog.dateformat}"
+ commentFormat="${maven.changelog.commentFormat}"
/>
<doc:jsl
Modified:
maven/maven-1/plugins/trunk/changelog/src/main/org/apache/maven/changelog/AbstractChangeLogGenerator.java
URL:
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/changelog/src/main/org/apache/maven/changelog/AbstractChangeLogGenerator.java?rev=179949&r1=179948&r2=179949&view=diff
==============================================================================
---
maven/maven-1/plugins/trunk/changelog/src/main/org/apache/maven/changelog/AbstractChangeLogGenerator.java
(original)
+++
maven/maven-1/plugins/trunk/changelog/src/main/org/apache/maven/changelog/AbstractChangeLogGenerator.java
Fri Jun 3 22:07:07 2005
@@ -105,6 +105,11 @@
*/
protected InputStream in;
+ /**
+ * The comment format string used in interrogating the RCS.
+ */
+ protected String commentFormat;
+
/** Log */
private static final Log LOG =
LogFactory.getLog(AbstractChangeLogGenerator.class);
@@ -145,6 +150,9 @@
}
setConnection(changeLogExecutor.getRepositoryConnection());
+
+ // set the comment query string for the RCS.
+ setCommentFormat(changeLogExecutor.getCommentFormat());
}
/**
@@ -413,6 +421,24 @@
public void setConnection(String connection)
{
this.connection = connection;
+ }
+
+ /**
+ * Returns the commentFormat used to interrogate the RCS.
+ * @return String
+ */
+ public String getCommentFormat()
+ {
+ return commentFormat;
+ }
+
+ /**
+ * Sets the commentFormat.
+ * @param commentFormat The commentFormat to set
+ */
+ public void setCommentFormat(String commentFormat)
+ {
+ this.commentFormat = commentFormat;
}
/**
Modified:
maven/maven-1/plugins/trunk/changelog/src/main/org/apache/maven/changelog/ChangeLog.java
URL:
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/changelog/src/main/org/apache/maven/changelog/ChangeLog.java?rev=179949&r1=179948&r2=179949&view=diff
==============================================================================
---
maven/maven-1/plugins/trunk/changelog/src/main/org/apache/maven/changelog/ChangeLog.java
(original)
+++
maven/maven-1/plugins/trunk/changelog/src/main/org/apache/maven/changelog/ChangeLog.java
Fri Jun 3 22:07:07 2005
@@ -124,6 +124,13 @@
}
/**
+ * Comment format string used for interrogating
+ * the revision control system.
+ * Currently only used by the ClearcaseChangeLogGenerator.
+ */
+ private String commentFormat;
+
+ /**
* Set the ChangeLogFactory class name. If this isn't set, the factory
* defaults to Maven's build in CVS factory.
*
@@ -628,6 +635,24 @@
public void setOutputEncoding(String outputEncoding)
{
this.outputEncoding = outputEncoding;
+ }
+
+ /**
+ * Returns the commentFormat used to interrogate the RCS.
+ * @return String
+ */
+ public String getCommentFormat()
+ {
+ return commentFormat;
+ }
+
+ /**
+ * Sets the commentFormat.
+ * @param commentFormat The commentFormat to set
+ */
+ public void setCommentFormat(String commentFormat)
+ {
+ this.commentFormat = commentFormat;
}
} // end of ChangeLog
Modified:
maven/maven-1/plugins/trunk/changelog/src/main/org/apache/maven/clearcaselib/ClearcaseChangeLogGenerator.java
URL:
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/changelog/src/main/org/apache/maven/clearcaselib/ClearcaseChangeLogGenerator.java?rev=179949&r1=179948&r2=179949&view=diff
==============================================================================
---
maven/maven-1/plugins/trunk/changelog/src/main/org/apache/maven/clearcaselib/ClearcaseChangeLogGenerator.java
(original)
+++
maven/maven-1/plugins/trunk/changelog/src/main/org/apache/maven/clearcaselib/ClearcaseChangeLogGenerator.java
Fri Jun 3 22:07:07 2005
@@ -63,11 +63,22 @@
Commandline command = new Commandline();
command.setExecutable("cleartool");
command.createArgument().setValue("lshistory");
-
+
StringBuffer format = new StringBuffer();
format.append("NAME:%En\\n");
format.append("DATE:%Nd\\n");
- format.append("COMM:%-12.12o - %o - %c - Activity: %[activity]p\\n");
+ format.append("COMM:%-12.12o - ");
+
+ String commentFormat = getCommentFormat();
+ if (commentFormat == null)
+ {
+ format.append("%Sn - %c - Activity: %[activity]p\\n");
+ }
+ else
+ {
+ format.append(commentFormat);
+ }
+
format.append("USER:%-8.8u\\n");
command.createArgument().setValue("-fmt");
Modified:
maven/maven-1/plugins/trunk/changelog/src/main/org/apache/maven/clearcaselib/ClearcaseChangeLogParser.java
URL:
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/changelog/src/main/org/apache/maven/clearcaselib/ClearcaseChangeLogParser.java?rev=179949&r1=179948&r2=179949&view=diff
==============================================================================
---
maven/maven-1/plugins/trunk/changelog/src/main/org/apache/maven/clearcaselib/ClearcaseChangeLogParser.java
(original)
+++
maven/maven-1/plugins/trunk/changelog/src/main/org/apache/maven/clearcaselib/ClearcaseChangeLogParser.java
Fri Jun 3 22:07:07 2005
@@ -176,7 +176,7 @@
return;
}
// do not add if the operation is not checkin
- if (entry.getComment().indexOf("- checkin") == -1)
+ if (entry.getComment().indexOf("checkin ") == -1)
{
return;
}
@@ -185,6 +185,8 @@
+ entry.getAuthor() + entry.getComment();
+ file.setRevision("");
+
if (!entries.containsKey(key))
{
entry.addFile(file);
Modified:
maven/maven-1/plugins/trunk/changelog/src/plugin-resources/changelog.jsl
URL:
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/changelog/src/plugin-resources/changelog.jsl?rev=179949&r1=179948&r2=179949&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/changelog/src/plugin-resources/changelog.jsl
(original)
+++ maven/maven-1/plugins/trunk/changelog/src/plugin-resources/changelog.jsl
Fri Jun 3 22:07:07 2005
@@ -113,14 +113,17 @@
<a href="${repository}${name}?ac=22">${name}</a>
<a
href="${repository}${name}?ac=64&rev1=${revision}">v${revision}</a>
</j:when>
+ <j:when
test="${pom.repository.connection.startsWith('scm:clearcase')}">
+ <a href="${repository}${name}${oneRepoParam}">${name}</a>
+ </j:when>
<j:when test="${repository.indexOf('cvsmonitor.pl') > 0}">
<j:set var="module"
value="${oneRepoParam.replaceAll('^.*(&module=.*?(?:&|$)).*$','$1')}"/>
<a
href="${repository}?cmd=viewBrowseFile${module}&file=${name}">${name}</a>
<a
href="${repository}?cmd=viewBrowseVersion${module}&file=${name}&version=${revision}">v${revision}</a>
</j:when>
<j:otherwise>
- <a href="${repository}${name}${oneRepoParam}">${name}</a>
- <a
href="${repository}${name}?rev=${revision}&content-type=text/vnd.viewcvs-markup${multiRepoParam}">v${revision}</a>
+ <a href="${repository}${name}${oneRepoParam}">${name}</a>
+ <a
href="${repository}${name}?rev=${revision}&content-type=text/vnd.viewcvs-markup${multiRepoParam}">v${revision}</a>
</j:otherwise>
</j:choose>
Modified: maven/maven-1/plugins/trunk/changelog/xdocs/changes.xml
URL:
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/changelog/xdocs/changes.xml?rev=179949&r1=179948&r2=179949&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/changelog/xdocs/changes.xml (original)
+++ maven/maven-1/plugins/trunk/changelog/xdocs/changes.xml Fri Jun 3 22:07:07
2005
@@ -26,6 +26,7 @@
</properties>
<body>
<release version="1.8-SNAPSHOT" date="in SVN">
+ <action dev="brett" type="fix" issue="MPCHANGELOG-25" due-to="Neil
Palmer">Corrected link for viewcvs configured with muliple cvs
repository.</action>
<action dev="brett" type="add" issue="MPCHANGELOG-49" due-to="Freddy
Mallet">Add VSS support</action>
<action dev="brett" type="fix" issue="MPCHANGELOG-57" due-to="Sebastian
Scholze">Correctly parse (no author) from SVN logs</action>
<action dev="brett" type="fix" issue="MPCHANGELOG-53" due-to="Kenneth
Leider">Add CVS monitor support</a>
Modified: maven/maven-1/plugins/trunk/changelog/xdocs/properties.xml
URL:
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/changelog/xdocs/properties.xml?rev=179949&r1=179948&r2=179949&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/changelog/xdocs/properties.xml (original)
+++ maven/maven-1/plugins/trunk/changelog/xdocs/properties.xml Fri Jun 3
22:07:07 2005
@@ -85,6 +85,15 @@
</td>
</tr>
<tr>
+ <td>maven.changelog.commentFormat</td>
+ <td>Yes</td>
+ <td>
+ Specifies the RCS query to use when generating the comment for
change log.
+ This is currently only used by the Clearcase change log. The
default value is
+ <code>%Sn - %c - Activity: %[activity]p\\n</code> days.
+ </td>
+ </tr>
+ <tr>
<td>maven.changelog.factory</td>
<td>Yes</td>
<td>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]