git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@153296 13f79535-47bb-0310-9956-ffa450edef68
264 lines
9.3 KiB
XML
264 lines
9.3 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
|
|
Copyright 2004 The Apache Software Foundation.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
|
|
-->
|
|
|
|
<project name="Logging" default="compile" basedir=".">
|
|
|
|
<!--
|
|
"Logging" component of the Jakarta Commons Subproject
|
|
$Id$
|
|
-->
|
|
|
|
|
|
<!-- ========== Initialize Properties ===================================== -->
|
|
|
|
<property file="build.properties"/> <!-- Distribution local -->
|
|
<property file="../build.properties"/> <!-- Component local -->
|
|
<property file="../../build.properties"/> <!-- Commons local -->
|
|
<property file="${user.home}/build.properties"/> <!-- User local -->
|
|
|
|
<!-- ========== External Dependencies ===================================== -->
|
|
|
|
<!-- The directories corresponding to your necessary dependencies -->
|
|
<property name="junit.home" value="/usr/local/junit3.5"/>
|
|
<property name="jakarta.home" value="../../.."/>
|
|
|
|
<!-- ========== Derived Values ============================================ -->
|
|
|
|
|
|
<!-- The locations of necessary jar files -->
|
|
<property name="junit.jar" value="${junit.home}/junit.jar"/>
|
|
<property name="commons-logging-core.jar" value="../dist/commons-logging.jar"/>
|
|
|
|
<!-- ========== Component Declarations ==================================== -->
|
|
|
|
|
|
<!-- The name of this component -->
|
|
<property name="component.name" value="logging-optional"/>
|
|
|
|
<!-- The primary package name of this component -->
|
|
<property name="component.package" value="org.apache.commons.logging"/>
|
|
|
|
<!-- The title of this component -->
|
|
<property name="component.title" value="Logging Wrapper Library (Optional Implementations)"/>
|
|
|
|
<!-- The current version number of this component -->
|
|
<property name="component.version" value="1.0.6-dev"/>
|
|
|
|
<!-- The base directory for compilation targets -->
|
|
<property name="build.home" value="${basedir}/target"/>
|
|
|
|
<!-- The base directory for component configuration files -->
|
|
<property name="conf.home" value="src/conf"/>
|
|
|
|
<!-- The base directory for distribution targets -->
|
|
<property name="dist.home" value="dist"/>
|
|
|
|
<!-- The base directory for component sources -->
|
|
<property name="source.home" value="src/java"/>
|
|
|
|
<!-- The base directory for unit test sources -->
|
|
<property name="test.home" value="src/test"/>
|
|
|
|
|
|
<!-- ========== Compiler Defaults ========================================= -->
|
|
|
|
|
|
<!-- Should Java compilations set the 'debug' compiler option? -->
|
|
<property name="compile.debug" value="true"/>
|
|
|
|
<!-- Should Java compilations set the 'deprecation' compiler option? -->
|
|
<property name="compile.deprecation" value="false"/>
|
|
|
|
<!-- Should Java compilations set the 'optimize' compiler option? -->
|
|
<property name="compile.optimize" value="false"/>
|
|
|
|
<!-- Construct compile classpath -->
|
|
<path id="compile.classpath">
|
|
<pathelement location="${build.home}/classes"/>
|
|
<pathelement location="${junit.jar}"/>
|
|
<pathelement location="${commons-logging-core.jar}"/>
|
|
</path>
|
|
|
|
|
|
<!-- ========== Test Execution Defaults =================================== -->
|
|
|
|
|
|
<!-- Construct unit test classpath (generic tests) -->
|
|
<path id="test.classpath">
|
|
<pathelement location="${build.home}/classes"/>
|
|
<pathelement location="${build.home}/tests"/>
|
|
<pathelement location="${junit.jar}"/>
|
|
<pathelement location="${conf.home}"/>
|
|
<pathelement location="${commons-logging-core.jar}"/>
|
|
</path>
|
|
|
|
<!-- Should all tests fail if one does? -->
|
|
<property name="test.failonerror" value="true"/>
|
|
|
|
<!-- The test runner to execute -->
|
|
<property name="test.runner" value="junit.textui.TestRunner"/>
|
|
<property name="test.entry" value="org.apache.commons.logging.TestAll"/>
|
|
<property name="test.wrapper" value="org.apache.commons.logging.Wrapper"/>
|
|
|
|
<!-- ========== Executable Targets ======================================== -->
|
|
|
|
|
|
<target name="init"
|
|
description="Initialize and evaluate conditionals">
|
|
<echo message="-------- ${component.title} ${component.version} --------"/>
|
|
<filter token="name" value="${component.name}"/>
|
|
<filter token="package" value="${component.package}"/>
|
|
<filter token="version" value="${component.version}"/>
|
|
</target>
|
|
|
|
<target name="prepare" depends="init"
|
|
description="Prepare build directory">
|
|
|
|
<echo>
|
|
Preparing build directory...
|
|
</echo>
|
|
<mkdir dir="${build.home}"/>
|
|
<mkdir dir="${build.home}/conf"/>
|
|
<mkdir dir="${build.home}/classes"/>
|
|
<mkdir dir="${build.home}/docs"/>
|
|
<mkdir dir="${build.home}/docs/api"/>
|
|
<mkdir dir="${build.home}/tests"/>
|
|
</target>
|
|
|
|
<target name="static" depends="prepare"
|
|
description="Copy static files to build directory">
|
|
<tstamp/>
|
|
<copy todir="${build.home}/conf" filtering="on">
|
|
<fileset dir="${conf.home}" includes="*.MF"/>
|
|
<fileset dir="${conf.home}" includes="*.properties"/>
|
|
</copy>
|
|
</target>
|
|
|
|
<target name="compile" depends="static" >
|
|
|
|
<javac srcdir="${source.home}"
|
|
destdir="${build.home}/classes"
|
|
debug="${compile.debug}"
|
|
deprecation="${compile.deprecation}"
|
|
optimize="${compile.optimize}">
|
|
<classpath refid="compile.classpath"/>
|
|
</javac>
|
|
|
|
<copy todir="${build.home}/classes" filtering="on">
|
|
<fileset dir="${source.home}" excludes="**/*.java"/>
|
|
</copy>
|
|
<mkdir dir="${build.home}/classes/META-INF"/>
|
|
<copy file="../LICENSE.txt"
|
|
todir="${build.home}/classes/META-INF"/>
|
|
<copy file="../NOTICE.txt"
|
|
todir="${build.home}/classes/META-INF"/>
|
|
|
|
<jar jarfile="${build.home}/commons-${component.name}.jar"
|
|
basedir="${build.home}/classes"
|
|
manifest="${build.home}/conf/MANIFEST.MF">
|
|
<include name="org/apache/commons/logging/**" />
|
|
<include name="META-INF/LICENSE.txt"/>
|
|
<include name="META-INF/NOTICE.txt"/>
|
|
</jar>
|
|
</target>
|
|
|
|
|
|
<target name="compile.tests" depends="compile"
|
|
description="Compile unit test cases">
|
|
<javac srcdir="${test.home}"
|
|
destdir="${build.home}/tests"
|
|
debug="${compile.debug}"
|
|
deprecation="${compile.deprecation}"
|
|
optimize="${compile.optimize}">
|
|
<classpath refid="test.classpath"/>
|
|
</javac>
|
|
|
|
<copy todir="${build.home}/tests" filtering="on">
|
|
<fileset dir="${test.home}" excludes="**/*.java"/>
|
|
</copy>
|
|
|
|
<jar jarfile="${build.home}/commons-${component.name}-tests.jar"
|
|
basedir="${build.home}/tests"
|
|
manifest="${build.home}/conf/MANIFEST.MF">
|
|
</jar>
|
|
</target>
|
|
|
|
|
|
<target name="clean"
|
|
description="Clean build and distribution directories">
|
|
<delete dir="${build.home}"/>
|
|
<delete dir="${dist.home}"/>
|
|
</target>
|
|
|
|
|
|
<target name="all" depends="clean,compile"
|
|
description="Clean and compile all components"/>
|
|
|
|
|
|
<target name="javadoc" depends="compile"
|
|
description="Create component Javadoc documentation">
|
|
<mkdir dir="${dist.home}"/>
|
|
<mkdir dir="${dist.home}/docs"/>
|
|
<mkdir dir="${dist.home}/docs/api"/>
|
|
<javadoc sourcepath="${source.home}"
|
|
destdir="${dist.home}/docs/api"
|
|
overview="${source.home}/overview.html"
|
|
packagenames="org.apache.commons.*"
|
|
author="true"
|
|
private="true"
|
|
version="true"
|
|
doctitle="<h1>${component.title} (Version ${component.version})</h1>"
|
|
windowtitle="${component.title} (Version ${component.version})"
|
|
bottom='Copyright 2002-2004 The Apache Software Foundation.<!--
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.-->'>
|
|
<classpath refid="test.classpath"/>
|
|
</javadoc>
|
|
</target>
|
|
|
|
<target name='dist' depends='compile, javadoc'>
|
|
<copy file='${build.home}/commons-${component.name}.jar' todir='${dist.home}'/>
|
|
</target>
|
|
|
|
<!-- ========== Unit Test Targets ========================================= -->
|
|
|
|
|
|
<target name="test"
|
|
description="Run all unit test cases" depends='compile.tests'>
|
|
<java classname="${test.runner}" fork="yes"
|
|
failonerror="${test.failonerror}">
|
|
<arg value="${test.entry}"/>
|
|
<classpath refid="test.classpath"/>
|
|
</java>
|
|
</target>
|
|
|
|
</project>
|
|
|
|
|