The version of Apache log4j used by SoundHelix.

[[ 🗃 ^aEp6o apache-log4j ]] :: [📥 Inbox] [📤 Outbox] [🐤 Followers] [🤝 Collaborators] [🛠 Commits]

Clone

HTTPS: git clone https://vervis.peers.community/repos/aEp6o

SSH: git clone USERNAME@vervis.peers.community:aEp6o

Branches

Tags

v1_2_15_rc1 ::

build.xml

<!--
 Licensed to the Apache Software Foundation (ASF) under one or more
 contributor license agreements.  See the NOTICE file distributed with
 this work for additional information regarding copyright ownership.
 The ASF licenses this file to You 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.

-->

<!-- This file is an ANT build script. ANT is a Java based build tool. -->
<!-- It is available from http://ant.apache.org                        -->


<project name="log4j" default="usage" basedir="." >

  
  <!-- The build.properties file defines the parth to local jar files -->
  <property file="build.properties"/>               

  <!-- Read the system environment variables and stores them in properties, -->
  <!-- prefixed with "env". -->
  <property environment="env"/>

  <property name="version" value="1.2.15"/>

  <!-- The base directory relative to which most targets are built -->
  <property name="base" value="."/>


  <property name="deprecation" value="on"/>

  <!-- The directory where source files are stored. -->
  <property name="java.source.dir" value="src/java/"/>

  <!-- The directory where the package-list file is found, ./ or -->
  <!-- build/ -->
  <property name="packaging.dir" value="build"/>

  <!-- distribution directory -->
  <property name="dist.dir" value="dist"/>
  
  <!-- Destination for compiled files -->
  <property name="javac.dest" value="${dist.dir}/classes"/>

  <!-- Destination for generated jar files -->
  <property name="jar.dest" value="${dist.dir}/lib"/>

  <!-- The jar file that the jar task will generate -->
  <property name="jar.filename" value="log4j-${version}.jar"/>
  <property name="sources-jar.filename" value="log4j-${version}-sources.jar"/>

  <!-- Destination for documentation files -->
  <property name="docs.dest" value="./docs"/>
  <!-- Source directory for xml docs -->
  <property name="xdocs.src" value="./src/xdocs"/>


  <!-- Destination for javadoc generated files -->
  <property name="javadoc.dest" value="docs/api"/>

  <!-- Icons source directory. -->
  <property name="icons.source" value="icons"/>

  <!-- The stem where most log4j source code is located. -->
  <property name="stem" value="org/apache/log4j"/>

  <!-- Some targets needs a more precise stem. -->
  <property name="BSTEM" value="${java.source.dir}/${stem}"/>

  <!-- Original manifest.mf file before filtering. -->
  <property name="manifest.src" value="build/manifest.mf"/>

  <!-- Directory where release images go. -->
  <property name="dist.images"  value="${dist.dir}/images"/>

  <!-- Directory for temporary files. -->
  <property name="dist.tmp" value="${dist.dir}/tmp"/>
  
  <property name="javac.source" value="1.1"/>
  <property name="javac.target" value="1.1"/>
  
  <!--  destination for generated documentation on Apache web host  -->
  <property name="apache.javadoc_dest" value="/www/logging.apache.org/log4j/docs"/>
  <!--  Apache web host  -->
  <property name="apache.host" value="people.apache.org"/>


  <!-- Construct compile classpath -->
  <path id="compile.classpath">
    <pathelement location="${build.home}/classes"/>
    <pathelement location="${javamail.jar}"/>
    <pathelement location="${activation.jar}"/>
    <pathelement location="${jaxp.jaxp.jar}"/>
    <pathelement location="${jms.jar}"/>
    <pathelement location="${jmx.jar}"/>
    <pathelement location="${jmx-extra.jar}"/>
    <pathelement location="${jndi.jar}"/>
  </path>

  <!-- Construct classpath for building the html pages-->
  <path id="site.classpath">
    <pathelement location="${velocity.jar}"/>
    <pathelement location="${jdom.jar}"/>
  </path>

  <!-- ================================================================= -->
  <!-- Default target                                                    -->
  <!-- ================================================================= -->

  <target name="usage">
    <echo>

    These are the targets supported by this ANT build scpript:

    build   - compile all project files, if a certain library is missing,
         then the compilation of its dependents are skipped.

    javadoc - build project javadoc files

    jar     - build log4j-core and log4j jar files

    dist    - will create a complete distribution in dist/
              Setting the env variable NO_JAVADOC will build the distribution
              without running the javadoc target.

    release - will create a complete distribution in dist/
              using stricter settings for public distribution.
    </echo>
  </target>

  <target name="jaxpCheck">
    <available classname="javax.xml.parsers.DocumentBuilderFactory"
                          property="jaxp-present"/>
  </target>

  <target name="jaxp" depends="jaxpCheck" if="jaxp-present">
    <echo message="JAXP present."/>
  </target>


  <target name="jmxCheck">
    <condition property="jmx-present" value="true">
        <and>
            <available classname="javax.management.MBeanInfo"
                       classpath="${jmx.jar}"/>
            <available classname="com.sun.jdmk.comm.HtmlAdaptorServer">
                <classpath>
                    <pathelement location="${jmx.jar}"/>
                    <pathelement location="${jmx-extra.jar}"/>
                </classpath>
            </available>
        </and>
    </condition>
  </target>
  <target name="jmx" depends="jmxCheck" if="jmx-present">
    <echo message="JMX is present."/>
  </target>


  <target name="jmsCheck">
    <available classname="javax.jms.Message" property="jms-present">
      <classpath>
   <pathelement location="${jms.jar}"/>
      </classpath>
    </available>
  </target>
  <target name="jms" depends="jmsCheck" if="jms-present">
    <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>
   <pathelement location="${javamail.jar}"/>
      </classpath>
    </available>
  </target>
  <target name="javamail" depends="javamailCheck" if="javamail-present">
    <echo message="JAVAMAIL is present."/>
  </target>

  <!-- ================================================================= -->
  <!-- Initialize variables                                              -->
  <!-- NOTE: all directories are relative to jakarta-log4j/              -->
  <!-- ================================================================= -->
  <target name="init">
    <tstamp />
    <property name="javac.includeAntRuntime" value="true"/>
    <property name="javac.includeJavaRuntime" value="false"/>
    <property name="javac.fork" value="false"/>
  </target>

  <target name="build" depends="init, build.core, build.examples, build.xml,
                                build.javamail, build.jms, build.jmx"/>

  <target name="build.core" depends="init">
    <mkdir dir="${javac.dest}" />
    <javac srcdir="${java.source.dir}"
           destdir="${javac.dest}"
           includes="${stem}/**/*.java, 
                     ${stem}/xml/XMLLayout.java"
           excludes="misc/*, **/UnitTest*.java,
                    **/StressCategory.java,
                    **/doc-files/*,
                    ${stem}/xml/**,
                    ${stem}/test/serialization/**,
                    ${stem}/net/SMTPAppender.java,
                    ${stem}/net/JMS*.java,
                    ${stem}/jmx/*.java,
                    ${stem}/or/jms/*.java"
           target="${javac.target}"
           source="${javac.source}"
           includeAntRuntime="${javac.includeAntRuntime}"
           includeJavaRuntime="${javac.includeJavaRuntime}"
           fork="${javac.fork}"
           deprecation="${deprecation}"
           debug="on">
      <classpath refid="compile.classpath"/>
    </javac>
    
    <copy todir="${javac.dest}">
      <fileset dir="${java.source.dir}" includes="${stem}/lf5/**/*.properties"/>
      <fileset dir="${java.source.dir}" includes="${stem}/lf5/viewer/images/*"/>
    </copy>

  </target>

  <target name="build.examples" depends="build.core">
    <mkdir dir="${javac.dest}" />
    <javac srcdir="${basedir}"
           destdir="${javac.dest}"
           includes="examples/**/*.java"
           excludes="misc/*"
           target="${javac.target}"
           source="${javac.source}"
           includeAntRuntime="${javac.includeAntRuntime}"
           includeJavaRuntime="${javac.includeJavaRuntime}"
           fork="${javac.fork}"
           deprecation="${deprecation}"
           debug="on">
           <classpath>
               <pathelement path="${classpath}"/>
               <fileset file="${jaxp.jaxp.jar}"/>
           </classpath>
    </javac>
    <rmic base="${javac.dest}" classname="examples.NumberCruncherServer"/>

    <copy todir="${javac.dest}">
      <fileset dir="." includes="examples/lf5/**/*.properties"/>
      <fileset dir="." includes="examples/lf5/**/*.xml"/>
   </copy>

  </target>

 <target name="build.xml" depends="init, jaxp" if="jaxp-present">
    <javac srcdir="${java.source.dir}"
           destdir="${javac.dest}"
           includes="${stem}/xml/**/*.java"
           excludes="${stem}/xml/examples/doc-files/**.java,
                     ${stem}/xml/Transform.java"
           target="${javac.target}"
           source="${javac.source}"
           includeAntRuntime="${javac.includeAntRuntime}"
           includeJavaRuntime="${javac.includeJavaRuntime}"
           fork="${javac.fork}"
           deprecation="${deprecation}"
           classpath="${classpath}">
      <classpath refid="compile.classpath"/>
    </javac>
    <copy file="${BSTEM}/xml/log4j.dtd" tofile="${javac.dest}/${stem}/xml/log4j.dtd" />
  </target>

 <target name="build.javamail" depends="init, javamail"
               if="javamail-present">
    <javac srcdir="${java.source.dir}"
           destdir="${javac.dest}"
           includes="${stem}/net/SMTPAppender.java"
           target="${javac.target}"
           source="${javac.source}"
           includeAntRuntime="${javac.includeAntRuntime}"
           includeJavaRuntime="${javac.includeJavaRuntime}"
           fork="${javac.fork}"
           deprecation="${deprecation}">
      <classpath refid="compile.classpath"/>
    </javac>
  </target>

  <target name="build.jms" depends="init, jms, jndi" if="jms-present">
    <javac srcdir="${java.source.dir}"
           destdir="${javac.dest}"
           includes="${stem}/net/JMS*.java, ${stem}/or/jms/*.java"
           target="${javac.target}"
           source="${javac.source}"
           includeAntRuntime="${javac.includeAntRuntime}"
           includeJavaRuntime="${javac.includeJavaRuntime}"
           fork="${javac.fork}"
           deprecation="${deprecation}">
      <classpath refid="compile.classpath"/>
    </javac>
  </target>

 <target name="build.jmx" depends="init, jmx, jndi" if="jmx-present">
    <javac srcdir="${java.source.dir}"
           destdir="${javac.dest}"
           includes="${stem}/jmx/*.java"
           excludes="${stem}/jmx/T.java"
           target="${javac.target}"
           source="${javac.source}"
           includeAntRuntime="${javac.includeAntRuntime}"
           includeJavaRuntime="${javac.includeJavaRuntime}"
           fork="${javac.fork}"
           deprecation="${deprecation}">
      <classpath refid="compile.classpath"/>
    </javac>
  </target>

    <!--
        Regenerates resource files from EventLogCategories.mc.  Avoids
        need for Microsoft Platform SDK unless you are modifying EventLogCategories.mc
    -->
    <target name="update.nt.msg" description="Update EventLogCategories.rc from .mc">
        <property name="msg.out.dir" location="${java.source.dir}org/apache/log4j/nt"/>
        <exec executable="mc">
            <arg value="-h"/>
            <arg file="${msg.out.dir}"/>
            <arg value="-r"/>
            <arg file="${msg.out.dir}"/>
            <arg file="${java.source.dir}org/apache/log4j/nt/EventLogCategories.mc"/>
        </exec>
    </target>


    <target name="build.nt" depends="log4j.jar" description="Build NTEventLogAppender.dll">
    <javah class="org.apache.log4j.nt.NTEventLogAppender,org.apache.log4j.Priority"
           destdir="${javac.dest}"
           classpath="${jar.dest}/${jar.filename}"/>
    
    <exec executable="windres"   dir="${java.source.dir}/org/apache/log4j/nt/">
      <arg value="-o"/>
      <arg file="${javac.dest}/NTEventLogAppender.o"/>
      <arg file="${java.source.dir}org/apache/log4j/nt/NTEventLogAppender.rc"/>
    </exec>
    
    <property name="jni.include.dir" location="${java.home}\..\include"/>
    <exec executable="gcc">
      <arg value="-Wall"/>
      <arg value="-D_JNI_IMPLEMENTATION_"/>
      <arg value="-Wl,--kill-at"/>
      <arg value="-I${jni.include.dir}"/>
      <arg value="-I${jni.include.dir}\win32"/>
      <arg value="-I${javac.dest}"/>
      <arg value="-shared"/>
      <arg file="${java.source.dir}org/apache/log4j/nt/nteventlog.cpp"/>
      <arg file="${javac.dest}/NTEventLogAppender.o"/>
      <arg value="-o"/>
      <arg file="${jar.dest}/NTEventLogAppender.dll"/>
    </exec>
    
  </target>

  <!-- ================================================================= -->
  <!-- Remove all generated (compiled) class files.                      -->
  <!-- ================================================================= -->
  <target name="clean" depends="init">
    <delete dir="${dist.dir}/" />
  </target>

  <!-- ================================================================= -->
  <!-- Runs checkstyle. Available from http://checkstyle.sf.net          -->
  <!-- ================================================================= -->
  <target name="checkstyle" depends="init">
    <taskdef resource="checkstyletask.properties"
             classpath="${checkstyle.jar}"/>

    <!-- by default checkstyle supports the Sun coding standard. -->
    <checkstyle lcurlyMethod="nlow"
                lcurlyOther="nlow"
                lcurlyType="nlow"
                maxMethodLen="500"
                maxConstructorLen="500">
      <fileset dir="src/java/org/apache/log4j/chainsaw" includes="**/*.java"/>
    </checkstyle>
  </target>

  <!-- ================================================================= -->
  <!-- Runs Chainsaw                                                     -->
  <!-- ================================================================= -->

  <target name="chainsaw" depends="build">
    <!-- Need to fork to avoid problems -->
    <java classname="org.apache.log4j.chainsaw.Main" fork="yes"
          classpath="${javac.dest};${ant.home}/lib/crimson.jar">
    </java>
  </target>

  <!-- ================================================================= -->
  <!-- Remove the temporary manifest file, actual work is done in the    -->
  <!-- dependencies.                                                     -->
  <!-- ================================================================= -->
  <target name="jar" depends="log4j.jar, log4j-sources.jar">
     <delete file="${jar.dest}/manifest.mf"/>
  </target>

  <target name="prejar" depends="init">
    <mkdir dir="${jar.dest}"/>
    <filter token="version" value="${version}" />
    <copy file="${manifest.src}" tofile="${jar.dest}/manifest.mf"
          filtering="true"/>
  </target>

 <!-- ================================================================= -->
 <!-- Create log4j.jar, excluding tests and other odds and ends.        -->
 <!-- ================================================================= -->
  <target name="log4j.jar" depends="build, prejar">
    <delete>
      <fileset dir="${jar.dest}">
   			<include name="${jar.filename}"/>
      </fileset>
    </delete>

    <jar jarfile="${jar.dest}/${jar.filename}" basedir="${javac.dest}"
         includes="${stem}/*.class, 
                   ${stem}/xml/log4j.dtd,
                   ${stem}/config/*.class,
                   ${stem}/helpers/*.class,
                   ${stem}/spi/*.class,
                   ${stem}/net/*.class,
                   ${stem}/jdbc/*.class,
                   ${stem}/varia/*.class,
                   ${stem}/chainsaw/*.class,
                   ${stem}/lf5/**/*.class,
                   ${stem}/lf5/**/*.properties,
                   ${stem}/lf5/**/*.gif,
                   ${stem}/nt/*.class,
                   ${stem}/xml/*.class,
                   ${stem}/jmx/*.class,
                   ${stem}/or/*.class,
                   ${stem}/or/sax/*.class,
                   ${stem}/or/jms/*.class,
                   ${stem}/config/*.class"
         excludes="**/UnitTest**"
         manifest="${jar.dest}/manifest.mf">
         <metainf dir="." includes="NOTICE,LICENSE"/>
     </jar>
  </target>


 <!-- ================================================================= -->
 <!-- Create log4j-sources.jar                                          -->
 <!-- ================================================================= -->
  <target name="log4j-sources.jar" depends="prejar">
    <delete>
      <fileset dir="${jar.dest}" includes="${sources-jar.filename}"/>
    </delete>

    <jar jarfile="${jar.dest}/${sources-jar.filename}" basedir="${java.source.dir}"
         includes="**/*.java"
         manifest="${jar.dest}/manifest.mf">
         <metainf dir="." includes="NOTICE,LICENSE"/>
     </jar>
  </target>


  <!-- ================================================================= -->
  <!-- This target builds the javadoc files.                             -->
  <!-- ================================================================= -->
  <target name="javadoc" depends="init" unless="env.NO_JAVADOC">

    <mkdir dir="${javadoc.dest}" />

    <javadoc sourcepath="${java.source.dir}"
             destdir="${javadoc.dest}"
             packagenames="org.apache.log4j,
                           org.apache.log4j.config,
                           org.apache.log4j.helpers,
                           org.apache.log4j.jmx,
                           org.apache.log4j.lf5,
                           org.apache.log4j.net,
                           org.apache.log4j.nt,
                           org.apache.log4j.or,
                           org.apache.log4j.jdbc,
                           org.apache.log4j.or.sax,
                           org.apache.log4j.or.jms,
                           org.apache.log4j.performance,
                           org.apache.log4j.spi,
                           org.apache.log4j.varia,
                           org.apache.log4j.chainsaw,
                           org.apache.log4j.xml,
                           org.apache.log4j.xml.examples"
             version="true"
             protected="true"
             author="true"
             use="true"
             overview="${docs.dest}/overview.html"
             doctitle="log4j version ${version}&lt;br&gt;API Specification"
             windowtitle="Log4j Version ${version}"
             header='&lt;b&gt;Log4j ${version}&lt;/b&gt;&lt;!--  Licensed to the Apache Software Foundation (ASF) under one or more
 contributor license agreements.  See the NOTICE file distributed with
 this work for additional information regarding copyright ownership.
 The ASF licenses this file to You under the Apache License, Version 2.0
 (the &apos;License&apos;); 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 &apos;AS IS&apos; 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.
