ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/builder DefaultProjectBuilder.java
Date Mon, 14 Jan 2002 09:04:17 GMT
donaldp     02/01/14 01:04:17

  Modified:    proposal/myrmidon/src/java/org/apache/myrmidon/components/builder
                        DefaultProjectBuilder.java
  Log:
  If basedir of project is not specified then default to the same directory that contains
build file.
  
  Submitted By: "Adam Murdoch" <adammurdoch@yahoo.com>
  
  Revision  Changes    Path
  1.22      +9 -4      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/builder/DefaultProjectBuilder.java
  
  Index: DefaultProjectBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/builder/DefaultProjectBuilder.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- DefaultProjectBuilder.java	23 Dec 2001 06:25:34 -0000	1.21
  +++ DefaultProjectBuilder.java	14 Jan 2002 09:04:17 -0000	1.22
  @@ -122,13 +122,18 @@
           }
   
           //get project-level attributes
  -        final String baseDirectoryName = configuration.getAttribute( "basedir" );
  +        final String baseDirectoryName = configuration.getAttribute( "basedir", null );
           final String defaultTarget = configuration.getAttribute( "default" );
           //final String name = configuration.getAttribute( "name" );
   
  -        //determine base directory for project
  -        final File baseDirectory =
  -            ( new File( file.getParentFile(), baseDirectoryName ) ).getAbsoluteFile();
  +        //determine base directory for project.  Use the directory containing
  +        //the build file as the default.
  +        File baseDirectory = file.getParentFile();
  +        if( baseDirectoryName != null )
  +        {
  +            baseDirectory = new File( baseDirectory, baseDirectoryName );
  +        }
  +        baseDirectory = baseDirectory.getAbsoluteFile();
   
           if( getLogger().isDebugEnabled() )
           {
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message