You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by lt...@apache.org on 2006/08/25 00:55:52 UTC
svn commit: r434555 - in /maven/maven-1/plugins/trunk/changes: plugin.jelly
plugin.properties src/main/org/apache/maven/changes/ReleaseVersion.java
xdocs/changes.xml xdocs/properties.xml
Author: ltheussl
Date: Thu Aug 24 15:55:52 2006
New Revision: 434555
URL: http://svn.apache.org/viewvc?rev=434555&view=rev
Log:
PR: MPCHANGES-32
The encoding of the changes.xml file is not preserved after doing release-version.
New property maven.changes.outputencoding.
Modified:
maven/maven-1/plugins/trunk/changes/plugin.jelly
maven/maven-1/plugins/trunk/changes/plugin.properties
maven/maven-1/plugins/trunk/changes/src/main/org/apache/maven/changes/ReleaseVersion.java
maven/maven-1/plugins/trunk/changes/xdocs/changes.xml
maven/maven-1/plugins/trunk/changes/xdocs/properties.xml
Modified: maven/maven-1/plugins/trunk/changes/plugin.jelly
URL: http://svn.apache.org/viewvc/maven/maven-1/plugins/trunk/changes/plugin.jelly?rev=434555&r1=434554&r2=434555&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/changes/plugin.jelly (original)
+++ maven/maven-1/plugins/trunk/changes/plugin.jelly Thu Aug 24 15:55:52 2006
@@ -112,9 +112,9 @@
<define:tag name="release-version">
<j:useBean var="transformer" class="org.apache.maven.changes.ReleaseVersion"/>
<util:file var="f" name="${maven.docs.src}/changes.xml" />
- <!-- Set default encoding if not set. -->
+ <!-- Set encoding if not set. -->
<j:if test="${encoding == null}">
- <j:set var="encoding" value="${maven.docs.outputencoding}" />
+ <j:set var="encoding" value="${maven.changes.outputencoding}" />
</j:if>
<j:choose>
<j:when test="${date != null}">
Modified: maven/maven-1/plugins/trunk/changes/plugin.properties
URL: http://svn.apache.org/viewvc/maven/maven-1/plugins/trunk/changes/plugin.properties?rev=434555&r1=434554&r2=434555&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/changes/plugin.properties (original)
+++ maven/maven-1/plugins/trunk/changes/plugin.properties Thu Aug 24 15:55:52 2006
@@ -47,3 +47,6 @@
# Decide the sort order for action types
maven.changes.sort.order = add,fix,update,remove
+
+# To force an encoding for the changes.xml file
+# maven.changes.outputencoding =
\ No newline at end of file
Modified: maven/maven-1/plugins/trunk/changes/src/main/org/apache/maven/changes/ReleaseVersion.java
URL: http://svn.apache.org/viewvc/maven/maven-1/plugins/trunk/changes/src/main/org/apache/maven/changes/ReleaseVersion.java?rev=434555&r1=434554&r2=434555&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/changes/src/main/org/apache/maven/changes/ReleaseVersion.java (original)
+++ maven/maven-1/plugins/trunk/changes/src/main/org/apache/maven/changes/ReleaseVersion.java Thu Aug 24 15:55:52 2006
@@ -120,7 +120,18 @@
format.setIndentSize( 2 );
format.setNewlines( true );
format.setTrimText( true );
- format.setEncoding( encoding );
+ if ( encoding == null || "".equals( encoding ) )
+ {
+ String docsEncoding = doc.getXMLEncoding();
+ if ( docsEncoding != null )
+ {
+ format.setEncoding( docsEncoding );
+ }
+ }
+ else
+ {
+ format.setEncoding( encoding );
+ }
XMLWriter writer = new XMLWriter( format );
writer.setOutputStream( os );
Modified: maven/maven-1/plugins/trunk/changes/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/maven/maven-1/plugins/trunk/changes/xdocs/changes.xml?rev=434555&r1=434554&r2=434555&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/changes/xdocs/changes.xml (original)
+++ maven/maven-1/plugins/trunk/changes/xdocs/changes.xml Thu Aug 24 15:55:52 2006
@@ -24,6 +24,8 @@
</properties>
<body>
<release version="1.6.1-SNAPSHOT" date="In SVN">
+ <action dev="ltheussl" type="fix" issue="MPCHANGES-32">The encoding of the changes.xml file is not preserved after doing release-version.</action>
+ <action dev="ltheussl" type="add">New property maven.changes.outputencoding.</action>
<action dev="ltheussl" type="update">Update dom4j dependency to match the one in maven 1.1 core.</action>
<action dev="aheritier" type="update" issue="MAVEN-1753">Replace the deprecated xmlParserAPIs by xml-apis 1.3.03.</action>
<action dev="aheritier" type="update">Upgrade to commons-io 1.2.</action>
Modified: maven/maven-1/plugins/trunk/changes/xdocs/properties.xml
URL: http://svn.apache.org/viewvc/maven/maven-1/plugins/trunk/changes/xdocs/properties.xml?rev=434555&r1=434554&r2=434555&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/changes/xdocs/properties.xml (original)
+++ maven/maven-1/plugins/trunk/changes/xdocs/properties.xml Thu Aug 24 15:55:52 2006
@@ -77,6 +77,18 @@
add,fix,update,remove
</td>
</tr>
+ <tr>
+ <td>maven.changes.outputencoding</td>
+ <td>Yes</td>
+ <td>
+ Sets the encoding for the changes.xml file when using
+ the release-version tag. This can be useful to ensure
+ the same encoding for all files.
+ </td>
+ <td>
+ Default is empty, so the encoding of changes.xml will be preserved.
+ </td>
+ </tr>
</table>
</section>
</body>