ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject svn commit: r414442 - in /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs: AbstractJarSignerTask.java ExecTask.java Javac.java Javadoc.java TempFile.java Touch.java XSLTProcess.java
Date Thu, 15 Jun 2006 02:47:35 GMT
Author: kevj
Date: Wed Jun 14 19:47:34 2006
New Revision: 414442

URL: http://svn.apache.org/viewvc?rev=414442&view=rev
Log:
use fileutils.resolveFile

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ExecTask.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javac.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/TempFile.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Touch.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java?rev=414442&r1=414441&r2=414442&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java Wed Jun
14 19:47:34 2006
@@ -17,17 +17,18 @@
 
 package org.apache.tools.ant.taskdefs;
 
-import org.apache.tools.ant.Task;
+import java.io.File;
+import java.util.Enumeration;
+import java.util.Vector;
+
 import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.util.JavaEnvUtils;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.types.Environment;
 import org.apache.tools.ant.types.FileSet;
 import org.apache.tools.ant.types.Path;
 import org.apache.tools.ant.types.RedirectorElement;
-import org.apache.tools.ant.types.Environment;
-
-import java.io.File;
-import java.util.Vector;
-import java.util.Enumeration;
+import org.apache.tools.ant.util.FileUtils;
+import org.apache.tools.ant.util.JavaEnvUtils;
 
 /**
  * This is factored out from {@link SignJar}; a base class that can be used
@@ -98,6 +99,8 @@
      */
     private Path path = null;
 
+    private static final FileUtils FILE_UTILS = FileUtils.getFileUtils();
+    
     /**
      * Set the maximum memory to be used by the jarsigner process
      *
@@ -287,7 +290,7 @@
             // is the keystore a file
             addValue(cmd,"-keystore");
             String loc;
-            File keystoreFile = getProject().resolveFile(keystore);
+            File keystoreFile = FILE_UTILS.resolveFile(getProject().getBaseDir(), keystore);
             if (keystoreFile.exists()) {
                 loc = keystoreFile.getPath();
             } else {

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ExecTask.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ExecTask.java?rev=414442&r1=414441&r2=414442&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ExecTask.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ExecTask.java Wed Jun 14 19:47:34
2006
@@ -412,7 +412,7 @@
             return exec;
         }
         // try to find the executable
-        File executableFile = getProject().resolveFile(exec);
+        File executableFile = FILE_UTILS.resolveFile(getProject().getBaseDir(), exec);
         if (executableFile.exists()) {
             return executableFile.getAbsolutePath();
         }

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javac.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javac.java?rev=414442&r1=414441&r2=414442&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javac.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javac.java Wed Jun 14 19:47:34 2006
@@ -18,6 +18,7 @@
 package org.apache.tools.ant.taskdefs;
 
 import java.io.File;
+
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.DirectoryScanner;
 import org.apache.tools.ant.MagicNames;
@@ -26,6 +27,7 @@
 import org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory;
 import org.apache.tools.ant.types.Path;
 import org.apache.tools.ant.types.Reference;
+import org.apache.tools.ant.util.FileUtils;
 import org.apache.tools.ant.util.GlobPatternMapper;
 import org.apache.tools.ant.util.JavaEnvUtils;
 import org.apache.tools.ant.util.SourceFileScanner;
@@ -109,6 +111,8 @@
     private String source;
     private String debugLevel;
     private File tmpDir;
+    
+    private static final FileUtils FILE_UTILS = FileUtils.getFileUtils();
 
     /**
      * Javac task for compilation of Java files.
@@ -800,7 +804,7 @@
         // compile lists
         String[] list = src.list();
         for (int i = 0; i < list.length; i++) {
-            File srcDir = getProject().resolveFile(list[i]);
+            File srcDir = FILE_UTILS.resolveFile(getProject().getBaseDir(), list[i]);
             if (!srcDir.exists()) {
                 throw new BuildException("srcdir \""
                                          + srcDir.getPath()

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java?rev=414442&r1=414441&r2=414442&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java Wed Jun 14 19:47:34
2006
@@ -543,7 +543,7 @@
         while (tok.hasMoreTokens()) {
             String f = tok.nextToken();
             SourceFile sf = new SourceFile();
-            sf.setFile(getProject().resolveFile(f.trim()));
+            sf.setFile(FILE_UTILS.resolveFile(getProject().getBaseDir(),f.trim()));
             addSource(sf);
         }
     }
@@ -1016,7 +1016,7 @@
         if (!tok.hasMoreTokens()) {
             throw new BuildException(linkOfflineError);
         }
-        le.setPackagelistLoc(getProject().resolveFile(tok.nextToken()));
+        le.setPackagelistLoc(FILE_UTILS.resolveFile(getProject().getBaseDir(),tok.nextToken()));
     }
 
     /**
@@ -1745,7 +1745,7 @@
                 String link = null;
                 if (la.shouldResolveLink()) {
                     File hrefAsFile = 
-                        getProject().resolveFile(la.getHref());
+                        FILE_UTILS.resolveFile(getProject().getBaseDir(), la.getHref());
                     if (hrefAsFile.exists()) {
                         try {
                             link = FILE_UTILS.getFileURL(hrefAsFile)

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/TempFile.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/TempFile.java?rev=414442&r1=414441&r2=414442&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/TempFile.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/TempFile.java Wed Jun 14 19:47:34
2006
@@ -115,7 +115,7 @@
             throw new BuildException("no property specified");
         }
         if (destDir == null) {
-            destDir = getProject().resolveFile(".");
+            destDir = FILE_UTILS.resolveFile(getProject().getBaseDir(),".");
         }
         File tfile = FILE_UTILS.createTempFile(prefix, suffix, destDir);
         getProject().setNewProperty(property, tfile.toString());

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Touch.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Touch.java?rev=414442&r1=414441&r2=414442&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Touch.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Touch.java Wed Jun 14 19:47:34 2006
@@ -341,7 +341,7 @@
                 long modTime = (r.isExists()) ? r.getLastModified()
                     : defaultTimestamp;
                 for (int i = 0; i < mapped.length; i++) {
-                    touch(getProject().resolveFile(mapped[i]), modTime);
+                    touch(FILE_UTILS.resolveFile(getProject().getBaseDir(),mapped[i]), modTime);
                 }
             }
         }

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java?rev=414442&r1=414441&r2=414442&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java Wed Jun 14 19:47:34
2006
@@ -283,7 +283,7 @@
 
         try {
             if (baseDir == null) {
-                baseDir = getProject().resolveFile(".");
+                baseDir = FILE_UTILS.resolveFile(getProject().getBaseDir(),".");
             }
 
             liaison = getLiaison();



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


Mime
View raw message