You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by ke...@apache.org on 2006/06/15 04:47:35 UTC

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

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


Re: [vote] 'undeprecate project.resolveFile() [was Re: 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]

Posted by Alexey Solofnenko <tr...@gmail.com>.
+1, since it is should resolve relative paths relative to the project base
directory.

- Alexey.

On 6/15/06, Kev Jackson <fo...@gmail.com> wrote:
>
>
> On 16 Jun 2006, at 07:00, Antoine Levy-Lambert wrote:
>
> >
> > -------- Original-Nachricht --------
> > Datum: Thu, 15 Jun 2006 15:14:57 -0500
> > Von: Dominique Devienne < ddevienne@gmail.com>
> > An: Ant Developers List <de...@ant.apache.org>
> > Betreff: Re: Re: 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
> >
> >> This has been deprecated by jkf in commit 396012, @since 1.7
> >> apparently.
> >>
> > this is true
> >
> >> So it can be undeprecated, and Kev's changes can be removed ;-)
>
> So quick vote to 'undeprecate' project.resolveFile()
>
> my +0 (I'm not too bothered, but if the rest vote to undeprecate,
> then I'll undertake the work to put everything back to the way it was
> before I started messing with things)
>
> Kev
>
> --
> "All governments are in equal measure good and evil.  The best ideal
> is anarchy." - Leo Tolstoy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>


-- 
Alexey N. Solofnenko trelony at gmail.com
home: http://trelony.cjb.net/
Pleasant Hill, CA (GMT-8 hours usually)

Re: [vote] 'undeprecate project.resolveFile() [was Re: 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]

Posted by Dominique Devienne <dd...@gmail.com>.
My +1 to un-deprecate, obviously. --DD

On 6/15/06, Kev Jackson <fo...@gmail.com> wrote:
>
> On 16 Jun 2006, at 07:00, Antoine Levy-Lambert wrote:
>
> >
> > -------- Original-Nachricht --------
> > Datum: Thu, 15 Jun 2006 15:14:57 -0500
> > Von: Dominique Devienne <dd...@gmail.com>
> > An: Ant Developers List <de...@ant.apache.org>
> > Betreff: Re: Re: 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
> >
> >> This has been deprecated by jkf in commit 396012, @since 1.7
> >> apparently.
> >>
> > this is true
> >
> >> So it can be undeprecated, and Kev's changes can be removed ;-)
>
> So quick vote to 'undeprecate' project.resolveFile()
>
> my +0 (I'm not too bothered, but if the rest vote to undeprecate,
> then I'll undertake the work to put everything back to the way it was
> before I started messing with things)
>
> Kev

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


Re: [vote] 'undeprecate project.resolveFile()

Posted by Stefan Bodewig <bo...@apache.org>.
On Fri, 16 Jun 2006, Kev Jackson <fo...@gmail.com> wrote:

> So quick vote to 'undeprecate' project.resolveFile()

+1

Stefan

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


Re: [vote] 'undeprecate project.resolveFile() [was Re: 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]

Posted by Bruce Atherton <br...@callenish.com>.
I'm +1 for undeprecating.

You make a good case that Project is doing too much, but I don't think 
that deprecating before a good solution is arrived at is a good idea. 
And a solution that breaks DRY and adds more code dependencies on the 
Singleton Antipattern is not a good solution IMHO.

Martijn Kruithof wrote:
> I'd like to throw in a -0 in that case (not too bothered either)
>
> (as of here what I just wrote before:)
> I think Project has become too much of a "God" class. It has almost 
> 100 public methods, more than 80 are not deprecated. I understand it 
> is convenient to have a proxy towards every utility in Project, still 
> I 'd say Project is having too much responsibilities and it is good to 
> remove the responsibility of a utility class from the Project class.
>
> Martijn
>
> Kev Jackson schreef:
>
>>
>> On 16 Jun 2006, at 07:00, Antoine Levy-Lambert wrote:
>>
>>>
>>> -------- Original-Nachricht --------
>>> Datum: Thu, 15 Jun 2006 15:14:57 -0500
>>> Von: Dominique Devienne <dd...@gmail.com>
>>> An: Ant Developers List <de...@ant.apache.org>
>>> Betreff: Re: Re: 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
>>>
>>>> This has been deprecated by jkf in commit 396012, @since 1.7  
>>>> apparently.
>>>>
>>> this is true
>>>
>>>> So it can be undeprecated, and Kev's changes can be removed ;-)
>>>
>>
>> So quick vote to 'undeprecate' project.resolveFile()
>>
>> my +0 (I'm not too bothered, but if the rest vote to undeprecate,  
>> then I'll undertake the work to put everything back to the way it 
>> was  before I started messing with things)
>>
>> Kev
>>
>> -- 
>> "All governments are in equal measure good and evil.  The best ideal  
>> is anarchy." - Leo Tolstoy
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
>> For additional commands, e-mail: dev-help@ant.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>


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


