You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by js...@apache.org on 2002/11/06 20:30:48 UTC

cvs commit: jakarta-commons-sandbox/sql project.xml build.xml

jstrachan    2002/11/06 11:30:48

  Modified:    sql      project.xml build.xml
  Log:
  Created a new Ant build file from the latest Maven Ant plugin so that this project now builds and unit test cases run correctly using vanilla Ant as well as in Maven
  
  Revision  Changes    Path
  1.9       +4 -3      jakarta-commons-sandbox/sql/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/sql/project.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- project.xml	4 Nov 2002 12:04:46 -0000	1.8
  +++ project.xml	6 Nov 2002 19:30:48 -0000	1.9
  @@ -161,10 +161,11 @@
       <!-- J A R  R E S O U R C E S -->
       <!-- Resources that are packaged up inside the JAR file -->
       <resources>
  -      <includes>
  -        <include>**/*.properties</include>
  +			<directory>src/java</directory>
  +			<includes>
  +				<include>**/*.properties</include>
   				<include>**/*.betwixt</include>
  -      </includes>
  +			</includes>
       </resources>
     </build>
   </project>
  
  
  
  1.3       +83 -63    jakarta-commons-sandbox/sql/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/sql/build.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- build.xml	19 Sep 2002 06:39:39 -0000	1.2
  +++ build.xml	6 Nov 2002 19:30:48 -0000	1.3
  @@ -6,19 +6,36 @@
     <property name="classesdir" value="target/classes"></property>
     <property name="testclassesdir" value="target/test-classes"></property>
     <property name="testreportdir" value="target/test-reports"></property>
  +  
  +  
  +  
  +  
  +  	
  +		
  +  
  +  
  +  
  +  
  +  	
  +  
  +  
  +  <property name="resourcedir" value="src/java"></property>
  +  <property name="testresourcedir" value="."></property>
  +  
  +  
     <property name="distdir" value="dist"></property>
     <property name="javadocdir" value="target/docs/apidocs"></property>
     <property name="final.name" value="commons-sql-1.0-dev"></property>
     
     <target name="init" description="o Initializes some properties">
  -
  +    <mkdir dir="lib"></mkdir>
       <condition property="noget">
         <equals arg2="only" arg1="${build.sysclasspath}"></equals>
       </condition>
     </target>
  -    
  -  <target name="jar" description="o Create the jar" depends="get-deps">
   
  +  <target name="compile" description="o Compile the code" depends="get-deps">
  +    
       <mkdir dir="${classesdir}"></mkdir>
   
       <javac destdir="${classesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
  @@ -31,25 +48,32 @@
           </fileset>
         </classpath>
       </javac>
  -
  +    
       
    
       
    
       <copy todir="${classesdir}">
         
  +      <fileset dir="${resourcedir}">
         
         
  -      <fileset dir="${basedir}">
  +        <include name="**/*.properties"></include>
         
  -      
  -        <include name="**/*.properties, **/*.betwixt"></include>
  +        <include name="**/*.betwixt"></include>
         
         
         </fileset>
       </copy>
    
       
  +
  +    
  +
  +  </target>
  +    
  +  <target name="jar" description="o Create the jar" depends="compile,test">
  +
       <jar jarfile="target/${final.name}.jar" excludes="**/package.html" basedir="${classesdir}"></jar>
   
     </target>
  @@ -66,54 +90,57 @@
       </copy>
     </target>
    
  -  <target name="test" description="o Run the test cases" depends="compile-tests">
  -    <mkdir dir="${testreportdir}"></mkdir>
  -    <junit dir="./" printSummary="yes" fork="true" haltonerror="true">
  -      <sysproperty key="basedir" value="src/test"></sysproperty>
  -      <formatter type="xml"></formatter>
  -      <formatter usefile="true" type="plain"></formatter>
  -      <classpath>
  -        <fileset dir="lib">
  -          <include name="*.jar"></include>
  -        </fileset>
  -        <pathelement location="target/${final.name}.jar"></pathelement>
  -        <pathelement path="${testclassesdir}"></pathelement>
  -      </classpath>
  -      <batchtest todir="${testreportdir}">
  -        <fileset dir="src/test">
  -              
  -                <include name="**/Test*.java"></include>
  -              
  -              
  -        </fileset>
  -      </batchtest>
  -    </junit>
  +  <target name="test" description="o Run the test cases" if="test.failure" depends="internal-test">
  +    <fail message="There were test failures."></fail>
     </target>
  -
  -  <target name="compile-tests" depends="jar">
  -    <mkdir dir="${testclassesdir}"></mkdir>
  -    <javac destdir="${testclassesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
  -      <src>
  -        <pathelement location="src/test"></pathelement>
  -      </src>
  -      <classpath>
  -        <fileset dir="lib">
  -          <include name="*.jar"></include>
  -        </fileset>
  -        <pathelement location="target/${final.name}.jar"></pathelement>
  -      </classpath>
  -    </javac>
  -
  +  <target name="internal-test" depends="compile-tests">
       
  -   
  +      <mkdir dir="${testreportdir}"></mkdir>
  +      <junit dir="./" failureproperty="test.failure" printSummary="yes" fork="true" haltonerror="true">
  +        
  +        <sysproperty key="basedir" value="C:\workspace\sql"></sysproperty>
  +        <formatter type="xml"></formatter>
  +        <formatter usefile="true" type="plain"></formatter>
  +        <classpath>
  +          <fileset dir="lib">
  +            <include name="*.jar"></include>
  +          </fileset>
  +          <pathelement path="${testclassesdir}"></pathelement>
  +          <pathelement path="${classesdir}"></pathelement>
  +        </classpath>
  +        <batchtest todir="${testreportdir}">
  +          <fileset dir="src/test">
  +            
  +              <include name="**/Test*.java"></include>
  +            
  +            
  +            
  +            
  +            
  +          </fileset>
  +        </batchtest>
  +      </junit>
       
  - 
  -    <copy todir="${testclassesdir}">
  -      <fileset dir="src/test">
  +  </target>
  +
  +  <target name="compile-tests" depends="compile">
  +    
  +      <mkdir dir="${testclassesdir}"></mkdir>
  +      <javac destdir="${testclassesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
  +        <src>
  +          <pathelement location="src/test"></pathelement>
  +        </src>
  +        <classpath>
  +          <fileset dir="lib">
  +            <include name="*.jar"></include>
  +          </fileset>
  +          <pathelement path="${classesdir}"></pathelement>
  +        </classpath>
  +      </javac>
  +
         
  +   
         
  -      </fileset>
  -    </copy>
       
     </target>
   
  @@ -144,29 +171,22 @@
   
     <target name="get-deps" unless="noget" depends="init">
     
  -    <mkdir dir="lib"></mkdir>
       
       <get dest="lib/commons-logging-1.0.1.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/commons-logging/jars/commons-logging-1.0.1.jar"></get>
       <get dest="lib/commons-beanutils-SNAPSHOT.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/commons-beanutils/jars/commons-beanutils-SNAPSHOT.jar"></get>
       <get dest="lib/commons-betwixt-SNAPSHOT.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/commons-betwixt/jars/commons-betwixt-SNAPSHOT.jar"></get>
       <get dest="lib/jdbc-2.0.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/jdbc/jars/jdbc-2.0.jar"></get>
  +    <get dest="lib/ant-1.5.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/ant/jars/ant-1.5.jar"></get>
       <get dest="lib/commons-collections-2.1-dev.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/commons-collections/jars/commons-collections-2.1-dev.jar"></get>
       <get dest="lib/commons-digester-1.2.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/commons-digester/jars/commons-digester-1.2.jar"></get>
  -    <get dest="lib/commons-lang-SNAPSHOT.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/commons-lang/jars/commons-lang-SNAPSHOT.jar"></get>
  -    <get dest="lib/ant-1.4.1.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/ant/jars/ant-1.4.1.jar"></get>
  -    <get dest="lib/ant-optional-1.4.1.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/ant+optional/jars/ant-optional-1.4.1.jar"></get>
  -    <get dest="lib/junit-3.7.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/junit/jars/junit-3.7.jar"></get>
       <get dest="lib/xml-apis-2.0.2.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/xml-apis/jars/xml-apis-2.0.2.jar"></get>
       <get dest="lib/xerces-2.0.0.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/xerces/jars/xerces-2.0.0.jar"></get>
       <get dest="lib/axion-1.0-dev.20020830.060007.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/axion/jars/axion-1.0-dev.20020830.060007.jar"></get>
  -    <get dest="lib/hsqldb-1.7.0.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/hsqldb/jars/hsqldb-1.7.0.jar"></get>
  -    <get dest="lib/mckoi-0.93.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/mckoi/jars/mckoi-0.93.jar"></get>
  -    <get dest="lib/velocity-SNAPSHOT.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/velocity/jars/velocity-SNAPSHOT.jar"></get>
  -    <get dest="lib/village-1.5.3.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/village/jars/village-1.5.3.jar"></get>
  -    <get dest="lib/commons-jelly-SNAPSHOT.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/commons-jelly/jars/commons-jelly-SNAPSHOT.jar"></get>
  -    <get dest="lib/commons-jexl-SNAPSHOT.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/commons-jexl/jars/commons-jexl-SNAPSHOT.jar"></get>
  -    <get dest="lib/dom4j-1.4-dev-6.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/dom4j/jars/dom4j-1.4-dev-6.jar"></get>
  -  
  +    <get dest="lib/hsqldb-1.7.1.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/hsqldb/jars/hsqldb-1.7.1.jar"></get>
  +    
  +    <get dest="lib/junit-3.8.1.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/junit/jars/junit-3.8.1.jar"></get>
  +    <get dest="lib/ant-1.5.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/ant/jars/ant-1.5.jar"></get>
  +    <get dest="lib/ant-optional-1.5.jar" usetimestamp="true" ignoreerrors="true" src="http://www.ibiblio.org/maven/ant/jars/ant-optional-1.5.jar"></get>
     </target>
   
     
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>