maven-m2-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tryg...@apache.org
Subject cvs commit: maven-components/maven-core/src/main/java/org/apache/maven/project DefaultMavenProjectBuilder.java MavenProjectBuilder.java
Date Sat, 09 Oct 2004 00:25:37 GMT
trygvis     2004/10/08 17:25:37

  Modified:    .        mboot.jar
               maven-core/src/main/java/org/apache/maven/project
                        DefaultMavenProjectBuilder.java
                        MavenProjectBuilder.java
  Log:
  o Making mavenHomeLocal a optional argument.
  
  Revision  Changes    Path
  1.35      +59 -53    maven-components/mboot.jar
  
  	<<Binary file>>
  
  
  1.19      +21 -6     maven-components/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
  
  Index: DefaultMavenProjectBuilder.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- DefaultMavenProjectBuilder.java	8 Oct 2004 19:15:01 -0000	1.18
  +++ DefaultMavenProjectBuilder.java	9 Oct 2004 00:25:37 -0000	1.19
  @@ -87,12 +87,24 @@
       // MavenProjectBuilder Implementation
       // ----------------------------------------------------------------------
   
  +    public MavenProject build( File projectDescriptor )
  +        throws ProjectBuildingException
  +    {
  +        return build( null, projectDescriptor, false );
  +    }
  +
       public MavenProject build( File mavenLocalHome, File projectDescriptor )
           throws ProjectBuildingException
       {
           return build( mavenLocalHome, projectDescriptor, false );
       }
   
  +    public MavenProject build( File projectDescriptor, boolean resolveDependencies )
  +        throws ProjectBuildingException
  +    {
  +        return build( null, projectDescriptor, false );
  +    }
  +
       /** @todo can we move the super model reading to the initialize method? what about
the user/site? Is it reused?
        *  @todo this is still not completely faithful to the "always override" method of
the user POM: there is potential for settings not to be used in some rare circumstances. Some
restructuring is necessary.
        *  @todo we should be passing in some more configuration here so that maven home local
can be used for user properties. Then, the new stuff should be unit tested.
  @@ -401,23 +413,26 @@
       {
           String localRepository = System.getProperty( "maven.repo.local" );
   
  -        Model superModel = getSuperModel();
  -
           if ( !StringUtils.isEmpty( localRepository ) )
           {
               return RepositoryUtils.localRepositoryToWagonRepository( localRepository );
           }
   
  +        Model superModel = getSuperModel();
  +
           if ( superModel.getLocal() != null && superModel.getLocal().getRepository()
!= null )
           {
               localRepository = superModel.getLocal().getRepository();
           }
   
  -        Model userModel = getUserOverrideModel( superModel, mavenHomeLocal );
  -
  -        if ( userModel != null && userModel.getLocal() != null && userModel.getLocal().getRepository()
!= null )
  +        if ( mavenHomeLocal != null )
           {
  -            localRepository = userModel.getLocal().getRepository();
  +            Model userModel = getUserOverrideModel( superModel, mavenHomeLocal );
  +
  +            if ( userModel != null && userModel.getLocal() != null && userModel.getLocal().getRepository()
!= null )
  +            {
  +                localRepository = userModel.getLocal().getRepository();
  +            }
           }
   
           if ( localRepository == null )
  
  
  
  1.4       +6 -0      maven-components/maven-core/src/main/java/org/apache/maven/project/MavenProjectBuilder.java
  
  Index: MavenProjectBuilder.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-core/src/main/java/org/apache/maven/project/MavenProjectBuilder.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MavenProjectBuilder.java	8 Oct 2004 19:15:01 -0000	1.3
  +++ MavenProjectBuilder.java	9 Oct 2004 00:25:37 -0000	1.4
  @@ -25,6 +25,12 @@
   
       // ----------------------------------------------------------------------
   
  +    MavenProject build( File project )
  +        throws ProjectBuildingException;
  +
  +    MavenProject build( File project, boolean followTransitiveDeps )
  +        throws ProjectBuildingException;
  +
       MavenProject build( File mavenHomeLocal, File project )
           throws ProjectBuildingException;
   
  
  
  

Mime
View raw message