maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From denn...@apache.org
Subject svn commit: r668802 - in /maven/plugins/trunk/maven-repository-plugin: pom.xml src/main/java/org/apache/maven/plugins/repository/BundlePackMojo.java
Date Tue, 17 Jun 2008 19:18:25 GMT
Author: dennisl
Date: Tue Jun 17 12:18:25 2008
New Revision: 668802

URL: http://svn.apache.org/viewvc?rev=668802&view=rev
Log:
[MREPOSITORY-10] add XML encoding support for POM reading/writing

Modified:
    maven/plugins/trunk/maven-repository-plugin/pom.xml
    maven/plugins/trunk/maven-repository-plugin/src/main/java/org/apache/maven/plugins/repository/BundlePackMojo.java

Modified: maven/plugins/trunk/maven-repository-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-repository-plugin/pom.xml?rev=668802&r1=668801&r2=668802&view=diff
==============================================================================
--- maven/plugins/trunk/maven-repository-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-repository-plugin/pom.xml Tue Jun 17 12:18:25 2008
@@ -32,7 +32,7 @@
   <name>Maven Repository Plugin</name>
   <version>2.1-SNAPSHOT</version>
   <prerequisites>
-    <maven>2.0</maven>
+    <maven>2.0.6</maven>
   </prerequisites>
   <issueManagement>
     <system>JIRA</system>
@@ -122,5 +122,10 @@
       <artifactId>maven-plugin-testing-harness</artifactId>
       <version>1.0-beta-1</version>
     </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+      <version>1.5.1</version>
+    </dependency>
   </dependencies>
 </project>

Modified: maven/plugins/trunk/maven-repository-plugin/src/main/java/org/apache/maven/plugins/repository/BundlePackMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-repository-plugin/src/main/java/org/apache/maven/plugins/repository/BundlePackMojo.java?rev=668802&r1=668801&r2=668802&view=diff
==============================================================================
--- maven/plugins/trunk/maven-repository-plugin/src/main/java/org/apache/maven/plugins/repository/BundlePackMojo.java
(original)
+++ maven/plugins/trunk/maven-repository-plugin/src/main/java/org/apache/maven/plugins/repository/BundlePackMojo.java
Tue Jun 17 12:18:25 2008
@@ -19,16 +19,6 @@
  * under the License.
  */
 
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.util.Collections;
-import java.util.List;
-
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.artifact.repository.ArtifactRepository;
@@ -44,8 +34,16 @@
 import org.codehaus.plexus.archiver.ArchiverException;
 import org.codehaus.plexus.archiver.jar.JarArchiver;
 import org.codehaus.plexus.components.interactivity.InputHandler;
+import org.codehaus.plexus.util.ReaderFactory;
+import org.codehaus.plexus.util.WriterFactory;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.List;
+
 /**
  * Packs artifacts already available in a local repository in a bundle for an
  * upload requests. It requires that the artifact has a POM in the local
@@ -177,8 +175,7 @@
         Model model;
         try
         {
-            // TODO use ReaderFactory.newXmlReader() when plexus-utils is upgraded to 1.4.5+
-            model = new MavenXpp3Reader().read( new InputStreamReader( new FileInputStream(
pom ), "UTF-8" ) );
+            model = new MavenXpp3Reader().read( ReaderFactory.newXmlReader( pom ) );
         }
         catch ( XmlPullParserException e )
         {
@@ -252,8 +249,7 @@
 
             if ( rewrite )
             {
-                // TODO use WriterFactory.newXmlWriter() when plexus-utils is upgraded to
1.4.5+
-                new MavenXpp3Writer().write( new OutputStreamWriter( new FileOutputStream(
pom ), "UTF-8" ), model );
+                new MavenXpp3Writer().write( WriterFactory.newXmlWriter( pom ), model );
             }
 
             String finalName = null;



Mime
View raw message