Re: [vote] 'undeprecate project.resolveFile() [was Re: 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]

Posted by Martijn Kruithof <jm...@kruithof.xs4all.nl>.
I'd like to throw in a -0 in that case (not too bothered either)

(as of here what I just wrote before:)
I think Project has become too much of a "God" class. It has almost 100 
public methods, more than 80 are not deprecated. I understand it is 
convenient to have a proxy towards every utility in Project, still I 'd 
say Project is having too much responsibilities and it is good to remove 
the responsibility of a utility class from the Project class.

Martijn

Kev Jackson schreef:

>
> On 16 Jun 2006, at 07:00, Antoine Levy-Lambert wrote:
>
>>
>> -------- Original-Nachricht --------
>> Datum: Thu, 15 Jun 2006 15:14:57 -0500
>> Von: Dominique Devienne <dd...@gmail.com>
>> An: Ant Developers List <de...@ant.apache.org>
>> Betreff: Re: Re: 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
>>
>>> This has been deprecated by jkf in commit 396012, @since 1.7  
>>> apparently.
>>>
>> this is true
>>
>>> So it can be undeprecated, and Kev's changes can be removed ;-)
>>
>
> So quick vote to 'undeprecate' project.resolveFile()
>
> my +0 (I'm not too bothered, but if the rest vote to undeprecate,  
> then I'll undertake the work to put everything back to the way it was  
> before I started messing with things)
>
> Kev
>
> -- 
> "All governments are in equal measure good and evil.  The best ideal  
> is anarchy." - Leo Tolstoy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>


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


Re: [vote] 'undeprecate project.resolveFile() [was Re: 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]

Posted by Conor MacNeill <co...@apache.org>.
+1

Conor

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


Re: [vote] 'undeprecate project.resolveFile() [was Re: 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]

Posted by Antoine Levy-Lambert <an...@gmx.de>.
+1 for undeprecating.

Regards,

Antoine
-------- Original-Nachricht --------
Datum: Fri, 16 Jun 2006 09:43:17 +0700
Von: Kev Jackson <fo...@gmail.com>
An: Ant Developers List <de...@ant.apache.org>
Betreff: [vote] \'undeprecate project.resolveFile() [was Re: 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]

> 
> On 16 Jun 2006, at 07:00, Antoine Levy-Lambert wrote:
> 
> >
> > -------- Original-Nachricht --------
> > Datum: Thu, 15 Jun 2006 15:14:57 -0500
> > Von: Dominique Devienne <dd...@gmail.com>
> > An: Ant Developers List <de...@ant.apache.org>
> > Betreff: Re: Re: 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
> >
> >> This has been deprecated by jkf in commit 396012, @since 1.7  
> >> apparently.
> >>
> > this is true
> >
> >> So it can be undeprecated, and Kev's changes can be removed ;-)
> 
> So quick vote to 'undeprecate' project.resolveFile()
> 
> my +0 (I'm not too bothered, but if the rest vote to undeprecate,  
> then I'll undertake the work to put everything back to the way it was  
> before I started messing with things)
> 
> Kev
> 
> --
> "All governments are in equal measure good and evil.  The best ideal  
> is anarchy." - Leo Tolstoy
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org

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


[vote] 'undeprecate project.resolveFile() [was Re: 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]

Posted by Kev Jackson <fo...@gmail.com>.
On 16 Jun 2006, at 07:00, Antoine Levy-Lambert wrote:

>
> -------- Original-Nachricht --------
> Datum: Thu, 15 Jun 2006 15:14:57 -0500
> Von: Dominique Devienne <dd...@gmail.com>
> An: Ant Developers List <de...@ant.apache.org>
> Betreff: Re: Re: 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
>
>> This has been deprecated by jkf in commit 396012, @since 1.7  
>> apparently.
>>
> this is true
>
>> So it can be undeprecated, and Kev's changes can be removed ;-)

So quick vote to 'undeprecate' project.resolveFile()

