1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
|
<?xml version="1.0"?>
<!--
Dumbster - a dummy SMTP server
Copyright 2004 Jason Paul Kitchen
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="dumbster" default="world">
<!-- === project configuration ========================================== -->
<property name="release" value="1.6"/>
<property name="srcdir" value="src" />
<property name="etcdir" value="etc" />
<property name="builddir" value="build" />
<property name="docdir" value="doc" />
<property name="stagedir" value="${builddir}/stage" />
<property name="compiledir" value="${builddir}/classes" />
<property name="libdir" value="lib" />
<property name="testsrcdir" value="test-src" />
<property name="testcompiledir" value="${builddir}/test" />
<property name="debug" value="" />
<property name="build.compiler" value="modern" />
<path id="compile.path">
<fileset dir="${libdir}">
<include name="**/*.jar" />
</fileset>
<pathelement location="${compiledir}" />
</path>
<!-- === world ========================================================== -->
<target name="world" depends="jar, test" />
<!-- === compile ======================================================== -->
<target name="compile" depends="init">
<javac srcdir="${srcdir}" destdir="${compiledir}" debug="${debug}">
<classpath refid="compile.path" />
<include name="com/dumbster/smtp/" />
</javac>
</target>
<!-- === jar ============================================================ -->
<target name="jar" depends="compile">
<delete file="${builddir}/dumbster.jar"/>
<jar jarfile="${builddir}/dumbster.jar" basedir="${compiledir}/" />
</target>
<!-- === clean ========================================================== -->
<target name="clean">
<delete dir="${builddir}" />
<delete>
<fileset dir="." includes="**/*~" defaultexcludes="no" />
</delete>
</target>
<!-- === init =========================================================== -->
<target name="init">
<mkdir dir="${compiledir}" />
<mkdir dir="${testcompiledir}" />
</target>
<!-- === Unit test ====================================================== -->
<target name="compile-tests" depends="init">
<javac srcdir="${testsrcdir}" destdir="${testcompiledir}" debug="${debug}">
<classpath refid="compile.path" />
<include name="com/dumbster/smtp/" />
</javac>
</target>
<target name="test" depends="compile-tests">
<junit fork="yes" printsummary="yes" haltonfailure="yes">
<classpath>
<pathelement path="${testcompiledir}" />
<pathelement path="${compiledir}" />
<fileset dir="${libdir}">
<include name="**/*.jar" />
</fileset>
</classpath>
<formatter type="plain"/>
<!-- <test name="com.dumbster.smtp.AllTests" /> -->
<test name="com.dumbster.smtp.SimpleSmtpServerTest" />
<test name="com.dumbster.smtp.SmtpRequestTest" />
<test name="com.dumbster.smtp.BindProblemTest" />
</junit>
</target>
<!-- == Generate javadoc ================================================ -->
<target name="javadoc" depends="compile">
<javadoc destdir="${docdir}">
<fileset dir="src" defaultexcludes="yes">
<include name="com/dumbster/**" />
</fileset>
</javadoc>
</target>
<!-- == Prepare release ================================================= -->
<target name="release" depends="jar">
<zip destfile="dumbster${release}-all.zip" basedir="." includes="*.txt, *.xml, test-src/**, src/**, lib/**">
<zipfileset dir="." includes="build/dumbster.jar" fullpath="dumbster${release}.jar"/>
</zip>
</target>
</project>
|