commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject cvs commit: jakarta-commons/logging build.properties.sample build.xml
Date Wed, 07 May 2003 16:02:20 GMT
rdonkin     2003/05/07 09:02:20

  Modified:    logging  build.properties.sample build.xml
  Log:
  Added AvalonLogger which wraps the logger used by the Avalon framework. Also added an optional
dependency on avalon-framework.jar. Added better warnings to build about which loggers are
going to be created.
  
  Revision  Changes    Path
  1.7       +3 -0      jakarta-commons/logging/build.properties.sample
  
  Index: build.properties.sample
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/logging/build.properties.sample,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- build.properties.sample	20 Jan 2002 04:48:27 -0000	1.6
  +++ build.properties.sample	7 May 2003 16:02:20 -0000	1.7
  @@ -4,9 +4,12 @@
   # logkit.jar - Avalon LogKit classes (see http://jakarta.apache.org/avalon)
   logkit.jar=/java/logkit/logkit.jar
   
  +# Avalon framework - used for wrapper for avalon framework logger
  +avalon-framework.jar=../../Avalon-4.1.4/avalon-framework-4.1.4.jar
   
   #
   # if you want to run the test cases, junit needs to be in the classpath.
   # the build.xml uses a default value so you might not need to set this property.
   #
   # junit.jar=../../jakarta-velocity/build/lib/junit-3.7.jar
  +
  
  
  
  1.36      +50 -9     jakarta-commons/logging/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/logging/build.xml,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- build.xml	7 Apr 2003 09:36:10 -0000	1.35
  +++ build.xml	7 May 2003 16:02:20 -0000	1.36
  @@ -30,6 +30,7 @@
     <property name="junit.jar"               value="${junit.home}/junit.jar"/>
     <property name="log4j.jar"               value="${jakarta.home}/jakarta-log4j/dist/lib/log4j.jar"/>
     <property name="logkit.jar"              value="${jakarta.home}/jakarta-avalon-logkit/build/log/logkit"/>
  +  <property name="avalon-framework.jar"    value="../../Avalon-4.1.4/avalon-framework-4.1.4.jar"/>
   
   
   <!-- ========== Component Declarations ==================================== -->
  @@ -81,6 +82,7 @@
       <pathelement location="${junit.jar}"/>
       <pathelement location="${log4j.jar}"/>
       <pathelement location="${logkit.jar}"/>
  +    <pathelement location="${avalon-framework.jar}"/>
     </path>
   
   
  @@ -94,6 +96,7 @@
       <pathelement location="${junit.jar}"/>
       <pathelement location="${log4j.jar}"/>
       <pathelement location="${logkit.jar}"/>
  +    <pathelement location="${avalon-framework.jar}"/>
       <pathelement location="${conf.home}"/>
     </path>
   
  @@ -134,15 +137,15 @@
       <filter  token="name"                  value="${component.name}"/>
       <filter  token="package"               value="${component.package}"/>
       <filter  token="version"               value="${component.version}"/>
  -  </target>
  -
  -
  +  </target>  
  +  
     <target name="prepare" depends="init"
      description="Prepare build directory">
   
       <echo>
  -    ${log4j.jar}
  -    ${logkit.jar}
  +    Log4j: ${log4j.jar}
  +    LogKit: ${logkit.jar}
  +    Avalon-Framework: ${avalon-framework.jar}
       </echo>
   
       <mkdir dir="${build.home}"/>
  @@ -163,12 +166,10 @@
       </copy>
     </target>
   
  -
     <target name="compile" depends="static,compile-only"
             description="Compile shareable components"/>
   
  -  <target name="compile-only" depends="init" >
  -
  +  <target name='discovery' depends='init'>
       <available property="jdk.1.4.present"
                  classname="java.util.logging.Logger"/>
       <available classname="org.apache.log4j.Logger"
  @@ -177,10 +178,48 @@
       <available property="logkit.present"
                  classpathref="compile.classpath"
                  classname="org.apache.log.Logger"/>
  +    <available property="avalon-framework.present"
  +               classpathref="compile.classpath"
  +               classname="org.apache.avalon.framework.logger.Logger"/>
  +  </target>
  +
  +  <target name="log4j-warning" unless='log4j.present' depends='init,discovery'>
  +    <echo>
  +    *** WARNING ***
  +    Log4j not found: Cannot Build Log4jLogger
  +    </echo>
  +  </target>
  +  
  +  <target name="logkit-warning" unless='logkit.present' depends='init,discovery'>
  +    <echo>
  +    *** WARNING ***
  +    LogKit not found: Cannot Build LogKitLogger
  +    </echo>
  +  </target>
  +  
  +  <target name="avalon-framework-warning" unless='avalon-framework.present' depends='init,discovery'>
  +    <echo>
  +    *** WARNING ***
  +    Avalon-Framework not found: Cannot Build AvalonLogger
  +    </echo>
  +  </target>
  +  
  +  <target name="jdk1.4-warning" unless='jdk.1.4.present' depends='init,discovery'>
  +    <echo>
  +    *** WARNING ***
  +    JDK 1.4 not present: Cannot Build Jdk14Logger
  +    </echo>
  +  </target>
  +  
  +  <target name='warning' depends='log4j-warning,logkit-warning,jdk1.4-warning,avalon-framework-warning'/>
  +
  +
  +  <target name="compile-only" depends="init,discovery,warning" >
   
       <echo  message="jdk.1.4.present=${jdk.1.4.present}"/>
       <echo  message="log4j.present=${log4j.present}"/>
       <echo  message="logkit.present=${logkit.present}"/>
  +    <echo  message="avalon-framework.present=${avalon-framework.present}"/>
   
       <javac srcdir="${source.home}"
              destdir="${build.home}/classes"
  @@ -196,6 +235,8 @@
                  unless="log4j.present"/>
         <exclude name="org/apache/commons/logging/impl/LogKitLogger.java"
                  unless="logkit.present"/>
  +      <exclude name="org/apache/commons/logging/impl/AvalonLogger.java"
  +               unless="avalon-framework.present"/>
       </javac>
       <copy  todir="${build.home}/classes" filtering="on">
         <fileset dir="${source.home}" excludes="**/*.java"/>
  
  
  

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


Mime
View raw message