my +0 (I'm not too bothered, but if the rest vote to undeprecate,  
then I'll undertake the work to put everything back to the way it was  
before I started messing with things)

Kev

--
"All governments are in equal measure good and evil.  The best ideal  
is anarchy." - Leo Tolstoy


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


Re: 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

Posted by Martijn Kruithof <jm...@kruithof.xs4all.nl>.
>>I appreciate Kev's efforts to remove the deprecations, but IMHO
>>resolveFile(String) shouldn't have been deprecated.
>>
>>Am I the only one to think that? --DD
>>    
>>
>
>I thought that Martin only added "since Ant 1.x.y" mentions next to already deprecated function calls.
>
>I am enclined to follow your opinion.
>
>Regards,
>
>Antoine
>  
>
In commit 396012 I only added the since 1.7 comment towards the already existing @deprecated.

Notwithstanding, I think I actually am guilty of marking that method as 
deprecated in an earlier course of action, as all other proxy methods 
towards FileUtils were already marked deprecated.

@deprecated methods can always (even when marked as deprecated in 
earlier versions) been unmarked, that will not break backward 
compatibiltity.

Still I think Project has become too much of a "God" class. It has 
almost 100 public methods, more than 80 are not deprecated. I understand 
it is convenient to have a proxy towards every utility in Project, still 
I 'd say Project is having too much responsibilities and it is good to 
remove the responsibility of a utility class from the Project class.

Martijn



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


Re: Re: Re: 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

Posted by Antoine Levy-Lambert <an...@gmx.de>.
-------- Original-Nachricht --------
Datum: Thu, 15 Jun 2006 15:14:57 -0500
Von: Dominique Devienne <dd...@gmail.com>
An: Ant Developers List <de...@ant.apache.org>
Betreff: Re: Re: 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

> This has been deprecated by jkf in commit 396012, @since 1.7 apparently.
>
this is true
 
> So it can be undeprecated, and Kev's changes can be removed ;-)
> 
yes


> I appreciate Kev's efforts to remove the deprecations, but IMHO
> resolveFile(String) shouldn't have been deprecated.
> 
> Am I the only one to think that? --DD

I thought that Martin only added "since Ant 1.x.y" mentions next to already deprecated function calls.

I am enclined to follow your opinion.

Regards,

Antoine

> 
> On 6/15/06, Antoine Levy-Lambert <an...@gmx.de> wrote:
> > Hello Dominique,
> >
> > Project.resolveFile(String fileName) is
> > @deprecated since 1.7
> >
> > so Kevin is removing our own calls to deprecated methods.
> >
> > The real question is why did we deprecate Project.resolveFile(String) in
> the first place ? Second, was there a consensus to do it ?
> >
> > Regards,
> >
> > Antoine
> > -------- Original-Nachricht --------
> > Datum: Thu, 15 Jun 2006 13:26:05 -0500
> > Von: Dominique Devienne <dd...@gmail.com>
> > An: Ant Developers List <de...@ant.apache.org>
> > Betreff: Re: 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
> >
> > > On 6/14/06, kevj@apache.org <ke...@apache.org> wrote:
> > > > Author: kevj
> > > > Log: use fileutils.resolveFile
> > > > + private static final FileUtils FILE_UTILS =
> FileUtils.getFileUtils();
> > > > -  File keystoreFile = getProject().resolveFile(keystore);
> > > > + File keystoreFile =
> FILE_UTILS.resolveFile(getProject().getBaseDir(),
> > > keystore);
> > >
> > > Hmmm, I'm sorry, but I don't like these changes...
> > >
> > > Sprinkling static FILE_UTILS references in many classes that already
> > > have references to project, which has always been the "proper" mean to
> > > resolve a file, is not a desirable change IMHO.
> > >
> > > Just use a FILE_UTILS in Project.java once and for all, and be done
> > > with it, no? getProject().resolveFile(string) reads better, and has
> > > always been the "canonical" way to resolve a file to me.
> > >
> > > If other are in favor of your changes, i'd be happy to read the
> > > arguments for it, but otherwise I'm kinda -1 on this ;-) Thanks, --DD
> > >

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


Re: Re: 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

Posted by Dominique Devienne <dd...@gmail.com>.
This has been deprecated by jkf in commit 396012, @since 1.7 apparently.

So it can be undeprecated, and Kev's changes can be removed ;-)

I appreciate Kev's efforts to remove the deprecations, but IMHO
resolveFile(String) shouldn't have been deprecated.

