The encoding of changes.xml is not preserved

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@290631 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
ltheussl committed 2005-09-21 06:32:39 +00:00
1 parent a51bfd7f6b
commit eefe89fb9e
3 files changed
+12 -5

No files matched your search

@@ -32,11 +32,11 @@ import org.dom4j.io.*;
*/
public class ReleaseVersion
{
public static final void releaseVersion( File changesFile, String currentVersion, String version )
public static final void releaseVersion( File changesFile, String currentVersion, String version, String encoding)
throws DocumentException, FileNotFoundException, UnsupportedEncodingException, IOException
{
DateFormat dateFormat = new SimpleDateFormat( "yyyy-MM-dd" );
releaseVersion( changesFile, currentVersion, version, dateFormat.format( new Date() ) );
releaseVersion( changesFile, currentVersion, version, encoding, dateFormat.format( new Date() ) );
}
static final Document transformVersion( File changesFile, String currentVersion, String version, String date )
@@ -101,7 +101,7 @@ public class ReleaseVersion
return null;
}
public static final void releaseVersion( File changesFile, String currentVersion, String version, String date )
public static final void releaseVersion( File changesFile, String currentVersion, String version, String encoding, String date )
throws DocumentException, FileNotFoundException, UnsupportedEncodingException, IOException
{
Document doc = transformVersion( changesFile, currentVersion, version, date );
@@ -120,6 +120,7 @@ public class ReleaseVersion
format.setIndentSize( 2 );
format.setNewlines( true );
format.setTrimText( true );
format.setEncoding( encoding );
XMLWriter writer = new XMLWriter( format );
writer.setOutputStream( os );