--&gt;'
             bottom="Copyright 2000-2007 Apache Software Foundation.">

      <link href="http://java.sun.com/j2se/1.3/docs/api/"/>
      <link href="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/"/>
      <classpath refid="compile.classpath"/>
    </javadoc>

    <!-- Extra files referenced by JavaDocs -->
    <copy file="${java.source.dir}/org/apache/log4j/xml/log4j.dtd"
          tofile="${javadoc.dest}/org/apache/log4j/xml/log4j.dtd" />
    <copy todir="${javadoc.dest}/org/apache/log4j/xml/examples">
      <fileset dir="${java.source.dir}/org/apache/log4j/xml/examples">
        <include name="sample*.xml" />
        <include name="XMLSample.java" />
      </fileset>
    </copy>
  </target>

  <!-- ================================================================= -->
  <!-- Compare the current API with a previous release                   -->
  <!-- ================================================================= -->
  <target name="jdiff" description="Generate comparison to reference API">
       <property name="reference-api.version" value="1.2.9"/>
       <property name="reference-api.dir" location="${user.home}/logging-log4j-${reference-api.version}"/>
       <property name="reference-api.source.dir" location="${user.home}/logging-log4j-${reference-api.version}/src/java"/>

       <!-- Must be set to the root of where JDiff is installed. -->
       <property name="JDIFF_HOME" value="${user.home}/jdiff"/>
       <!-- Just one simple way to tell Ant about the JDiff task -->
       <taskdef name="jdiff" classname="jdiff.JDiffAntTask" 
           classpath="${JDIFF_HOME}/lib/antjdiff.jar"/>    
           
       <jdiff verbose="on" destdir="build/jdiff">
            <old name="Version ${reference-api.version}">
              <dirset dir="${reference-api.source.dir}" includes="org/**"/>
            </old>
            <new name="Version ${version}">
              <dirset dir="${java.source.dir}" includes="org/**" excludes="org/apache/log4j/test/**"/>
            </new>
       </jdiff>
  </target>  


	  <!-- ================================================================= -->
	  <!-- Compare the current API with a previous release                   -->
	  <!-- ================================================================= -->
	  <target name="clirr" depends="jar" description="Check binary compatibility with arbitrary release">
	  	   <fail unless="clirr-core.jar">-Dclirr-core.jar=PATH must be specified.</fail>
	  	   <fail unless="bcel.jar">-Dbcel.jar=PATH must be specified.</fail>
	  	   <fail unless="reference.jar">-Dreference.jar=PATH must be specified.</fail>
	       <taskdef resource="clirrtask.properties" 
	           classpath="${clirr-core.jar};${bcel.jar}"/>
	       <delete dir="build/clirr"/>
	       <mkdir dir="build/clirr/orig"/>
	       <mkdir dir="build/clirr/new"/>
	       <copy todir="build/clirr/orig">	       
	       	    <fileset file="${jms.jar}"/>
	       	    <fileset file="${jmx.jar}"/>
				<fileset file="${reference.jar}"/>
	       </copy>
	       <copy todir="build/clirr/new">
	       	    <fileset file="${jms.jar}"/>
	       	    <fileset file="${jmx.jar}"/>
	       	    <fileset dir="${jar.dest}" includes="${jar.filename}"/>
	       </copy>
	  	   <clirr failOnBinError="no" failOnSrcError="no">
	  	        <origfiles dir="build/clirr/orig" includes="*.jar"/>
	  	        <newfiles dir="build/clirr/new" includes="*.jar"/>
	  	  	    <formatter type="xml" outfile="${docs.dest}/compatibility.xml"/>
	  	  </clirr>
	  	  <xslt in="${docs.dest}/compatibility.xml"
	  	        out="${docs.dest}/compatibility.html"
	  	        style="${basedir}/src/xdocs/stylesheets/compatibility.xslt"/>
	  </target>  

  <!-- ============================================== -->
  <!-- Build the site files using Anakia              -->
  <!-- ============================================== -->
  <target name="prepareSite">
    <available classname="org.apache.velocity.anakia.AnakiaTask"
      property="AnakiaTask.present">
      <classpath refid="site.classpath"/>
    </available>
  </target>

  <target name="checkSite" depends="prepareSite" unless="AnakiaTask.present">
    <fail>
      AnakiaTask is not present! Please check to make sure that
      velocity.jar is in your classpath.
    </fail>
  </target>

  <target name="clean-site">
     <delete>
         <fileset dir="${docs.dest}" includes="**/*.html">
             <exclude name="FAQ.html"/>
             <exclude name="TROUBLESHOOT.html"/>
             <exclude name="manual.html"/>
             <exclude name="overview.html"/>
         </fileset>
     </delete>
  </target>

  <target name="site" depends="checkSite" if="AnakiaTask.present">
    <taskdef name="anakia" classname="org.apache.velocity.anakia.AnakiaTask">
      <classpath refid="site.classpath"/>
    </taskdef>
 
    <mkdir dir="${docs.dest}/css"/>  
    <copy file="docs/css/site.css" tofile="${docs.dest}/css/site.css"/>
    
    <anakia basedir="${xdocs.src}" destdir="${docs.dest}/"
      extension=".html"
      style="site.vsl"
      projectFile="stylesheets/project.xml"
      excludes="**/stylesheets/**, empty.xml"
      includes="**/*.xml"
      lastModifiedCheck="true"
      templatePath="${xdocs.src}/stylesheets">
    </anakia>

  </target>

