ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@locus.apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Copydir.java Copyfile.java Delete.java Deltree.java Rename.java defaults.properties
Date Wed, 04 Oct 2000 09:18:49 GMT
bodewig     00/10/04 02:18:49

  Modified:    .        build.xml
               src/main/org/apache/tools/ant/taskdefs Copydir.java
                        Copyfile.java Delete.java Deltree.java Rename.java
                        defaults.properties
  Log:
  Made the old file handling tasks even more deprecated. Made Ant use
  the new tasks in its own buildfile.
  
  Fixed a problem with <delete dir=""> when the directory didn't exists
  (deltree would ignore this - delete now does so as well).
  
  Revision  Changes    Path
  1.80      +33 -30    jakarta-ant/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/build.xml,v
  retrieving revision 1.79
  retrieving revision 1.80
  diff -u -r1.79 -r1.80
  --- build.xml	2000/09/21 07:19:47	1.79
  +++ build.xml	2000/10/04 09:18:48	1.80
  @@ -100,20 +100,23 @@
         <exclude name="**/AntStarTeam*.java" unless="starteam.present" />
       </javac>
    
  -    <copydir src="${src.dir}" dest="${build.classes}">
  -      <include name="**/*.properties" />
  -    </copydir>
  +    <copy todir="${build.classes}">
  +      <fileset dir="${src.dir}">
  +        <include name="**/*.properties" />
  +      </fileset>
  +    </copy>
   
       <filter token="VERSION" value="${version}" />
       <filter token="DATE" value="${TODAY}" />
       <filter token="TIME" value="${TSTAMP}" />
  -    <copydir src="${src.dir}" 
  -             dest="${build.classes}" 
  -             forceoverwrite="true"
  +    <copy    todir="${build.classes}" 
  +             overwrite="true"
                filtering="on">
  -      <include name="**/version.txt" />
  -      <include name="**/defaultManifest.mf" />
  -    </copydir>
  +      <fileset dir="${src.dir}">
  +        <include name="**/version.txt" />
  +        <include name="**/defaultManifest.mf" />
  +      </fileset>
  +    </copy>
     </target>
   
     <!-- =================================================================== -->
  @@ -133,7 +136,7 @@
     <!-- =================================================================== -->
     <target name="main" depends="jar" description="Creates the binary structure">
        <mkdir dir="${bin.dir}"/>
  -     <copydir src="${src.bin.dir}" dest="${bin.dir}"/>
  +     <copy dir="${src.bin.dir}" todir="${bin.dir}"/>
        <chmod perm="+x">
          <fileset dir="${bin.dir}">
            <patternset refid="chmod.patterns"/>
  @@ -170,13 +173,13 @@
        <mkdir dir="${ant.dist.dir}/docs/api"/>
        <mkdir dir="${ant.dist.dir}/src"/>
   
  -     <copydir src="${src.dir}" dest="${ant.dist.dir}/src"/>
  -     <copydir src="${lib.dir}" dest="${ant.dist.dir}/lib"/>
  +     <copy dir="${src.dir}" todir="${ant.dist.dir}/src"/>
  +     <copy dir="${lib.dir}" todir="${ant.dist.dir}/lib"/>
   
  -     <copyfile src="build.xml" dest="${ant.dist.dir}/lib/build.xml"/>
  -     <copydir src="src/bin" dest="${ant.dist.dir}/bin"/>
  -     <copydir src="${docs.dir}" dest="${ant.dist.dir}/docs"/>
  -     <copydir src="${build.javadocs}" dest="${ant.dist.dir}/docs/api"/>
  +     <copy file="build.xml" tofile="${ant.dist.dir}/lib/build.xml"/>
  +     <copy dir="src/bin" todir="${ant.dist.dir}/bin"/>
  +     <copy dir="${docs.dir}" todir="${ant.dist.dir}/docs"/>
  +     <copy dir="${build.javadocs}" todir="${ant.dist.dir}/docs/api"/>
   
        <fixcrlf srcdir="${ant.dist.dir}/bin" includes="ant,antRun" cr="remove"/>
        <fixcrlf srcdir="${ant.dist.dir}/bin" includes="*.bat" cr="add"/>
  @@ -186,10 +189,10 @@
          </fileset>
        </chmod>
   
  -     <copyfile src="README" dest="${ant.dist.dir}/README"/>
  -     <copyfile src="WHATSNEW" dest="${ant.dist.dir}/WHATSNEW"/>
  -     <copyfile src="TODO" dest="${ant.dist.dir}/TODO"/>
  -     <copyfile src="LICENSE" dest="${ant.dist.dir}/LICENSE"/>
  +     <copy file="README" tofile="${ant.dist.dir}/README"/>
  +     <copy file="WHATSNEW" tofile="${ant.dist.dir}/WHATSNEW"/>
  +     <copy file="TODO" tofile="${ant.dist.dir}/TODO"/>
  +     <copy file="LICENSE" tofile="${ant.dist.dir}/LICENSE"/>
     </target>
   
     <!-- =================================================================== -->
  @@ -212,14 +215,14 @@
     <!-- =================================================================== -->
     <target name="bootstrap" depends="main" description="Installs the ant.jar library
