maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r923485 - /maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/common/DefaultArchetypeArtifactManager.java
Date Mon, 15 Mar 2010 22:42:42 GMT
Author: hboutemy
Date: Mon Mar 15 22:42:42 2010
New Revision: 923485

URL: http://svn.apache.org/viewvc?rev=923485&view=rev
Log:
preserve encoding when reading XML descriptors

Modified:
    maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/common/DefaultArchetypeArtifactManager.java

Modified: maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/common/DefaultArchetypeArtifactManager.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/common/DefaultArchetypeArtifactManager.java?rev=923485&r1=923484&r2=923485&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/common/DefaultArchetypeArtifactManager.java
(original)
+++ maven/archetype/trunk/archetype-common/src/main/java/org/apache/maven/archetype/common/DefaultArchetypeArtifactManager.java
Mon Mar 15 22:42:42 2010
@@ -32,13 +32,13 @@ import org.apache.maven.model.Model;
 
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 import org.codehaus.plexus.util.IOUtil;
+import org.codehaus.plexus.util.ReaderFactory;
 import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.InputStreamReader;
 import java.io.Reader;
 
 import java.net.MalformedURLException;
@@ -647,7 +647,7 @@ public class DefaultArchetypeArtifactMan
                 "The " + Constants.ARCHETYPE_DESCRIPTOR + " descriptor cannot be found."
             );
         }
-        return new InputStreamReader( is );
+        return ReaderFactory.newXmlReader( is );
     }
 
     private boolean isFileSetArchetype( ZipFile zipFile )
@@ -773,7 +773,7 @@ public class DefaultArchetypeArtifactMan
                 "The " + Constants.OLD_ARCHETYPE_DESCRIPTOR + " descriptor cannot be found."
             );
         }
-        return new InputStreamReader( is );
+        return ReaderFactory.newXmlReader( is );
     }
 
     private Reader getOlderArchetypeDescriptorReader( ZipFile zipFile )
@@ -812,6 +812,6 @@ public class DefaultArchetypeArtifactMan
             );
         }
 
-        return new InputStreamReader( is );
+        return ReaderFactory.newXmlReader( is );
     }
 }



Mime
View raw message