184 lines
9.4 KiB
XML
184 lines
9.4 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<project name="commons-logging" default="package" basedir=".">
|
|
|
|
<!-- ====================================================================== -->
|
|
<!-- Build environment properties -->
|
|
<!-- ====================================================================== -->
|
|
|
|
<property file="build.properties" />
|
|
|
|
<property name="project.groupId" value="commons-logging" />
|
|
<property name="project.artifactId" value="commons-logging" />
|
|
<property name="spec.version" value="1.4" />
|
|
<property name="project.version" value="${spec.version}.0" />
|
|
|
|
<property name="compiler.release" value="8" />
|
|
<property name="compiler.source" value="1.${compiler.release}" />
|
|
<property name="compiler.target" value="${compiler.source}" />
|
|
|
|
<property name="build.finalName" value="${project.artifactId}-${project.version}" />
|
|
<property name="build.dir" value="target"/>
|
|
<property name="build.outputDir" value="${build.dir}/classes"/>
|
|
<property name="build.srcDir" value="src/main/java"/>
|
|
<property name="build.resourceDir" value="."/>
|
|
<property name="reporting.outputDirectory" value="${build.dir}/site"/>
|
|
|
|
<!-- ====================================================================== -->
|
|
<!-- Defining classpaths -->
|
|
<!-- ====================================================================== -->
|
|
|
|
<path id="build.classpath">
|
|
<fileset dir="lib">
|
|
<include name="**/*.jar">
|
|
</include>
|
|
</fileset>
|
|
</path>
|
|
|
|
<!-- ====================================================================== -->
|
|
<!-- Cleaning up target -->
|
|
<!-- ====================================================================== -->
|
|
|
|
<target name="clean" description="Clean the output directory">
|
|
<delete dir="${build.dir}"/>
|
|
</target>
|
|
|
|
<!-- ====================================================================== -->
|
|
<!-- Compilation target -->
|
|
<!-- ====================================================================== -->
|
|
|
|
<target name="compile" description="Compile the code">
|
|
<mkdir dir="${build.outputDir}"/>
|
|
<javac destdir="${build.outputDir}"
|
|
encoding="UTF-8"
|
|
nowarn="false"
|
|
debug="true"
|
|
optimize="false"
|
|
deprecation="true"
|
|
release="${compiler.release}"
|
|
target="${compiler.target}"
|
|
verbose="false"
|
|
fork="false"
|
|
source="${compiler.source}">
|
|
<src>
|
|
<pathelement location="${build.srcDir}"/>
|
|
</src>
|
|
<classpath refid="build.classpath"/>
|
|
</javac>
|
|
<mkdir dir="${build.outputDir}/META-INF"/>
|
|
<copy todir="${build.outputDir}/META-INF">
|
|
<fileset dir="${build.resourceDir}">
|
|
<include name="NOTICE.txt"/>
|
|
<include name="LICENSE.txt"/>
|
|
<include name="NOTICE"/>
|
|
<include name="LICENSE"/>
|
|
</fileset>
|
|
</copy>
|
|
</target>
|
|
|
|
<!-- ====================================================================== -->
|
|
<!-- Javadoc target -->
|
|
<!-- ====================================================================== -->
|
|
|
|
<target name="javadoc" description="Generates the Javadoc of the application">
|
|
<javadoc sourcepath="${build.srcDir}"
|
|
packagenames="*"
|
|
destdir="${reporting.outputDirectory}/apidocs"
|
|
access="protected"
|
|
verbose="false"
|
|
encoding="UTF-8"
|
|
version="true"
|
|
use="true"
|
|
author="true"
|
|
splitindex="false"
|
|
nodeprecated="false"
|
|
nodeprecatedlist="false"
|
|
notree="false"
|
|
noindex="false"
|
|
nohelp="false"
|
|
nonavbar="false"
|
|
serialwarn="false"
|
|
docencoding="UTF-8"
|
|
source="${compiler.source}"
|
|
linksource="true"
|
|
breakiterator="false">
|
|
<classpath refid="build.classpath"/>
|
|
</javadoc>
|
|
</target>
|
|
|
|
<!-- ====================================================================== -->
|
|
<!-- Package target -->
|
|
<!-- ====================================================================== -->
|
|
|
|
<macrodef name="build-jar">
|
|
<attribute name="suffix" default=""/>
|
|
<element name="includes" optional="true"/>
|
|
<element name="excludes" optional="true"/>
|
|
<sequential>
|
|
<jar jarfile="${build.dir}/${build.finalName}@{suffix}.jar"
|
|
compress="true"
|
|
index="false"
|
|
basedir="${build.outputDir}"
|
|
excludes="**/package.html">
|
|
<includes/>
|
|
<excludes/>
|
|
<manifest>
|
|
<attribute name="Automatic-Module-Name" value="org.apache.commons.logging"/>
|
|
<attribute name="Bundle-Description" value="Apache Commons Logging is a thin adapter allowing configurable bridging to other, well-known logging systems."/>
|
|
<attribute name="Bundle-DocURL" value="https://commons.apache.org/proper/commons-logging/"/>
|
|
<attribute name="Bundle-License" value="https://www.apache.org/licenses/LICENSE-2.0.txt"/>
|
|
<attribute name="Bundle-ManifestVersion" value="2"/>
|
|
<attribute name="Bundle-Name" value="Apache Commons Logging"/>
|
|
<attribute name="Bundle-SymbolicName" value="org.apache.commons.${project.artifactId}"/>
|
|
<attribute name="Bundle-Vendor" value="The Apache Software Foundation"/>
|
|
<attribute name="Bundle-Version" value="${project.version}"/>
|
|
<attribute name="Export-Package" value="org.apache.commons.logging.impl;version="${project.version}";uses:="javax.servlet,org.apache.avalon.framework.logger,org.apache.commons.logging,org.apache.log,org.apache.log4j",org.apache.commons.logging.jakarta;version="${project.version}";uses:="jakarta.servlet",org.apache.commons.logging;version="${project.version}""/>
|
|
<attribute name="Implementation-Title" value="Apache Commons Logging"/>
|
|
<attribute name="Implementation-Vendor" value="The Apache Software Foundation"/>
|
|
<attribute name="Implementation-Version" value="${project.version}"/>
|
|
<attribute name="Import-Package" value="jakarta.servlet;version="[4.0.2,7.0.0)";resolution:=optional,javax.servlet;version="[2.1.0,5.0.0)";resolution:=optional,org.apache.avalon.framework.logger;version="[4.1.3,4.1.5]";resolution:=optional,org.apache.log4j;version="[1.2.15,2.0.0)";resolution:=optional,org.apache.log;version="[1.0.1,1.0.1]";resolution:=optional,org.apache.logging.log4j.spi;version="[2.0,4.0)";resolution:=optional,org.apache.logging.log4j.util;version="[2.0,4.0)";resolution:=optional,org.apache.logging.log4j;version="[2.0,4.0)";resolution:=optional,org.slf4j.spi;version="[1.7,3)";resolution:=optional,org.slf4j;version="[1.7,3)";resolution:=optional"/>
|
|
<attribute name="Include-Resource" value="META-INF/LICENSE.txt=LICENSE.txt,META-INF/NOTICE.txt=NOTICE.txt"/>
|
|
<attribute name="Require-Capability" value="osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))",osgi.extender;filter:="(&(osgi.extender=osgi.serviceloader.processor)(version>=1.0.0)(!(version>=2.0.0)))";resolution:=optional,osgi.serviceloader;filter:="(osgi.serviceloader=org.apache.commons.logging.LogFactory)";osgi.serviceloader="org.apache.commons.logging.LogFactory";resolution:=optional;cardinality:=multiple"/>
|
|
<attribute name="Specification-Title" value="Apache Commons Logging"/>
|
|
<attribute name="Specification-Vendor" value="The Apache Software Foundation"/>
|
|
<attribute name="Specification-Version" value="${spec.version}"/>
|
|
</manifest>
|
|
</jar>
|
|
</sequential>
|
|
</macrodef>
|
|
|
|
<target name="package" depends="compile" description="Package the application">
|
|
<build-jar suffix=""/>
|
|
<build-jar suffix="-api">
|
|
<includes>
|
|
<include name="org/apache/commons/logging/*.class"/>
|
|
<include name="org/apache/commons/logging/impl/LogFactoryImpl*.class"/>
|
|
<include name="org/apache/commons/logging/impl/WeakHashtable*.class"/>
|
|
<include name="org/apache/commons/logging/impl/SimpleLog*.class"/>
|
|
<include name="org/apache/commons/logging/impl/NoOpLog*.class"/>
|
|
<include name="org/apache/commons/logging/impl/Jdk14Logger.class"/>
|
|
<include name="META-INF/LICENSE.txt"/>
|
|
<include name="META-INF/NOTICE.txt"/>
|
|
</includes>
|
|
</build-jar>
|
|
<build-jar suffix="-adapters">
|
|
<includes>
|
|
<include name="org/apache/commons/logging/impl/**/*.class"/>
|
|
<include name="META-INF/LICENSE.txt"/>
|
|
<include name="META-INF/NOTICE.txt"/>
|
|
</includes>
|
|
<excludes>
|
|
<exclude name="org/apache/commons/logging/impl/WeakHashtable*.class"/>
|
|
<exclude name="org/apache/commons/logging/impl/LogFactoryImpl*.class"/>
|
|
</excludes>
|
|
</build-jar>
|
|
</target>
|
|
|
|
<!-- ====================================================================== -->
|
|
<!-- A dummy target for the package named after the type it creates -->
|
|
<!-- ====================================================================== -->
|
|
|
|
<target name="jar" depends="package" description="Builds the jar for the application"/>
|
|
|
|
</project>
|