commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From je...@apache.org
Subject cvs commit: jakarta-commons/latka build.xml
Date Mon, 07 Jan 2002 12:32:10 GMT
jefft       02/01/07 04:32:10

  Modified:    latka    build.xml
  Log:
  Make the xpath validator optional. If the jaxen.jar property isn't defined, a
  warning will be issued, and the XPath validator excluded.
  
  Revision  Changes    Path
  1.14      +51 -12    jakarta-commons/latka/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/latka/build.xml,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- build.xml	7 Jan 2002 11:26:24 -0000	1.13
  +++ build.xml	7 Jan 2002 12:32:10 -0000	1.14
  @@ -1,4 +1,4 @@
  -<!-- $Id: build.xml,v 1.13 2002/01/07 11:26:24 jefft Exp $ -->
  +<!-- $Id: build.xml,v 1.14 2002/01/07 12:32:10 jefft Exp $ -->
   <project name="commons-latka" default="build-java" basedir=".">
   
      <!-- patternset describing files to be copied from the doc directory -->
  @@ -69,7 +69,28 @@
         <available property="available-src-test" file="${source.src.test}"/> <!--
does this module have test src? -->      
   
         <!-- now combine the classpaths -->
  -      <property name="classpath" value="${cp}:${regexp.jar}:${jaxp.jar}:${jdom.jar}:${jaxen.jar}:${saxpath.jar}:${log4j.jar}:${httpclient.jar}:${sax2.jar}:${jnet.jar}:${jsse.jar}:${jcert.jar}:${junit.jar}:${source.props}"/>
  +      <path id="classpath">
  +          <pathelement path="${cp}"/>
  +          <pathelement location="${regexp.jar}"/>
  +          <pathelement location="${jaxp.jar}"/>
  +          <pathelement location="${jdom.jar}"/>
  +          <pathelement location="${jaxen.jar}"/>
  +          <pathelement location="${saxpath.jar}"/>
  +          <pathelement location="${log4j.jar}"/>
  +          <pathelement location="${httpclient.jar}"/>
  +          <pathelement location="${sax2.jar}"/>
  +          <pathelement location="${jnet.jar}"/>
  +          <pathelement location="${jsse.jar}"/>
  +          <pathelement location="${jcert.jar}"/>
  +          <pathelement location="${junit.jar}"/>
  +          <pathelement location="${source.props}"/>
  +      </path>
  +
  +      <available property="jaxen.present" 
  +          classname="org.jaxen.jdom.XPath">
  +          <!-- We need a jaxen with JDOM support -->
  +          <classpath refid="classpath"/>
  +      </available>
   
      </target>
   
  @@ -145,7 +166,7 @@
         <mkdir dir="${dest.doc.api}"/>
         <javadoc packagenames="org.*"
                  sourcepath="${workdir}"
  -               classpath="${classpath}"
  +               classpathref="classpath"
                  destdir="${dest.doc.api}"
                  windowtitle="${Name-Long}"
                  doctitle="${Name-Long}"
  @@ -169,24 +190,42 @@
   
      <target name="build" depends="init,build-java" description="compiles source files"/>
   
  -   <target name="build-java" depends="init" if="available-src-java">
  +   <!-- Parametrize these ala Cocoon if we get any more validators with jar
  +   deps -->
  +   <target name="jaxen-warn" unless="jaxen.present">
  +       <echo>
  +           ***************************************************
  +                  WARNING: XPath validator not built        
  +
  +           Property: $${jaxen.jar}
  +           Current value: ${jaxen.jar}
  +
  +           If you wish to build this validator, please fix the 
  +           above property in your build.properties file
  +           ***************************************************
  +       </echo>
  +   </target>
  +
  +   <target name="build-java" depends="init, jaxen-warn" if="available-src-java">
         <mkdir dir="${dest.classes}"/>
         <javac destdir="${dest.classes}"
                srcdir="${source.src.java}"
  -             classpath="${classpath}"
  +             classpathref="classpath"
                debug="false"
                deprecation="true"
  -             optimize="true"/>
  -      <copy todir="${dest.classes}">
  -         <fileset dir="${resource}"/>
  -      </copy>
  +             optimize="true">
  +             <exclude name="**/XPath*.java" unless="jaxen.present"/>
  +     </javac>
  +     <copy todir="${dest.classes}">
  +        <fileset dir="${resource}"/>
  +     </copy>
      </target>
   
      <target name="build-test" depends="init,build-java" if="available-src-test">
         <mkdir dir="${dest.classes}"/>
         <javac destdir="${dest.classes}"
                srcdir="${source.src.test}"
  -             classpath="${classpath}"
  +             classpathref="classpath"
                debug="false"
                deprecation="true"
                optimize="true"/>
  @@ -201,7 +240,7 @@
           <test name="${test.entry}"/>
           <classpath>
               <pathelement location="${dest.classes}" />
  -            <pathelement path="${classpath}" />
  +            <path refid="classpath"/>
               <pathelement path="${java.class.path}" />
           </classpath>
         </junit>
  @@ -211,7 +250,7 @@
           <arg value="${test.entry}"/> 
           <classpath>
             <pathelement location="${dest.classes}" /> 
  -          <pathelement path="${classpath}" /> 
  +          <path refid="classpath"/>
             <pathelement path="${java.class.path}" /> 
           </classpath>
         </java>
  
  
  

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


Mime
View raw message