ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject cvs commit: ant fetch.xml
Date Tue, 17 May 2005 14:09:25 GMT
stevel      2005/05/17 07:09:25

  Modified:    lib      libraries.properties
               .        fetch.xml
  Log:
  fetch moves to maven, though no auto download of those tasks, yet.
  
  Revision  Changes    Path
  1.4       +1 -0      ant/lib/libraries.properties
  
  Index: libraries.properties
  ===================================================================
  RCS file: /home/cvs/ant/lib/libraries.properties,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- libraries.properties	12 May 2005 04:21:01 -0000	1.3
  +++ libraries.properties	17 May 2005 14:09:25 -0000	1.4
  @@ -7,6 +7,7 @@
   bsh.version=2.0.b1
   commons-net.version=1.4.0
   commons-logging.version=1.0.4
  +commons-logging-api.version=${commons-logging.version}
   jdepend.version=2.7
   junit.version=3.8.1
   jsch.version=0.1.17
  
  
  
  1.3       +58 -41    ant/fetch.xml
  
  Index: fetch.xml
  ===================================================================
  RCS file: /home/cvs/ant/fetch.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- fetch.xml	28 Jan 2005 23:18:32 -0000	1.2
  +++ fetch.xml	17 May 2005 14:09:25 -0000	1.3
  @@ -81,48 +81,65 @@
       </fail>
       <echo>Downloading to ${dest.dir}</echo>
     </target>
  +
  +  
  +  <target name="probe-m2" >
  +    <!-- Look for M2 ant tasks in our classpath-->
  +    <available property="m2.antlib.found"
  +      resource="org/apache/maven/artifact/ant/antlib.xml" />
  +    <condition property="m2.antlib.typefound">
  +      <typefound name="antlib:org.apache.maven.artifact.ant:artifact" />
  +    </condition>
  +  </target>
     
  -  <!-- any init stuff -->
  -  <target name="init" depends="setproxy,pick-dest" >
  -    
  -    <macrodef name="f">
  -      <attribute name="project" />
  -      <sequential>
  -        <fail>
  -        Unknown project @{project}
  -          <condition>
  -            <not>
  -            <isset property="@{project}.version"/>
  -            </not>
  -          </condition>
  -        </fail>
  -        <libraries destDir="${dest.dir}" flatten="true" >
  -          <library project="@{project}" version="${@{project}.version}" />
  -        </libraries>
  -      </sequential>
  -    </macrodef> 
  +
  +  <target name="get-m2" depends="setproxy,probe-m2" unless="m2.antlib.found">
  +    <!-- fetch M2 ant tasks into our repository, if it is not there-->
  +    <!-- <property name="" /> -->
  +    <fail>
  +    Fetch the ant task JAR from http://maven.apache.org/maven2/ant-tasks.html
  +    </fail>
  +  </target>  
  +  
  +  
  +  <target name="macros" depends="get-m2"
  +    xmlns:artifact="antlib:org.apache.maven.artifact.ant">
   
       <macrodef name="f2">
         <attribute name="project" />
  -      <attribute name="archive" />
  +      <attribute name="archive" default="@{project}"/>
         <sequential>
           <fail>
  -        Unknown file @{archive}/
  +        Unknown archive @{archive}
             <condition>
               <not>
               <isset property="@{archive}.version"/>
               </not>
             </condition>
  -        </fail>      
  -        <libraries destDir="${dest.dir}" flatten="true" >
  -          <library project="@{project}"
  -            archive="archive"
  -            version="${@{archive}.version}" />
  -        </libraries>
  +        </fail>
  +        <artifact:dependencies pathID="@{archive}.path">
  +          <dependency groupID="@{project}"
  +            artifactID="@{archive}"
  +            version="${@{archive}.version}"/>        
  +        </artifact:dependencies>
  +        <!-- now we are left with the problem of getting the files 
  +             into our directory -->
  +        <copypath destdir="${dest.dir}" pathref="@{archive}.path">
  +          <flattenmapper/>
  +        </copypath>
         </sequential>
       </macrodef> 
     </target>
     
  +
  +  
  +  <!-- any init stuff -->
  +  <target name="init" depends="setproxy,pick-dest,macros" >
  +
  +  </target>
  +  
  +
  +  
     <target name="diag" depends="init">
       <echoproperties />
     </target>
  @@ -130,65 +147,65 @@
     <target name="logging" 
       description="load logging libraries"
       depends="init">
  -    <f project="log4j" />
  -    <f project="commons-logging" />
  +    <f2 project="log4j" />
  +    <f2 project="commons-logging" archive="commons-logging-api" />
     </target>
       
     <target name="junit" 
       description="load junit libraries"
       depends="init">
  -    <f project="junit" />
  +    <f2 project="junit" />
     </target>
     
     <target name="xml" 
       description="load full XML libraries (xalan, resolver)"
       depends="init">
  -    <f project="xalan" />
  -    <f project="xml-resolver" />
  +    <f2 project="xalan" />
  +    <f2 project="xml-resolver" />
     </target>
   
     <target name="networking" 
       description="load networking libraries (commons-net; jsch)"
       depends="init">
  -    <f project="commons-net" />
  -    <f project="jsch" />
  +    <f2 project="commons-net" />
  +    <f2 project="jsch" />
     </target>  
   
     <target name="regexp" 
       description="load regexp libraries"
       depends="init">
  -    <f project="regexp" />
  -    <f project="oro" />
  +    <f2 project="regexp" />
  +    <f2 project="oro" />
     </target>  
    
     <target name="antlr" 
       description="load antlr libraries"
       depends="init">
  -    <f project="antlr" />
  +    <f2 project="antlr" />
     </target>  
   
     <target name="bcel" 
       description="load bcel libraries"
       depends="init">
  -    <f project="bcel" />
  +    <f2 project="bcel" />
     </target>  
   
     <target name="jdepend" 
       description="load jdepend libraries"
       depends="init">
  -    <f project="jdepend" />
  +    <f2 project="jdepend" />
     </target>  
   
     <target name="bsf" 
       description="load bsf libraries"
       depends="init">
  -    <f project="bsf" />
  +    <f2 project="bsf" />
     </target>
   
     <target name="debugging" 
       description="internal ant debugging"
       depends="init">
  -    <f project="which" />
  +    <f2 project="which" />
     </target>
     
     <target name="all"
  
  
  

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


Mime
View raw message