<target name="deploy-site" depends="javadoc" description="Deploy log4j documentation">
    <fail unless="apache.user">-Dapache.user=USERNAME must be specified.</fail>
    <tar destfile="${packaging.dir}/apache-log4j12-site.tar.gz" compression="gzip">
         <tarfileset dir="${javadoc.dest}" prefix="api-${version}"/>
    </tar>
    <exec executable="scp" dir="${packaging.dir}">
         <arg value="apache-log4j12-site.tar.gz"/>
         <arg value="${apache.user}@${apache.host}:"/>
    </exec>
    <exec executable="ssh">
         <arg value="-l"/>
         <arg value="${apache.user}"/>
         <arg value="${apache.host}"/>
         <arg value="tar"/>
         <arg value="--directory=${apache.javadoc_dest}"/>
         <arg value="-xvzf"/>
         <arg value="apache-log4j12-site.tar.gz"/>
    </exec>
    <exec executable="ssh">
      <arg value="-l"/>
      <arg value="${apache.user}"/>
      <arg value="${apache.host}"/>
      <arg value="chmod"/>
      <arg value="-R"/>
      <arg value="g+w"/>
      <arg value="${apache.javadoc_dest}"/>
    </exec>
</target>

 <!-- ================================================================= -->
 <!-- Build a complete distribution. Results go to ${dist.images}       -->
 <!-- ================================================================= -->
  <target name="dist" depends="init, clean, javadoc, jar, site, build.nt">

    <delete verbose="true">
      <fileset dir=".">
        <patternset>
      <include name="**/*.bak"/>
      <include name="${dist.dir}/velocity.log"/>
      <include name="${BSTEM}/**/temp*"/>
      <include name="${BSTEM}/performance/test"/>
      <include name="${BSTEM}/test/current.*"/>
      <include name="${BSTEM}/test/current.*"/>
      <include name="${BSTEM}/examples/test"/>
      <include name="${BSTEM}/test/logging.*"/>
      <include name="${BSTEM}/test/log4j.properties"/>
      <include name="{$BSTEM}/test/socket.lcf"/>
      <include name="${BSTEM}/test/file"/>
      <include name="${BSTEM}/test/output.*"/>
      <include name="${BSTEM}/net/test/loop.log"/>
      <include name="${BSTEM}/net/test/loop.log.1"/>
      <include name="${jar.dest}/manifest.mf"/>
      <include name="${javac.dest}/*.class"/>
        </patternset>
     </fileset>
    </delete>

    <mkdir  dir="${dist.images}" />
    
    <mkdir  dir="${dist.tmp}/apache-log4j-${version}" />

    <copy todir="${dist.tmp}/apache-log4j-${version}">
       <fileset dir="${base}"
                includes="src/java/**,
           docs/**,
                     examples/**,
           build/*,
                     build.xml,
                     build.properties.sample,
                          manifest.mf,
           INSTALL,
           LICENSE,
           NOTICE,
           ${dist.dir}/lib/log4j-${version}.jar,
           ${dist.dir}/lib/NTEventLogAppender.dll,
           ${dist.dir}/classes/**,
           contribs/**"
                excludes="make/make.loc,
                **/*.bak, **/goEnv.bat,
                **/Makefile, **/goEnv.bat,
                     docs/pub-support/*,
                     ${dist.dir}/classes/org/**,
                     src/java/org/apache/log4j/test/**/*,   
           **/.#*,
              **/*.o, **/*.res, **/*.h, **/EventLogCategories.rc"/>
    </copy>


    <fixcrlf srcdir="${dist.tmp}/apache-log4j-${version}"
             includes="build.sh" cr="remove"/>
    <fixcrlf srcdir="${dist.tmp}/apache-log4j-${version}"
             includes="build.bat" cr="add"/>
    <chmod   dir="${dist.tmp}/apache-log4j-${version}"
             includes="build.sh" perm="+x"/>

    <tar tarfile="${dist.images}/apache-log4j-${version}.tar.gz"
         basedir="${dist.tmp}"
         includes="apache-log4j-${version}/**"
         compression="gzip" />

    <zip zipfile="${dist.images}/apache-log4j-${version}.zip"
         basedir="${dist.tmp}"
         includes="apache-log4j-${version}/**" />


    <delete dir="${dist.tmp}" />
  </target>
  
  <!-- This target will be incorporated init dist for the next release
           currently it will repackage a previously built release   -->
  <target name="maven-package" depends="jar" description="Prepares a Maven package">
      <mkdir dir="${dist.dir}/poms"/>
      <copy tofile="${dist.dir}/poms/log4j-${version}.pom" file="pom.xml"/>
      <mkdir dir="${dist.dir}/licenses"/>
      <copy todir="${dist.dir}/licenses" file="LICENSE"/>
      
	  <checksum forceOverwrite="yes" fileext=".md5">
	  		<fileset dir="${jar.dest}" includes="${jar.filename} ${sources-jar.filename}"/>
	  </checksum>           
	  <checksum forceOverwrite="yes" fileext=".md5">
	  		<fileset dir="${dist.dir}" includes="poms/log4j-${version}.pom licenses/LICENSE"/>
	  </checksum>           
	  <checksum forceOverwrite="yes" fileext=".sha1" algorithm="SHA">
	  		<fileset dir="${jar.dest}" includes="${jar.filename} ${sources-jar.filename}"/>
	  </checksum>
	  <checksum forceOverwrite="yes" fileext=".sha1" algorithm="SHA">
	  		<fileset dir="${dist.dir}" includes="poms/log4j-${version}.pom licenses/LICENSE"/>
	  </checksum>           
	  <mkdir dir="${dist.images}"/>
      <!--  Does not include PGP signatures to allow for review prior to publication -->
	  <tar tarfile="${dist.images}/apache-log4j-${version}-maven.tar.gz"
         compression="gzip">
         <tarfileset dir="${dist.dir}" includes="poms/* licenses/*" excludes="**/*.asc"/>
         <tarfileset dir="${jar.dest}" includes="${jar.filename} ${jar.filename}.*" prefix="jars"  excludes="**/*.asc"/>
         <tarfileset dir="${jar.dest}" includes="${sources-jar.filename} ${sources-jar.filename}.*" prefix="java-sources"  excludes="**/*.asc"/>
      </tar>

	  <exec executable="gpg" dir="${jar.dest}">
	      <arg value="--armor"/>
	      <arg value="--output"/>
	      <arg value="${jar.filename}.asc"/>
	      <arg value="--detach-sig"/>
	      <arg value="${jar.filename}"/>	      
	  </exec>           
	  <exec executable="gpg" dir="${jar.dest}">
	      <arg value="--armor"/>
	      <arg value="--output"/>
	      <arg value="${sources-jar.filename}.asc"/>
	      <arg value="--detach-sig"/>
	      <arg value="${sources-jar.filename}"/>	      
	  </exec>           
	  <exec executable="gpg" dir="${dist.dir}/poms">
	      <arg value="--armor"/>
	      <arg value="--output"/>
	      <arg value="log4j-${version}.pom.asc"/>
	      <arg value="--detach-sig"/>
	      <arg value="log4j-${version}.pom"/>	      
	  </exec>           
	  <exec executable="gpg" dir="${dist.dir}/licenses">
	      <arg value="--armor"/>
	      <arg value="--output"/>
	      <arg value="LICENSE.asc"/>
	      <arg value="--detach-sig"/>
	      <arg value="LICENSE"/>	      
	  </exec>           
	  <tar tarfile="${dist.images}/apache-log4j-${version}-maven-pgpsigs.tar.gz"
         compression="gzip">
         <tarfileset dir="${dist.dir}" includes="poms/*.asc licenses/*.asc"/>
         <tarfileset dir="${jar.dest}" includes="${jar.filename}.asc" prefix="jars"/>
         <tarfileset dir="${jar.dest}" includes="${sources-jar.filename}.asc" prefix="java-sources"/>
      </tar>

  </target>

    <!-- ================================================================= -->
    <!-- Build a complete distribution for release.                        -->
    <!-- ================================================================= -->
   <target name="release">
        <property name="javac.includeAntRuntime" value="false"/>
        <property name="javac.includeJavaRuntime" value="false"/>
        <property name="javac.fork" value="true"/>
        <property name="build.compiler" value="classic"/>
        <antcall target="clean-site"/>
        <antcall target="dist"/>

        <!--  check that jar file is not missing
                 classes due to missing dependencies   -->
        <available property="jaxp-found"
                   classname="org.apache.log4j.xml.DOMConfigurator"
                   classpath="${jar.dest}/${jar.filename}"/>
        <fail unless="jaxp-found" message="JAXP was not found."/>
        <available property="jmx-found"
                   classname="org.apache.log4j.jmx.Agent"
                   classpath="${jar.dest}/${jar.filename}"/>
        <fail unless="jmx-found" message="JMX was not found."/>
        <available property="jms-found"
                   classname="org.apache.log4j.net.JMSAppender"
                   classpath="${jar.dest}/${jar.filename}"/>
        <fail unless="jms-found" message="JMS or JNDI was not found."/>
        <available property="javamail-found"
                   classname="org.apache.log4j.net.SMTPAppender"
                   classpath="${jar.dest}/${jar.filename}"/>
        <fail unless="javamail-found" message="JAVAMAIL was not found."/>
        <antcall target="maven-package"/>
	  <checksum forceOverwrite="yes" fileext=".md5">
	  		<fileset dir="${dist.images}" includes="apache-log4j-${version}.tar.gz apache-log4j-${version}.zip"/>
	  </checksum>           
	  <checksum forceOverwrite="yes" fileext=".sha1" algorithm="SHA">
	  		<fileset dir="${dist.images}" includes="apache-log4j-${version}.tar.gz apache-log4j-${version}.zip"/>
	  </checksum>
	  <exec executable="gpg" dir="${dist.images}">
	      <arg value="--armor"/>
	      <arg value="--output"/>
	      <arg value="apache-log4j-${version}.tar.gz.asc"/>
	      <arg value="--detach-sig"/>
	      <arg value="apache-log4j-${version}.tar.gz"/>	      
	  </exec>           
	  <exec executable="gpg" dir="${dist.images}">
	      <arg value="--armor"/>
	      <arg value="--output"/>
	      <arg value="apache-log4j-${version}.zip.asc"/>
	      <arg value="--detach-sig"/>
	      <arg value="apache-log4j-${version}.zip"/>	      
	  </exec>           
   </target>

<target name="fixcrlf" depends="init"
    description="Fixes CR-LF and tabs in source files">
    <fixcrlf srcDir="."
       includes="**/*.java **/build.xml"
       tab="remove"
       tablength="3"/>
</target>

</project>


[See repo JSON]