ceki        2004/05/21 04:31:48

  Modified:    .        build.properties.sample build.xml
  Log:
  Made JNDI API are required dependency for the build.core target. JNDI API
  is part of JDK 1.3 and later so should not be a serious hurdle.
  
  Revision  Changes    Path
  1.17      +22 -13    logging-log4j/build.properties.sample
  
  Index: build.properties.sample
  ===================================================================
  RCS file: /home/cvs/logging-log4j/build.properties.sample,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- build.properties.sample   21 May 2004 09:24:51 -0000      1.16
  +++ build.properties.sample   21 May 2004 11:31:47 -0000      1.17
  @@ -43,23 +43,32 @@
   # This is required if you wish to use Chainsaw v2
   #regexp.oro.jar=../oro/jakarta-oro-2.0.6.jar
   
  -
  -# ==================================================================
  -# Packages which have been incorporated in JDK 1.4 but optional in
  -# JDK 1.3 and 1.2.
  -# ==================================================================
  -
  -
  -# JDBC Standdard Extension Binary 2.0 (building with JDK 1.2 and 1.3)
  -# ###################################
  -
  +# DBAppeder/DBReceiver OPTIONAL: 
  +#
   # The org.apache.log4j.db package makes use of the
  -# javax.sql.DataSource interface which is included in the JDBC
  -# standard extension. It ships with JDK 1.4 but not 1.3 or 1.2
  +# javax.sql.DataSource interface which is included part of the JDBC
  +# standard extensions. These extensions ship with JDK 1.4 and later
  +# but not JDK 1.3 or 1.2.
   #
   # Download it from
   #
   #  http://java.sun.com/products/jdbc/download.html#spec
   #
  -jdbc-stdext.jar=/java/lib/jdbc2_0-stdext.jar
  +#jdbc-stdext.jar=/java/lib/jdbc2_0-stdext.jar
  +
  +# ---------------------------------------------------
  +# JNDI API REQUIRED when building log4j with JDK 1.2)
  +# ---------------------------------------------------
  +#
  +# The JNDI API is required to build ContextJNDISelector, which has
  +# become a core log4j class. The JNDI API ships with JDK 1.3 and later,
  +# you do not need to load it separately. For JDK 1.2, you can get the
  +# JNDI API from
  +#
  +#     http://java.sun.com/products/jndi/downloads/index.html
  +
  +#jndi.jar=/java/lib/jndi.jar
  +
  +
  +
   
  
  
  
  1.101     +22 -10    logging-log4j/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/logging-log4j/build.xml,v
  retrieving revision 1.100
  retrieving revision 1.101
  diff -u -r1.100 -r1.101
  --- build.xml 21 May 2004 09:24:51 -0000      1.100
  +++ build.xml 21 May 2004 11:31:47 -0000      1.101
  @@ -87,6 +87,7 @@
       <pathelement location="${avalon-framework.jar}"/>
       <pathelement location="${servlet-api.jar}"/>
       <pathelement location="${jdbc-stdext.jar}"/>
  +    <pathelement location="${jndi.jar}"/>
     </path>
   
     <!-- Construct classpath for building the html pages-->
  @@ -126,6 +127,24 @@
       <echo message="JAXP present."/>
     </target>
   
  +  <target name="jndiCheck">
  +    <available classname="javax.naming.Context" property="jndi-present">
  +      <classpath refid="compile.classpath"/>
  +    </available>
  +    <fail unless="jndi-present">
  +
  +The JNDI API is required to build ContextJNDISelector, which has
  +become a core log4j class. The JNDI API ships with JDK 1.3 and
  +later. For JDK 1.2, you can get the JNDI API from
  +
  +   http://java.sun.com/products/jndi/downloads/index.html
  +
  +</fail>
  +  </target>
  +  <target name="jndi" depends="jndiCheck" if="jndi-present">
  +    <echo message="JNDI is present."/>
  +  </target>
  +
     <target name="avalonFrameworkCheck">
       <available classname="org.apache.avalon.framework.logger.Logger"
           property="avalonFramework-present">
  @@ -136,7 +155,7 @@
       <echo message="Avalon Framework is present."/>
     </target>
   
  -  <target name="jmxCheck">
  +  <target name="jmxCheck" depends="jndiCheck" if="jndi-present">
       <available classname="javax.management.MBeanInfo" property="jmx-present">
        <classpath refid="compile.classpath"/>
       </available>
  @@ -145,7 +164,7 @@
       <echo message="JMX is present."/>
     </target>
   
  -  <target name="jmsCheck">
  +  <target name="jmsCheck" depends="jndiCheck" if="jndi-present">
       <available classname="javax.jms.Message" property="jms-present">
        <classpath refid="compile.classpath"/>
       </available>
  @@ -154,13 +173,6 @@
       <echo message="JMS is present."/>
     </target>
   
  -  <target name="jndiCheck">
  -    <available classname="javax.naming.Context" property="jndi-present"/>
  -  </target>
  -  <target name="jndi" depends="jndiCheck" if="jndi-present">
  -    <echo message="JNDI is present."/>
  -  </target>
  -
     <target name="javamailCheck">
       <available classname="javax.mail.Message" property="javamail-present">
         <classpath refid="compile.classpath"/>
  @@ -204,7 +216,7 @@
                      build.avalonFramework, build.servletAPI, build.db, 
                      build.chainsaw"/>
   
  -  <target name="build.core" depends="init">
  +  <target name="build.core" depends="init, jndiCheck" if="jndi-present" >
       <mkdir dir="${javac.dest}" />
       <javac srcdir="${java.source.dir}"
        destdir="${javac.dest}"
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to