tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@locus.apache.org
Subject cvs commit: jakarta-tools/ant/src/main/org/apache/tools/ant ProjectHelper.java
Date Wed, 29 Dec 1999 15:28:49 GMT
rubys       99/12/29 07:28:49

  Modified:    ant/src/main/org/apache/tools/ant ProjectHelper.java
  Log:
  Cosmetic cleanup: always set baseDir using the canonicalPath
  
  Revision  Changes    Path
  1.10      +7 -18     jakarta-tools/ant/src/main/org/apache/tools/ant/ProjectHelper.java
  
  Index: ProjectHelper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tools/ant/src/main/org/apache/tools/ant/ProjectHelper.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ProjectHelper.java	1999/12/13 23:11:51	1.9
  +++ ProjectHelper.java	1999/12/29 15:28:49	1.10
  @@ -105,27 +105,16 @@
   	project.setName(root.getAttribute("name"));
   	project.setDefaultTarget(root.getAttribute("default"));
   
  -	if( project.getProperty( "basedir" ) == null) {
  -	    String baseDir = root.getAttribute("basedir");
  -	    if (!baseDir.equals("")) {
  -		try {
  -		    project.setBaseDir(new File(new File(baseDir)
  -			.getCanonicalPath()));
  -		} catch (IOException ioe) {
  -		    String msg = "Can't set basedir " + baseDir + " due to " +
  -			ioe.getMessage();
  -		    throw new BuildException(msg);
  -		}
  -	    } else {
  +	String baseDir = project.getProperty("basedir");
  +	if (baseDir == null) {
  +	    baseDir = root.getAttribute("basedir");
  +	    if (baseDir.equals("")) {
   		// Using clunky JDK1.1 methods here
  -		String absPath = buildFile.getAbsolutePath();
  -		String parentPath = new File(absPath).getParent();
  -		project.setBaseDir(new File(parentPath));
  +		baseDir = new File(buildFile.getAbsolutePath()).getParent();
   	    }
  -	} else {
  -	    project.setBaseDir( new File( project.getProperty("basedir")));
   	}
  -
  +	project.setBasedir(baseDir);
  +	    
   	// set up any properties that may be in the config file
   
   	//	configureProperties(project, root);
  
  
  

Mime
View raw message