tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dun...@hyperreal.org
Subject cvs commit: jakarta-tools/ant/src/main/org/apache/tools/ant/taskdefs Javac.java
Date Fri, 15 Oct 1999 02:24:09 GMT
duncan      99/10/14 19:24:08

  Modified:    ant/src/main/org/apache/tools/ant Project.java
               ant/src/main/org/apache/tools/ant/taskdefs Javac.java
  Log:
  Made output filenames display nicely for all tasks.  No more "../"s.
  
  Submitted by:	Jason Hunter, jch@eng.sun.com
  
  Revision  Changes    Path
  1.4       +10 -2     jakarta-tools/ant/src/main/org/apache/tools/ant/Project.java
  
  Index: Project.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tools/ant/src/main/org/apache/tools/ant/Project.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Project.java	1999/10/11 01:57:19	1.3
  +++ Project.java	1999/10/15 02:24:07	1.4
  @@ -198,7 +198,7 @@
       }
   
       public File resolveFile(String fileName) {
  -	File file = new File( baseDir.getAbsolutePath());
  +	File file = new File(baseDir.getAbsolutePath());
   	StringTokenizer tok = new StringTokenizer(fileName, "/", false);
   	while (tok.hasMoreTokens()) {
   	    String part = tok.nextToken();
  @@ -208,7 +208,15 @@
   		file = new File(file, part);
   	    }
   	}
  -	return new File(file.getAbsolutePath());
  +
  +	try {
  +	    return new File(file.getCanonicalPath());
  +	}
  +	catch (IOException e) {
  +	    log("IOException getting canonical path for " + file + ": " +
  +                e.getMessage(), MSG_ERR);
  +	    return new File(file.getAbsolutePath());
  +	}
       }
   }
   
  
  
  
  1.4       +4 -9      jakarta-tools/ant/src/main/org/apache/tools/ant/taskdefs/Javac.java
  
  Index: Javac.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tools/ant/src/main/org/apache/tools/ant/taskdefs/Javac.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Javac.java	1999/10/14 08:57:17	1.3
  +++ Javac.java	1999/10/15 02:24:08	1.4
  @@ -32,11 +32,11 @@
       private Hashtable filecopyList = new Hashtable();
   
       public void setSrcdir(String srcDirName) {
  -	srcDir = new File(srcDirName);
  +	srcDir = project.resolveFile(srcDirName);
       }
   
       public void setDestdir(String destDirName) {
  -	destDir = new File(destDirName);
  +	destDir = project.resolveFile(destDirName);
       }
   
       public void setClasspath(String classpath) {
  @@ -84,13 +84,8 @@
   	}
   
   	if (compileList.size() > 0) {
  -            try {
  -                project.log("Compiling " + compileList.size() +
  -			    " source files to " + destDir.getCanonicalPath());
  -            } catch (IOException e) {
  -                throw new BuildException("IOException reading filesystem: " + 
  -                                         e.getMessage());
  -            }
  +            project.log("Compiling " + compileList.size() +
  +		        " source files to " + destDir);
   	    
   	    if (compiler.equalsIgnoreCase("classic")) {
   		doClassicCompile();
  
  
  

Mime
View raw message