Author: rdonkin
Date: Sun Sep 14 02:37:36 2008
New Revision: 695162
URL: http://svn.apache.org/viewvc?rev=695162&view=rev
Log:
Formatted build file.
Modified:
james/mailet/api/trunk/build.xml
Modified: james/mailet/api/trunk/build.xml
URL:
http://svn.apache.org/viewvc/james/mailet/api/trunk/build.xml?rev=695162&r1=695161&r2=695162&view=diff
==============================================================================
--- james/mailet/api/trunk/build.xml (original)
+++ james/mailet/api/trunk/build.xml Sun Sep 14 02:37:36 2008
@@ -2,9 +2,6 @@
<!--
==========================================================================
-Mailet build file
-
-
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
@@ -30,21 +27,21 @@
Give user a chance to override without editing this file
(and without typing -D each time he compiles it)
-->
- <property file=".ant.properties"/>
- <property file="${user.home}/.ant.properties"/>
- <property file="include.properties"/>
- <property file="default.properties"/>
+ <property file=".ant.properties" />
+ <property file="${user.home}/.ant.properties" />
+ <property file="include.properties" />
+ <property file="default.properties" />
<!--
===================================================================
Set the classpath
===================================================================
- -->
+ -->
<path id="project.class.path">
- <pathelement path="${junit.jar}"/>
- <pathelement path="${javax-mail.jar}"/>
- <pathelement path="${javax-activation.jar}"/>
+ <pathelement path="${junit.jar}" />
+ <pathelement path="${javax-mail.jar}" />
+ <pathelement path="${javax-activation.jar}" />
<pathelement path="${java.class.path}" />
<pathelement path="${build.classes}" />
</path>
@@ -54,7 +51,7 @@
Main target
===================================================================
-->
- <target name="main" depends="dist-lite"/>
+ <target name="main" depends="dist-lite" />
<!--
===================================================================
@@ -64,59 +61,52 @@
-->
<target name="prepare">
- <echo message="Preparing code"/>
+ <echo message="Preparing code" />
- <tstamp/>
- <mkdir dir="${dist.dir}"/>
- <copy todir="${dist.dir}">
- <fileset dir=".">
- <include name="LICENSE.txt"/>
- <include name="README.txt"/>
- <include name="NOTICE.txt"/>
- </fileset>
- </copy>
- <fixcrlf srcdir="${java.dir}" includes="**/*.java" eol="lf" tab="remove"
tablength="4" />
- <fixcrlf srcdir="${java.dir}" includes="**/*.html" eol="lf" tab="remove"
tablength="4" />
- <fixcrlf srcdir="${xdocs.dir}" includes="**/*.xml" eol="lf" tab="remove"
tablength="4" />
- <fixcrlf srcdir="${conf.dir}" includes="**/*.xml" eol="lf" tab="remove"
tablength="4" />
- <fixcrlf srcdir="." includes="build.sh" eol="lf"/>
- <fixcrlf srcdir="." includes="build.bat" eol="crlf"/>
- <fixcrlf srcdir="." includes="build.xml" eol="lf"/>
- <mkdir dir="${build.src}"/>
+ <tstamp />
+ <mkdir dir="${dist.dir}" />
+ <copy todir="${dist.dir}">
+ <fileset dir=".">
+ <include name="LICENSE.txt" />
+ <include name="README.txt" />
+ <include name="NOTICE.txt" />
+ </fileset>
+ </copy>
+ <fixcrlf srcdir="${java.dir}" includes="**/*.java" eol="lf"
tab="remove" tablength="4" />
+ <fixcrlf srcdir="${java.dir}" includes="**/*.html" eol="lf"
tab="remove" tablength="4" />
+ <fixcrlf srcdir="${xdocs.dir}" includes="**/*.xml" eol="lf"
tab="remove" tablength="4" />
+ <fixcrlf srcdir="${conf.dir}" includes="**/*.xml" eol="lf"
tab="remove" tablength="4" />
+ <fixcrlf srcdir="." includes="build.sh" eol="lf" />
+ <fixcrlf srcdir="." includes="build.bat" eol="crlf" />
+ <fixcrlf srcdir="." includes="build.xml" eol="lf" />
+ <mkdir dir="${build.src}" />
</target>
-
+
<!--
===================================================================
compile
===================================================================
-->
- <target name="compile" depends="compile-main"/>
-
+ <target name="compile" depends="compile-main" />
+
<target name="compile-main" depends="prepare">
- <echo message="Compiling Java sources"/>
- <mkdir dir="${build.classes}"/>
- <javac
- destdir="${build.classes}"
- debug="${debug}"
- optimize="${optimize}"
- deprecation="${deprecation}"
- source="${jdk.source}"
- target="${jdk.target}"
- >
- <classpath refid="project.class.path"/>
- <src path="${build.src}"/>
- <src path="${java.dir}"/>
- <include name="org/apache/mailet/**"/>
- <exclude name="**/samples/*/**"/>
- </javac>
- <copy todir="${build.classes}">
- <fileset dir="${java.dir}">
- <include name="**/*.properties"/>
- </fileset>
- </copy>
- <copy todir="${build.classes}/META-INF" file='LICENSE.txt'/>
- <copy todir="${build.classes}/META-INF" file='NOTICE.txt'/>
+ <echo message="Compiling Java sources" />
+ <mkdir dir="${build.classes}" />
+ <javac destdir="${build.classes}" debug="${debug}"
optimize="${optimize}" deprecation="${deprecation}" source="${jdk.source}"
target="${jdk.target}">
+ <classpath refid="project.class.path" />
+ <src path="${build.src}" />
+ <src path="${java.dir}" />
+ <include name="org/apache/mailet/**" />
+ <exclude name="**/samples/*/**" />
+ </javac>
+ <copy todir="${build.classes}">
+ <fileset dir="${java.dir}">
+ <include name="**/*.properties" />
+ </fileset>
+ </copy>
+ <copy todir="${build.classes}/META-INF" file='LICENSE.txt' />
+ <copy todir="${build.classes}/META-INF" file='NOTICE.txt' />
</target>
<!--
@@ -126,28 +116,28 @@
-->
<target name="javadocs" depends="compile">
- <echo message="Making Mailet Javadocs"/>
+ <echo message="Making Mailet Javadocs" />
- <delete dir="${build.javadocs}"/>
- <mkdir dir="${build.javadocs}"/>
- <javadoc failonerror="yes" packagenames="org.apache.mailet.*"
excludepackagenames="org.apache.mailet.samples.*" destdir="${build.javadocs}">
- <sourcepath>
- <pathelement path="${java.dir}"/>
- <pathelement path="${build.src}"/>
- </sourcepath>
- <classpath refid="project.class.path"/>
- <doclet name="com.sun.tools.doclets.standard.Standard">
- <param name="-author"/>
- <param name="-version"/>
- <param name="-use"/>
- <param name="-breakiterator"/>
- <param name="-link" value="http://java.sun.com/j2se/1.4/docs/api"/>
- <param name="-link"
value="http://java.sun.com/j2ee/sdk_1.3/techdocs/api"/>
- <param name="-doctitle" value="${Name} ${version}"/>
- <param name="-windowtitle" value="${Name} API"/>
- <param name="-bottom" value=""Copyright © ${year} Apache
Jakarta Project. All Rights Reserved.""/>
- </doclet>
- </javadoc>
+ <delete dir="${build.javadocs}" />
+ <mkdir dir="${build.javadocs}" />
+ <javadoc failonerror="yes" packagenames="org.apache.mailet.*"
excludepackagenames="org.apache.mailet.samples.*" destdir="${build.javadocs}">
+ <sourcepath>
+ <pathelement path="${java.dir}" />
+ <pathelement path="${build.src}" />
+ </sourcepath>
+ <classpath refid="project.class.path" />
+ <doclet name="com.sun.tools.doclets.standard.Standard">
+ <param name="-author" />
+ <param name="-version" />
+ <param name="-use" />
+ <param name="-breakiterator" />
+ <param name="-link"
value="http://java.sun.com/j2se/1.4/docs/api" />
+ <param name="-link"
value="http://java.sun.com/j2ee/sdk_1.3/techdocs/api" />
+ <param name="-doctitle" value="${Name} ${version}" />
+ <param name="-windowtitle" value="${Name} API" />
+ <param name="-bottom" value=""Copyright © ${year}
Apache Jakarta Project. All Rights Reserved."" />
+ </doclet>
+ </javadoc>
</target>
<!--
@@ -156,8 +146,8 @@
===================================================================
-->
<target name="everything">
- <antcall target="clean"/>
- <antcall target="dist"/>
+ <antcall target="clean" />
+ <antcall target="dist" />
</target>
<!--
@@ -168,30 +158,28 @@
<target name="jar" depends="compile, test">
- <mkdir dir="${build.lib}"/>
+ <mkdir dir="${build.lib}" />
- <!-- Make Mailet jar-->
- <echo message="Making Mailet Jar (${name}-${version}.jar)"/>
- <jar
- jarfile="${build.lib}/${name}-${version}.jar"
- basedir="${build.classes}">
- <include name="org/apache/mailet/**"/>
- <include name="META-INF/**"/>
- <exclude name="**/junit/*/**"/>
- <exclude name="**/samples/*/**"/>
- <manifest>
- <attribute name="Extension-Name" value='${extension.name}'/>
- <attribute name="Specification-Title" value='${title.spec}'/>
- <attribute name="Specification-Vendor" value='${vendor}'/>
- <attribute name="Specification-Version"
value='${manifestVersion}'/>
- <attribute name="Implementation-Vendor-Id" value='${vendor.id}'/>
- <attribute name="Implementation-Title" value='${title.impl}'/>
- <attribute name="Implementation-Vendor" value='${vendor}'/>
- <attribute name="Implementation-Version"
value='${manifestVersion}'/>
- <attribute name="X-Compile-Source-JDK" value='${jdk.source}'/>
- <attribute name="X-Compile-Target-JDK" value='${jdk.target}'/>
- </manifest>
- </jar>
+ <!-- Make Mailet jar-->
+ <echo message="Making Mailet Jar (${name}-${version}.jar)" />
+ <jar jarfile="${build.lib}/${name}-${version}.jar"
basedir="${build.classes}">
+ <include name="org/apache/mailet/**" />
+ <include name="META-INF/**" />
+ <exclude name="**/junit/*/**" />
+ <exclude name="**/samples/*/**" />
+ <manifest>
+ <attribute name="Extension-Name" value='${extension.name}' />
+ <attribute name="Specification-Title" value='${title.spec}' />
+ <attribute name="Specification-Vendor" value='${vendor}' />
+ <attribute name="Specification-Version"
value='${manifestVersion}' />
+ <attribute name="Implementation-Vendor-Id"
value='${vendor.id}' />
+ <attribute name="Implementation-Title" value='${title.impl}' />
+ <attribute name="Implementation-Vendor" value='${vendor}' />
+ <attribute name="Implementation-Version"
value='${manifestVersion}' />
+ <attribute name="X-Compile-Source-JDK" value='${jdk.source}' />
+ <attribute name="X-Compile-Target-JDK" value='${jdk.target}' />
+ </manifest>
+ </jar>
</target>
@@ -200,19 +188,18 @@
Make dist directory with unpacked dist ready to run
===================================================================
-->
-
<target name="dist-lite" depends="jar">
- <echo message="Installing Release Jar to ${dist.dir}"/>
- <copy todir="${dist.dir}">
- <fileset dir="${build.lib}">
- <include name="${name}-${version}.jar"/>
- </fileset>
- </copy>
+ <echo message="Installing Release Jar to ${dist.dir}" />
+ <copy todir="${dist.dir}">
+ <fileset dir="${build.lib}">
+ <include name="${name}-${version}.jar" />
+ </fileset>
+ </copy>
</target>
-
+
<!--
===================================================================
@@ -221,36 +208,32 @@
-->
<target name="dist" depends="dist-lite,javadocs">
- <copy todir='${dist.dir}/api'>
- <fileset dir='${build.javadocs}'/>
- </copy>
- <echo message ="Building binary distribution"/>
- <mkdir dir="${dist.dir}"/>
+ <copy todir='${dist.dir}/api'>
+ <fileset dir='${build.javadocs}' />
+ </copy>
+ <echo message="Building binary distribution" />
+ <mkdir dir="${dist.dir}" />
<zip zipfile="${dist.base}/${dist.name}.zip">
<zipfileset dir="${dist.dir}" prefix="${dist.name}">
</zipfileset>
</zip>
<tar longfile="gnu" tarfile="${dist.base}/${dist.name}.tar">
- <tarfileset
- dir="${dist.dir}"
- username="${name}"
- group="${name}"
- prefix="${dist.name}">
+ <tarfileset dir="${dist.dir}" username="${name}" group="${name}"
prefix="${dist.name}">
</tarfileset>
</tar>
- <gzip zipfile="${dist.base}/${dist.name}.tar.gz"
src="${dist.base}/${dist.name}.tar"/>
- <delete file="${dist.base}/${dist.name}.tar"/>
+ <gzip zipfile="${dist.base}/${dist.name}.tar.gz"
src="${dist.base}/${dist.name}.tar" />
+ <delete file="${dist.base}/${dist.name}.tar" />
</target>
-
+
<!--
===================================================================
delete dist/, build/ and www/
===================================================================
-->
<target name="clean">
- <echo message ="deleting working directories ready for a clean build"/>
- <delete dir="${dist.dir}"/>
- <delete dir="${build.dir}"/>
+ <echo message="deleting working directories ready for a clean build" />
+ <delete dir="${dist.dir}" />
+ <delete dir="${build.dir}" />
</target>
<!--
@@ -259,68 +242,68 @@
===================================================================
-->
<target name="usage">
- <echo message=""/>
- <echo message=""/>
- <echo message="Mailet Build file"/>
- <echo
message="-------------------------------------------------------------"/>
- <echo message=""/>
- <echo message=" available targets are:"/>
- <echo message=""/>
- <echo message=" dist-lite --> generates unpacked distribution
(default)"/>
- <echo message=" test --> tests the compiled classes"/>
- <echo message=" website --> makes all the docs and javadocs"/>
- <echo message=" compile --> compiles the source code"/>
- <echo message=" dist --> generates all the Mailet
distributions, packed"/>
- <echo message=" clean --> cleans up the directory"/>
- <echo message=" xdocs --> creates the documentation for Mailet"/>
- <echo message=" javadocs --> creates the Javadoc"/>
- <echo message=""/>
- <echo message=" See the comments inside the build.xml file for more
details."/>
- <echo
message="-------------------------------------------------------------"/>
- <echo message=""/>
- <echo message=""/>
- </target>
-
- <!--
- ===================================================================
- Compile Tests
- ===================================================================
- -->
+ <echo message="" />
+ <echo message="" />
+ <echo message="Mailet Build file" />
+ <echo
message="-------------------------------------------------------------" />
+ <echo message="" />
+ <echo message=" available targets are:" />
+ <echo message="" />
+ <echo message=" dist-lite --> generates unpacked distribution
(default)" />
+ <echo message=" test --> tests the compiled classes" />
+ <echo message=" website --> makes all the docs and javadocs" />
+ <echo message=" compile --> compiles the source code" />
+ <echo message=" dist --> generates all the Mailet
distributions, packed" />
+ <echo message=" clean --> cleans up the directory" />
+ <echo message=" xdocs --> creates the documentation for Mailet"
/>
+ <echo message=" javadocs --> creates the Javadoc" />
+ <echo message="" />
+ <echo message=" See the comments inside the build.xml file for more
details." />
+ <echo
message="-------------------------------------------------------------" />
+ <echo message="" />
+ <echo message="" />
+ </target>
+
+ <!--
+ ===================================================================
+ Compile Tests
+ ===================================================================
+ -->
<target name="compile-tests" depends="compile" description="Compile the
test code">
<mkdir dir="${test.classes}"/>
<javac destdir="${test.classes}" excludes="**/package.html"
debug="true" deprecation="true" optimize="false">
- <src>
- <pathelement location="src/test/java"/>
- </src>
- <classpath>
- <path refid="project.class.path"/>
- </classpath>
+ <src>
+ <pathelement location="src/test/java"/>
+ </src>
+ <classpath>
+ <path refid="project.class.path"/>
+ </classpath>
</javac>
<copy todir="${test.classes}">
- <fileset dir="src/test/resources"/>
+ <fileset dir="src/test/resources"/>
</copy>
- </target>
+ </target>
<!--
- ===================================================================
- Run Tests
- ===================================================================
- -->
- <target name="test" depends="compile-tests" description="Run the test
cases">
+ ===================================================================
+ Run Tests
+ ===================================================================
+ -->
+ <target name="test" depends="compile-tests" description="Run the test
cases">
<mkdir dir="${test.report}"/>
<junit printSummary="yes" haltonerror="true" haltonfailure="true"
fork="true" dir=".">
- <sysproperty key="basedir" value="."/>
- <formatter type="xml"/>
- <formatter type="plain" usefile="false"/>
- <classpath>
- <path refid="project.class.path"/>
- <pathelement location="${test.classes}"/>
- </classpath>
- <batchtest todir="${test.report}">
- <fileset dir="src/test/java">
- <include name="**/*Test.java"/>
- <exclude name="**/*Abstract*Test.java"/>
- </fileset>
- </batchtest>
+ <sysproperty key="basedir" value="."/>
+ <formatter type="xml"/>
+ <formatter type="plain" usefile="false"/>
+ <classpath>
+ <path refid="project.class.path"/>
+ <pathelement location="${test.classes}"/>
+ </classpath>
+ <batchtest todir="${test.report}">
+ <fileset dir="src/test/java">
+ <include name="**/*Test.java"/>
+ <exclude name="**/*Abstract*Test.java"/>
+ </fileset>
+ </batchtest>
</junit>
- </target>
+ </target>
</project>