.simple-log-rollover.2.0.1.source-code.build.xml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of simple-log-rollover Show documentation
Show all versions of simple-log-rollover Show documentation
Simple Log Components for Log Rolling
The newest version!
<?xml version="1.0" encoding="iso-8859-1"?> <!-- $Id: build.xml,v 1.15 2006/07/17 10:26:18 grlea Exp $ Copyright (c) 2004-2006 Graham Lea. All rights reserved. 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="simple-log" default="MakeRelease"> <description> Simple Log is a logging anti-framework. </description> <property file="ant.properties"/> <property name="applicationRootDir" value="org/grlea/log"/> <!-- Directories --> <property name="sourceDir" value="${basedir}/src"/> <property name="etcDir" value="${basedir}/etc"/> <property name="libDir" value="${basedir}/lib"/> <property name="javadocPackages" value="org.grlea.*"/> <property name="slf4j-javadoc" value="http://www.slf4j.org/api/"/> <property name="commons-logging-javadoc" value="http://jakarta.apache.org/commons/logging/apidocs/"/> <!-- Classpath --> <path id="classpath"> </path> <!-- Outputs --> <property name="tempDir" value="${basedir}/temp"/> <property name="releaseDir" value="${basedir}/release/${product.version}"/> <property name="sourceZip" value="${releaseDir}/${ant.project.name}-src.zip"/> <property name="docDir" value="${releaseDir}/doc"/> <property name="javadocDir" value="${docDir}/api"/> <property name="releaseName" value="${ant.project.name}-${product.version}"/> <property name="releaseZipName" value="${releaseName}.zip"/> <property name="releaseZip" value="${releaseDir}/${releaseZipName}"/> <property name="classesDestination" value="${tempDir}/classes"/> <property name="codeJar" value="${releaseDir}/${ant.project.name}.jar"/> <property name="rollover-codeJar" value="${releaseDir}/${ant.project.name}-rollover.jar"/> <path id="rollover-classpath"> <path path="${classesDestination}"/> </path> <property name="commonsAdapter-sourceDir" value="adapters/commons-logging/src"/> <property name="commonsAdapter-classesDestination" value="${tempDir}/adapters/commons/classes"/> <property name="commonsAdapter-codeJar" value="${releaseDir}/adapters/${ant.project.name}-commons-logging.jar"/> <path id="commonsAdapter-classpath"> <path path="${classesDestination}"/> <fileset dir="${libDir}" includes="commons-logging/commons-logging-api.jar" /> </path> <property name="slf4jImplementation-sourceDir" value="adapters/slf4j/src"/> <property name="slf4jImplementation-classesDestination" value="${tempDir}/adapters/slf4j/classes"/> <property name="slf4jImplementation-codeJar" value="${releaseDir}/adapters/${ant.project.name}-slf4j.jar"/> <path id="slf4jImplementation-classpath"> <path path="${classesDestination}"/> </path> <!-- Targets --> <target name="Init"> <tstamp/> <mkdir dir="${tempDir}"/> <mkdir dir="${releaseDir}"/> <mkdir dir="${docDir}"/> <mkdir dir="${javadocDir}"/> <mkdir dir="${classesDestination}"/> <mkdir dir="${commonsAdapter-classesDestination}"/> <mkdir dir="${slf4jImplementation-classesDestination}"/> </target> <target name="DoRelease" depends="DoRelease-Part1,ZipRelease"> <copy file="${releaseZip}" todir="www/release"/> </target> <target name="DoRelease-Part1" depends="MakeRelease"> <copy todir="www/release"> <fileset dir="${releaseDir}"> <include name="simple-log.jar"/> <include name="simple-log-rollover.jar"/> <include name="simplelog.properties"/> <include name="simplelog-config.properties"/> <include name="simplelog-PLAIN.properties"/> <include name="simplelog-rollover.properties"/> <include name="ChangeLog.txt"/> <include name="LICENSE.txt"/> <include name="README.txt"/> <include name="adapters/*"/> </fileset> </copy> </target> <target name="ZipRelease" depends="MakeRelease"> <zip zipfile="${releaseZip}" > <zipfileset dir="${releaseDir}" includes="**/*" excludes="${releaseZipName}" prefix="${releaseName}"/> </zip> <delete includeEmptyDirs="true"> <fileset dir="${releaseDir}" includes="**/*" excludes="${releaseZipName}"/> </delete> </target> <target name="MakeRelease" depends="Clean, CopyResources, BuildJars, CompileJavadoc, Cleanup"/> <target name="Clean"> <delete dir="${classesDestination}"/> <delete dir="${commonsAdapter-classesDestination}"/> <delete dir="${slf4jImplementation-classesDestination}"/> <delete dir="${releaseDir}"/> </target> <target name="BuildJars" depends="BuildCodeJars, BuildSourceJar"/> <target name="BuildCodeJars" depends="CompileJavas, CopyResources"> <jar jarfile="${codeJar}" basedir="${classesDestination}"> <include name="${applicationRootDir}/DebugLevel.class"/> <include name="${applicationRootDir}/SimpleLog.class"/> <include name="${applicationRootDir}/SimpleLog$*.class"/> <include name="${applicationRootDir}/SimpleLogger.class"/> <exclude name="${applicationRootDir}/SimpleLog$ErrorReporter.class"/> <include name="meta-inf/**"/> </jar> <jar jarfile="${rollover-codeJar}" basedir="${classesDestination}"> <include name="${applicationRootDir}/rollover/*.class"/> <include name="${applicationRootDir}/SimpleLog$ErrorReporter.class"/> <include name="meta-inf/**/VERSION.txt"/> </jar> <jar jarfile="${commonsAdapter-codeJar}" basedir="${commonsAdapter-classesDestination}" includes="${applicationRootDir}/**/*.class,meta-inf/**"/> <jar jarfile="${slf4jImplementation-codeJar}" basedir="${slf4jImplementation-classesDestination}" includes="**/*.class,meta-inf/**"/> </target> <target name="CompileJavas" depends="Clean,Init"> <javac srcdir="${sourceDir}" destdir="${classesDestination}"> <include name="${applicationRootDir}/**/*.java"/> <classpath refid="classpath"/> </javac> <javac srcdir="${commonsAdapter-sourceDir}" destdir="${commonsAdapter-classesDestination}" includes="${applicationRootDir}/**/*.java"> <classpath refid="commonsAdapter-classpath"/> </javac> <javac srcdir="${slf4jImplementation-sourceDir}" destdir="${slf4jImplementation-classesDestination}" includes="**/*.java"> <classpath refid="slf4jImplementation-classpath"/> </javac> </target> <target name="BuildSourceJar" depends="Init"> <zip zipfile="${sourceZip}"> <fileset dir="."> <include name="ant.properties"/> <include name="build.xml"/> <include name="etc/*"/> <include name="src/org/grlea/**"/> <include name="adapters/**/src/org/grlea/**"/> <include name="test/src/org/grlea/**"/> </fileset> </zip> </target> <target name="CopyResources" depends="Init"> <copy todir="${releaseDir}" flatten="true"> <fileset dir="${etcDir}" includes="README.txt,ChangeLog.txt,LICENSE.txt,VERSION.txt"/> <filterset> <filter token="VERSION" value="${product.version}" /> </filterset> </copy> <copy todir="${releaseDir}/properties" flatten="true"> <fileset dir="${etcDir}" includes="simplelog.properties,simplelog-config.properties,simplelog-PLAIN.properties,simplelog-rollover.properties"/> <filterset> <filter token="VERSION" value="${product.version}" /> </filterset> </copy> <copy todir="${docDir}"> <fileset dir="etc/doc" includes="*.html,*.css,images/*.png" /> </copy> <copy todir="${classesDestination}/meta-inf/${ant.project.name}" flatten="true"> <fileset dir="${releaseDir}" includes="README.txt,ChangeLog.txt,LICENSE.txt,VERSION.txt"/> </copy> <copy todir="${commonsAdapter-classesDestination}/meta-inf/${ant.project.name}" flatten="true"> <fileset dir="${releaseDir}" includes="README.txt,ChangeLog.txt,LICENSE.txt,VERSION.txt"/> </copy> <copy todir="${slf4jImplementation-classesDestination}/meta-inf/${ant.project.name}" flatten="true"> <fileset dir="${releaseDir}" includes="README.txt,ChangeLog.txt,LICENSE.txt,VERSION.txt"/> </copy> <copy file="${libDir}/slf4j/license.html" tofile="${slf4jImplementation-classesDestination}/meta-inf/slf4j/slf4j-license.html" flatten="true"/> <copy file="${libDir}/slf4j/license.html" tofile="${releaseDir}/adapters/slf4j-license.html" flatten="true"/> </target> <target name="CompileJavadoc" depends="Init"> <javadoc destdir="${javadocDir}" packagenames="${javadocPackages}" access="protected" Author="true" Use="true" Version="true" Windowtitle="${product.name} ${product.version} API Documentation" nodeprecatedlist="true" notree="true" nohelp="true" failonerror="true"> <sourcepath> <path path="${sourceDir}"/> <path path="${commonsAdapter-sourceDir}"/> <path path="${slf4jImplementation-sourceDir}"/> </sourcepath> <classpath> <path refid="commonsAdapter-classpath"/> </classpath> <link href="${slf4j-javadoc}"/> <link href="${commons-logging-javadoc}"/> <group> <title>Simple Log</title> <package name="org.grlea.log"/> </group> <group> <title>Simple Log Rollover</title> <package name="org.grlea.log.rollover"/> </group> <group> <title>Adapters</title> <package name="org.grlea.log.adapters.*"/> </group> <header> <b><a href="${product.website}" target="_top"> ${product.name} ${product.version} </a></b> <br> <font size="-1"> [<a href="http://www.grlea.org/" target="_top">grlea<a>] </font> </header> <footer> <font size="-1"> Copyright (c) 2004-2006, Graham Lea. All rights reserved. <br> </font> </footer> </javadoc> </target> <target name="Cleanup"> <delete dir="${classesDestination}" failonerror="false"/> <delete dir="${commonsAdapter-classesDestination}" failonerror="false"/> <delete dir="${slf4jImplementation-classesDestination}" failonerror="false"/> <delete dir="${tempDir}" failonerror="false"/> </target> </project>