Issue Details (XML | Word | Printable)

Key: MPRELEASE-12
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Dennis Lundberg
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Maven 1.x Release Plugin

The encoding of the project.xml file is not preserved after doing release:transform

Created: 18/Sep/05 03:00 PM   Updated: 07/Dec/05 05:00 PM   Resolved: 07/Dec/05 05:00 PM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: 1.5

Time Tracking:
Not Specified

File Attachments: 1. Text File MPRELEASE-12.patch (3 kB)

Environment: Windows XP Pro, Maven 1.0.2, release-plugin 1.4.1.


 Description  « Hide

This is similar in concept to MPCHANGES-24.

The encoding of the original project.xml file is not preserved when it is written back after the transformation. This means that my file was converted from ISO-8859-1 to UTF-8, which is the default encoding used by dom4j. Without a UTF-8 compliant editor I can't edit the file any more, because I use non-us-ascii character in the file.

The solution should be similar and the place to make the change is in this file:
http://svn.apache.org/viewcvs.cgi/maven/maven-1/plugins/trunk/release/src/main/org/apache/maven/release/AbstractPomTransformer.java
The method write() needs to get a hold of the original file's encoding, and do
format.setEncoding(<original-encoding>);



Dennis Lundberg added a comment - 26/Sep/05 01:14 PM

This patch is inspired by Lukas' fix for MPCHANGES-24.

It adds a new write method in AbstractPomTransformer.java that takes an encoding parameter. In plugin-jelly this new write method is used everywhere. I have tested the goal release:update-pom, the other goals are modified in a similar way.

The missing thing in the patch is a suitable developer in changes.xml.


Dennis Lundberg made changes - 26/Sep/05 01:14 PM
Field Original Value New Value
Attachment MPRELEASE-12.patch [ 16810 ]
Lukas Theussl added a comment - 07/Dec/05 05:00 PM

Patch applied. Thanks!


Lukas Theussl made changes - 07/Dec/05 05:00 PM
Resolution Fixed [ 1 ]
Fix Version/s 1.5 [ 12060 ]
Status Open [ 1 ] Closed [ 6 ]