You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by jv...@apache.org on 2003/12/08 19:20:28 UTC

cvs commit: maven-components/maven-project/src/java/org/apache/maven/project DefaultProjectBuilder.java

jvanzyl     2003/12/08 10:20:28

  Modified:    maven-project/src/java/org/apache/maven/project
                        DefaultProjectBuilder.java
  Log:
  o not the concern of the builder to deal with multiple projects. that can be done
    else where in another layer.
  
  Revision  Changes    Path
  1.10      +0 -94     maven-components/maven-project/src/java/org/apache/maven/project/DefaultProjectBuilder.java
  
  Index: DefaultProjectBuilder.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-project/src/java/org/apache/maven/project/DefaultProjectBuilder.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- DefaultProjectBuilder.java	8 Dec 2003 05:09:11 -0000	1.9
  +++ DefaultProjectBuilder.java	8 Dec 2003 18:20:28 -0000	1.10
  @@ -8,7 +8,6 @@
   import org.apache.maven.model.ModelUnmarshaller;
   import org.apache.maven.util.CollectionUtils;
   import org.codehaus.plexus.logging.AbstractLogEnabled;
  -import org.codehaus.plexus.util.DirectoryScanner;
   import org.codehaus.plexus.util.StringInputStream;
   import org.codehaus.plexus.util.StringUtils;
   import org.xmlpull.v1.XmlPullParserException;
  @@ -20,10 +19,8 @@
   import java.io.InputStream;
   import java.io.StringReader;
   import java.io.StringWriter;
  -import java.util.ArrayList;
   import java.util.HashMap;
   import java.util.Iterator;
  -import java.util.List;
   import java.util.Map;
   import java.util.Properties;
   
  @@ -360,48 +357,6 @@
       }
   
       /**
  -     * This is currently used for the reactor but may be generally useful.
  -     *
  -     * @param directory the directory to scan for maven projects
  -     * @param includes the pattern that matches a project
  -     * @return a {link List} of {@link org.apache.maven.model.Model}s
  -     * @throws java.lang.Exception when anything goes wrong. FIXME this is bad
  -     */
  -    List getProjects( File directory, String includes )
  -        throws Exception
  -    {
  -        return getProjects( directory, includes, null );
  -    }
  -
  -    /**
  -     * This is currently used for the reactor but may be generally useful.
  -     *
  -     * @param directory the directory to scan for maven projects
  -     * @param includes Patterns to include.
  -     * @param excludes Patterns to exclude.
  -     * @return a {link List} of {@link org.apache.maven.model.Model}s
  -     * @throws java.lang.Exception when anything goes wrong. FIXME this is bad
  -     */
  -    List getProjects( File directory,
  -                      String includes,
  -                      String excludes )
  -        throws Exception
  -    {
  -        String[] files = getFiles( directory, includes, excludes );
  -
  -        List projects = new ArrayList();
  -
  -        for ( int i = 0; i < files.length; i++ )
  -        {
  -            Project p = build( new File( files[i] ) );
  -
  -            projects.add( p );
  -        }
  -
  -        return projects;
  -    }
  -
  -    /**
        * @return an {@link java.io.InputStream} for the given project
        * @param project a {@link org.apache.maven.model.Model maven project}
        * @throws java.lang.Exception when anything goes wrong. FIXME this is bad
  @@ -425,55 +380,6 @@
           StringWriter writer = new StringWriter();
           marshaller.marshall( writer, project );
           return writer.toString();
  -    }
  -
  -    /**
  -     * Get a set of files from a specifed directory with a set of includes.
  -     *
  -     * @param directory Directory to scan.
  -     * @param includes Comma separated list of includes.
  -     * @return files
  -     */
  -    public String[] getFiles( File directory, String includes )
  -    {
  -        return getFiles( directory, includes, null );
  -    }
  -
  -    /**
  -     * Get a set of files from a specifed directory with a set of includes.
  -     *
  -     * @param directory Directory to scan.
  -     * @param includes Comma separated list of includes.
  -     * @param excludes Comma separated list of excludes.
  -     * @return files
  -     */
  -    public String[] getFiles( File directory, String includes, String excludes )
  -    {
  -        String[] includePatterns = null;
  -        if ( includes != null )
  -        {
  -            includePatterns = StringUtils.split( includes, "," );
  -        }
  -
  -        String[] excludePatterns = null;
  -        if ( excludes != null )
  -        {
  -            excludePatterns = StringUtils.split( excludes, "," );
  -        }
  -
  -        DirectoryScanner directoryScanner = new DirectoryScanner();
  -        directoryScanner.setBasedir( directory );
  -        directoryScanner.setIncludes( includePatterns );
  -        directoryScanner.setExcludes( excludePatterns );
  -        directoryScanner.scan();
  -        String[] files = directoryScanner.getIncludedFiles();
  -
  -        for ( int i = 0; i < files.length; i++ )
  -        {
  -            files[i] = new File( directory, files[i] ).getAbsolutePath();
  -        }
  -
  -        return files;
       }
   
       // ----------------------------------------------------------------------
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org