and binary files into ant.home">
       <echo message="copying bootstrapped files into bin and lib"/>
  -    <copydir src="${lib.dir}" dest="lib"/>
  -    <copydir src="${bin.dir}" dest="bin"/>
  +    <copy dir="${lib.dir}" todir="lib"/>
  +    <copy dir="${bin.dir}" todir="bin"/>
     </target>     
   
     <target name="install" depends="dist" if="ant.install">
       <echo message="installing full copy of ant into ${ant.install}"/>
       <mkdir dir="${ant.install}"/>
  -    <copydir src="${ant.dist.dir}" dest="${ant.install}"/>
  +    <copy dir="${ant.dist.dir}" todir="${ant.install}"/>
       <chmod perm="+x">
         <fileset dir="${ant.install}/bin">
           <patternset refid="chmod.patterns"/>
  @@ -232,8 +235,8 @@
     <target name="mininstall" depends="main" if="ant.install">
       <echo message="copy minimal ant installation into ${ant.install}"/>
       <mkdir dir="${ant.install}"/>
  -    <copydir src="${lib.dir}" dest="${ant.install}/lib"/>
  -    <copydir src="${bin.dir}" dest="${ant.install}/bin"/>
  +    <copy dir="${lib.dir}" todir="${ant.install}/lib"/>
  +    <copy dir="${bin.dir}" todir="${ant.install}/bin"/>
       <chmod perm="+x">
         <fileset dir="${ant.install}/bin">
           <patternset refid="chmod.patterns"/>
  @@ -245,15 +248,15 @@
     <!-- Cleans up generated stuff                                           -->
     <!-- =================================================================== -->
     <target name="clean">
  -    <deltree dir="${build.dir}"/>
  -    <deltree dir="${ant.dist.dir}"/>
  +    <delete dir="${build.dir}"/>
  +    <delete dir="${ant.dist.dir}"/>
     </target>
   
     <!-- =================================================================== -->
     <!-- Total cleanup                                                       -->
     <!-- =================================================================== -->
     <target name="total-clean" depends="clean">
  -    <deltree dir="${bin.dir}"/>
  +    <delete dir="${bin.dir}"/>
       <delete file="${lib.dir}/${name}.jar"/>
       <delete file="${Name}-${version}.zip"/>
       <delete file="${Name}-${version}.tar"/>
  @@ -322,8 +325,8 @@
       </junit>
   
       <!-- clean up again -->
  -    <deltree dir="src/etc/testcases/taskdefs/taskdefs.tmp" />
  -    <deltree dir="src/etc/testcases/taskdefs.tmp" />
  +    <delete dir="src/etc/testcases/taskdefs/taskdefs.tmp" />
  +    <delete dir="src/etc/testcases/taskdefs.tmp" />
     </target>
   
     <target name="run.single.test" if="testcase" depends="compiletests">
  
  
  
  1.16      +2 -0      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Copydir.java
  
  Index: Copydir.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Copydir.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- Copydir.java	2000/10/04 04:33:57	1.15
  +++ Copydir.java	2000/10/04 09:18:48	1.16
  @@ -63,6 +63,8 @@
    * Copies a directory.
    *
    * @author James Davidson <a href="mailto:duncan@x180.com">duncan@x180.com</a>
  + *
  + * @deprecated The copydir task is deprecated.  Use copy instead.
    */
   
   public class Copydir extends MatchingTask {
  
  
  
  1.8       +2 -0      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Copyfile.java
  
  Index: Copyfile.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Copyfile.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Copyfile.java	2000/10/04 04:33:58	1.7
  +++ Copyfile.java	2000/10/04 09:18:48	1.8
  @@ -63,6 +63,8 @@
    * Copies a file.
    *
    * @author duncan@x180.com
  + *
  + * @deprecated The copyfile task is deprecated.  Use copy instead.
    */
   
   public class Copyfile extends Task {
  
  
  
  1.9       +1 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Delete.java
  
  Index: Delete.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Delete.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Delete.java	2000/10/04 04:33:58	1.8
  +++ Delete.java	2000/10/04 09:18:48	1.9
  @@ -228,7 +228,7 @@
           }
   
           // delete the directory
  -        if (dir != null && !usedMatchingTask) {
  +        if (dir != null && dir.exists() && dir.isDirectory() &&
!usedMatchingTask) {
               log("Deleting directory " + dir.getAbsolutePath());
               removeDir(dir);
           }
  
  
  
  1.8       +2 -0      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Deltree.java
  
  Index: Deltree.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Deltree.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Deltree.java	2000/10/04 04:33:58	1.7
  +++ Deltree.java	2000/10/04 09:18:48	1.8
  @@ -61,6 +61,8 @@
    *
    *
    * @author duncan@x180.com
  + *
  + * @deprecated The deltree task is deprecated.  Use delete instead.
    */
   
   public class Deltree extends Task {
  
  
  
  1.4       +2 -0      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Rename.java
  
  Index: Rename.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Rename.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Rename.java	2000/10/04 04:33:59	1.3
  +++ Rename.java	2000/10/04 09:18:48	1.4
  @@ -63,6 +63,8 @@
    * Renames a file.
    *
    * @author haas@softwired.ch
  + *
  + * @deprecated The rename task is deprecated.  Use move instead.
    */
   public class Rename extends Task {
   
  
  
  
  1.44      +4 -4      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/defaults.properties
  
  Index: defaults.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/defaults.properties,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- defaults.properties	2000/10/04 04:33:58	1.43
  +++ defaults.properties	2000/10/04 09:18:48	1.44
  @@ -2,13 +2,10 @@
   mkdir=org.apache.tools.ant.taskdefs.Mkdir
   javac=org.apache.tools.ant.taskdefs.Javac
   chmod=org.apache.tools.ant.taskdefs.Chmod
  -deltree=org.apache.tools.ant.taskdefs.Deltree
   delete=org.apache.tools.ant.taskdefs.Delete
   copy=org.apache.tools.ant.taskdefs.Copy
   move=org.apache.tools.ant.taskdefs.Move
   jar=org.apache.tools.ant.taskdefs.Jar
  -copydir=org.apache.tools.ant.taskdefs.Copydir
  -copyfile=org.apache.tools.ant.taskdefs.Copyfile
   rmic=org.apache.tools.ant.taskdefs.Rmic
   cvs=org.apache.tools.ant.taskdefs.Cvs
   get=org.apache.tools.ant.taskdefs.Get
  @@ -32,7 +29,6 @@
   available=org.apache.tools.ant.taskdefs.Available
   filter=org.apache.tools.ant.taskdefs.Filter
   fixcrlf=org.apache.tools.ant.taskdefs.FixCRLF
  -rename=org.apache.tools.ant.taskdefs.Rename
   patch=org.apache.tools.ant.taskdefs.Patch
   style=org.apache.tools.ant.taskdefs.XSLTProcess
   touch=org.apache.tools.ant.taskdefs.Touch
  @@ -71,3 +67,7 @@
   # deprecated ant tasks (kept for back compatibility)
   javadoc2=org.apache.tools.ant.taskdefs.Javadoc
   compileTask=org.apache.tools.ant.taskdefs.CompileTask
  +copydir=org.apache.tools.ant.taskdefs.Copydir
  +copyfile=org.apache.tools.ant.taskdefs.Copyfile
  +deltree=org.apache.tools.ant.taskdefs.Deltree
  +rename=org.apache.tools.ant.taskdefs.Rename
  
  
  

Mime
View raw message