Permalink
Browse files

merge -r946052 from trunk

  • Loading branch information...
1 parent 1a4b6e3 commit efe89b9e6a26f15a4ef3daa5be4c812752b99d9f @oching oching committed May 19, 2010
@@ -20,7 +20,6 @@
*/
import java.io.File;
-import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
@@ -59,6 +58,7 @@
import org.apache.maven.shared.release.versions.VersionInfo;
import org.codehaus.plexus.taskqueue.TaskQueueException;
import org.codehaus.plexus.util.FileUtils;
+import org.codehaus.plexus.util.ReaderFactory;
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.plexus.util.xml.Xpp3Dom;
import org.slf4j.Logger;
@@ -319,7 +319,7 @@ public String getProjectFileContent( int projectId, String directory, String fil
MavenXpp3Reader pomReader = new MavenXpp3Reader();
try
{
- Model model = pomReader.read( new FileReader( new File( workingDirectory, pomFilename ) ) );
+ Model model = pomReader.read( ReaderFactory.newXmlReader( new File( workingDirectory, pomFilename ) ) );
if ( model.getBuild() != null && model.getBuild().getPlugins() != null )
{
@@ -980,7 +980,7 @@ private void processProject( String workingDirectory, String pomFilename, boolea
throws Exception
{
MavenXpp3Reader pomReader = new MavenXpp3Reader();
- Model model = pomReader.read( new FileReader( new File( workingDirectory, pomFilename ) ) );
+ Model model = pomReader.read( ReaderFactory.newXmlReader( new File( workingDirectory, pomFilename ) ) );
if ( model.getGroupId() == null )
{
@@ -21,7 +21,6 @@
import java.io.File;
import java.io.FileNotFoundException;
-import java.io.FileReader;
import java.io.IOException;
import java.util.List;
@@ -31,6 +30,7 @@
import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
import org.apache.maven.model.Model;
import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
+import org.codehaus.plexus.util.ReaderFactory;
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
@@ -80,7 +80,7 @@ protected ContinuumProjectBuildingResult doExecute( String pomUrl, int selectedP
filePath = filePath.substring( FILE_SCHEME.length() );
}
- Model model = m2pomReader.read( new FileReader( filePath ) );
+ Model model = m2pomReader.read( ReaderFactory.newXmlReader( new File( filePath ) ) );
List modules = model.getModules();
@@ -39,10 +39,10 @@
import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
import org.apache.maven.scm.provider.svn.repository.SvnScmProviderRepository;
import org.apache.maven.shared.release.ReleaseResult;
+import org.codehaus.plexus.util.ReaderFactory;
import org.codehaus.plexus.util.xml.Xpp3Dom;
import java.io.File;
-import java.io.FileReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -177,7 +177,7 @@ private void getReleasePluginParameters( String workingDirectory, String pomFile
{
//TODO: Use the model reader so we'll can get the plugin configuration from parent too
MavenXpp3Reader pomReader = new MavenXpp3Reader();
- Model model = pomReader.read( new FileReader( new File( workingDirectory, pomFilename ) ) );
+ Model model = pomReader.read( ReaderFactory.newXmlReader( new File( workingDirectory, pomFilename ) ) );
if ( model.getBuild() != null && model.getBuild().getPlugins() != null )
{
@@ -41,11 +41,11 @@
import org.apache.maven.shared.release.ReleaseResult;
import org.apache.maven.shared.release.versions.DefaultVersionInfo;
import org.apache.maven.shared.release.versions.VersionInfo;
+import org.codehaus.plexus.util.ReaderFactory;
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.plexus.util.xml.Xpp3Dom;
import java.io.File;
-import java.io.FileReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
@@ -212,7 +212,7 @@ private void getReleasePluginParameters( String workingDirectory, String pomFile
{
//TODO: Use the model reader so we'll can get the plugin configuration from parent too
MavenXpp3Reader pomReader = new MavenXpp3Reader();
- Model model = pomReader.read( new FileReader( new File( workingDirectory, pomFilename ) ) );
+ Model model = pomReader.read( ReaderFactory.newXmlReader( new File( workingDirectory, pomFilename ) ) );
if ( model.getBuild() != null && model.getBuild().getPlugins() != null )
{
@@ -502,7 +502,7 @@ private void processProject( String workingDirectory, String pomFilename )
throws Exception
{
MavenXpp3Reader pomReader = new MavenXpp3Reader();
- Model model = pomReader.read( new FileReader( new File( workingDirectory, pomFilename ) ) );
+ Model model = pomReader.read( ReaderFactory.newXmlReader( new File( workingDirectory, pomFilename ) ) );
if ( model.getGroupId() == null )
{

0 comments on commit efe89b9

Please sign in to comment.