ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-ant/proposal/embed build.xml test.xml
Date Fri, 11 Oct 2002 18:20:25 GMT
costin      2002/10/11 11:20:25

  Modified:    proposal/embed build.xml test.xml
  Log:
  Update the build and test files
  
  Revision  Changes    Path
  1.4       +48 -2     jakarta-ant/proposal/embed/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/embed/build.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- build.xml	23 Sep 2002 22:46:48 -0000	1.3
  +++ build.xml	11 Oct 2002 18:20:25 -0000	1.4
  @@ -19,14 +19,44 @@
     <property name="commons-discovery.jar" location="${commons.src}/discovery/dist/commons-discovery.jar"
/>
   
       
  +  <target name="build" depends="main" />
     <target name="main">
       <mkdir dir="build/classes" />
       <javac srcdir="src/java"  
              debug="${debug}"
              destdir="${embed.build}/classes" >
         <include name="**" />
  +      <exclude name="org/apache/tools/ant/taskdefs/optional/**" />
  +    </javac>
  +
  +    <copy toDir="${embed.build}/classes">
  +      <fileset dir="src/java" includes="META-INF/**" />
  +    </copy>
  +
  +    <jar file="${embed.build}/ant-sax2.jar" basedir="${embed.build}/classes"
  +         manifest="src/java/META-INF/MANIFEST" >
  +      <include name="**" />
  +    </jar>
  +        
  +    <echo message="${embed.build}/ant-sax2.jar toDir=${ant.home}/lib"/>
  +
  +    <copy file="${embed.build}/ant-sax2.jar" toDir="${ant.home}/lib"/>
  +    <copy file="${commons-logging.jar}" toDir="${ant.home}/lib"/>
  +    <copy file="${commons-discovery.jar}" toDir="${ant.home}/lib"/>
  +
  +    <copy file="${commons-logging.jar}" toDir="${embed.build}"/>
  +    <copy file="${commons-discovery.jar}" toDir="${embed.build}"/>
  +  </target>
  +
  +  <target name="embed-optional">
  +    <mkdir dir="build/classes" />
  +    <javac srcdir="src/java"  
  +           debug="${debug}"
  +           destdir="${embed.build}/classes" >
  +      <include name="org/apache/tools/ant/taskdefs/optional/**" />
         <classpath>
           <!-- all this will move to their package -->
  +        <pathelement location="build/classes" />
           <pathelement location="${jxpath.jar}" />
           <pathelement location="${velocity.jar}" />
           <pathelement location="${jexl.jar}" />
  @@ -38,11 +68,27 @@
         <fileset dir="src/java" includes="META-INF/**" />
       </copy>
   
  -    <jar file="${embed.build}/ant-sax2.jar" basedir="${embed.build}/classes" >
  -      <include name="**" />
  +    <jar file="${embed.build}/optional-dynprop.jar" basedir="${embed.build}/classes"
  +         manifest="src/java/META-INF/MANIFEST" >
  +      <include name="org/apache/tools/ant/taskdefs/optional/**" />
       </jar>
           
  +    <echo message="${embed.build}/ant-sax2.jar toDir=${ant.home}/lib"/>
  +
       <copy file="${embed.build}/ant-sax2.jar" toDir="${ant.home}/lib"/>
  +    <copy file="${commons-logging.jar}" toDir="${ant.home}/lib"/>
  +    <copy file="${commons-discovery.jar}" toDir="${ant.home}/lib"/>
  +
  +    <copy file="${commons-logging.jar}" toDir="${embed.build}"/>
  +    <copy file="${commons-discovery.jar}" toDir="${embed.build}"/>
     </target>
   
  +  <target name="gump" description="Patch gump bootstrap ant" depends="main" >
  +    <!-- What we'll do - in order to get around gump classpath use - is
  +         to recreate ant.jar ( using build/classes ) to include our code -->
  +    <unjar jar="${ant.src}/bootstrap/lib/ant.jar" dest="${embed.build}/classes" />
  +    <delete file="${ant.src}/bootstrap/lib/ant.jar" />
  +    <jar file="${ant.src}/bootstrap/lib/ant.jar" basedir="${embed.build}/classes"
  +         manifest="${embed.build}/classes/META-INF/MANIFEST" includes="**" />
  +  </target>
   </project>
  
  
  
  1.5       +44 -8     jakarta-ant/proposal/embed/test.xml
  
  Index: test.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/embed/test.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- test.xml	30 Aug 2002 23:08:47 -0000	1.4
  +++ test.xml	11 Oct 2002 18:20:25 -0000	1.5
  @@ -2,10 +2,12 @@
     <property name="ant.src" location="../.."/>
           
     <import file="build.xml"/>
  -
  -  <target name="main">
  +  
  +  <echo>Base.path from build.xml ( in top level ): ${base.path}</echo>
  +  
  +  <target name="init">
        <property name="junit.jar" location="${base.path}/junit3.7/junit.jar"/>
  -     <echo>${junit.jar} ${velocity.jar}</echo>
  +     <echo>Base.path from build.xml ( in init ) : ${base.path}</echo>
   
       <path id="myJars" >
         <pathelement path="${junit.jar}" />
  @@ -16,14 +18,39 @@
         <pathelement path="${commons-discovery.jar}" />
         <pathelement path="${commons-logging.jar}" />
         <pathelement path="${ant.home}/lib/ant-sax2.jar" />
  +      <pathelement location="/usr/share/java/xalan-j_2_3_1/bin/xercesImpl.jar"/>
  +      <pathelement location="${ant.home}/lib/xercesImpl.jar"/>
  +      <pathelement location="${ant.home}/lib/xml-apis.jar"/>
  +      <pathelement location="${ant.home}/lib/ant.jar"/>
       </path>
   
       <systemPath pathRef="myJars"/>
  +  
  +  </target>
  +
  +  <target name="discovery" depends="init">
  +    <echo message="${commons-discovery.jar}"/>
  +
  +    <systemPath pathRef="myJars"/>
  +
  +    <taskdef classname="org.apache.tools.ant.taskdefs.ServiceDiscoveryTask"
  +             name="discovery" />
  +    <taskdef classname="org.apache.tools.ant.taskdefs.optional.JXPath"
  +             name="jxpath" />
   
  +    <jxpath/>
  +    <discovery debug="1" id="myDiscovery"
  +               serviceName="META-INF/services/javax.xml.parsers.SAXParserFactory" />
  +    <echo message="Found ${jxpath:/references[@name='myDiscovery']}" />
  +
  +  </target>
  +
  +  <target name="systemPathTest" depends="init">
       <junit id="replacedJunit" />
  -  
  -    <echo message="toString sample: ${toString:replacedJunit}" />
  - 
  +    <echo message="Found JUNIT: ${toString:replacedJunit}" />
  +  </target>
  +
  +  <target name="dynamicProperties" depends="init">
       <!-- This is Taksdef2.java - it'll use the systemPath as parent loader
         -->
       <taskdef classname="org.apache.tools.ant.taskdefs.optional.JXPath"
  @@ -39,8 +66,15 @@
       <jxpath/>
       <velocityProperties/>
       <jexlProperties/>
  +    
  +    <echo id="foo" message="Starting dynamic props tests" />
  +
  +    <echo message="Value: ${vm:$ant.references.jxpathTask.foo}" />
  +    <jxpathSet path="/references[@name='jxpathTask']/foo" value="Test"/>
  +    <echo message="Value: ${vm:$ant.references.jxpathTask.foo}" />
   
  -    <echo message="vel /references/myJars: ${vm:$ant.references.myJars}" />
  +    <echo message="${jexl:ant.references.jxpathTask.foo=bar}" />
  +    <echo message="Value: ${vm:$ant.references.jxpathTask.foo}" />
   
       <echo message="jexl /references/myJars: ${jexl:ant.references.myJars}" />
   
  @@ -57,7 +91,9 @@
   
       <echo message="XMLDOM: ${jxpath:/references/test.xml/root/project/@name}" />
   
  -    
  +  </target>
  +
  +  <target name="main" depends="init,dynamicProperties,systemPathTest,test-import">
     </target>
   
   
  
  
  

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


Mime
View raw message