Am I the only one to think that? --DD

On 6/15/06, Antoine Levy-Lambert <an...@gmx.de> wrote:
> Hello Dominique,
>
> Project.resolveFile(String fileName) is
> @deprecated since 1.7
>
> so Kevin is removing our own calls to deprecated methods.
>
> The real question is why did we deprecate Project.resolveFile(String) in the first place ? Second, was there a consensus to do it ?
>
> Regards,
>
> Antoine
> -------- Original-Nachricht --------
> Datum: Thu, 15 Jun 2006 13:26:05 -0500
> Von: Dominique Devienne <dd...@gmail.com>
> An: Ant Developers List <de...@ant.apache.org>
> Betreff: Re: 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
>
> > On 6/14/06, kevj@apache.org <ke...@apache.org> wrote:
> > > Author: kevj
> > > Log: use fileutils.resolveFile
> > > + private static final FileUtils FILE_UTILS = FileUtils.getFileUtils();
> > > -  File keystoreFile = getProject().resolveFile(keystore);
> > > + File keystoreFile = FILE_UTILS.resolveFile(getProject().getBaseDir(),
> > keystore);
> >
> > Hmmm, I'm sorry, but I don't like these changes...
> >
> > Sprinkling static FILE_UTILS references in many classes that already
> > have references to project, which has always been the "proper" mean to
> > resolve a file, is not a desirable change IMHO.
> >
> > Just use a FILE_UTILS in Project.java once and for all, and be done
> > with it, no? getProject().resolveFile(string) reads better, and has
> > always been the "canonical" way to resolve a file to me.
> >
> > If other are in favor of your changes, i'd be happy to read the
> > arguments for it, but otherwise I'm kinda -1 on this ;-) Thanks, --DD
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> > For additional commands, e-mail: dev-help@ant.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>

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


Re: Re: 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

Posted by Antoine Levy-Lambert <an...@gmx.de>.
Hello Dominique,

Project.resolveFile(String fileName) is
@deprecated since 1.7 

so Kevin is removing our own calls to deprecated methods.

The real question is why did we deprecate Project.resolveFile(String) in the first place ? Second, was there a consensus to do it ? 

Regards,

Antoine
-------- Original-Nachricht --------
Datum: Thu, 15 Jun 2006 13:26:05 -0500
Von: Dominique Devienne <dd...@gmail.com>
An: Ant Developers List <de...@ant.apache.org>
Betreff: Re: 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

> On 6/14/06, kevj@apache.org <ke...@apache.org> wrote:
> > Author: kevj
> > Log: use fileutils.resolveFile
> > + private static final FileUtils FILE_UTILS = FileUtils.getFileUtils();
> > -  File keystoreFile = getProject().resolveFile(keystore);
> > + File keystoreFile = FILE_UTILS.resolveFile(getProject().getBaseDir(),
> keystore);
> 
> Hmmm, I'm sorry, but I don't like these changes...
> 
> Sprinkling static FILE_UTILS references in many classes that already
> have references to project, which has always been the "proper" mean to
> resolve a file, is not a desirable change IMHO.
> 
> Just use a FILE_UTILS in Project.java once and for all, and be done
> with it, no? getProject().resolveFile(string) reads better, and has
> always been the "canonical" way to resolve a file to me.
> 
> If other are in favor of your changes, i'd be happy to read the
> arguments for it, but otherwise I'm kinda -1 on this ;-) Thanks, --DD
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org

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


Re: 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

Posted by Dominique Devienne <dd...@gmail.com>.
On 6/14/06, kevj@apache.org <ke...@apache.org> wrote:
> Author: kevj
> Log: use fileutils.resolveFile
> + private static final FileUtils FILE_UTILS = FileUtils.getFileUtils();
> -  File keystoreFile = getProject().resolveFile(keystore);
> + File keystoreFile = FILE_UTILS.resolveFile(getProject().getBaseDir(), keystore);

Hmmm, I'm sorry, but I don't like these changes...

Sprinkling static FILE_UTILS references in many classes that already
have references to project, which has always been the "proper" mean to
resolve a file, is not a desirable change IMHO.

Just use a FILE_UTILS in Project.java once and for all, and be done
with it, no? getProject().resolveFile(string) reads better, and has
always been the "canonical" way to resolve a file to me.

If other are in favor of your changes, i'd be happy to read the
arguments for it, but otherwise I'm kinda -1 on this ;-) Thanks, --DD

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