/* Copyright (c) SEMM NL All rights reserved.
Author : Paul Hamaker. Part of JavaLessons.com
This code is for educational purposes only. Use at own risk.*/

1. <?xml version="1.0"?> 

2. <!-- === build.xml === --> 

3.  

4. <project name="JLBuild" default="doit" basedir="."

5.  

6.   <property name="dr"   value="somedir" /> 

7.    

8. <!-- ========================= --> 

9.   <target name="cpf" 

10.      description="copy files"

11.  

12.    <mkdir dir="anotherdir"/> 

13.  

14.    <copy todir="anotherdir" 

15.      overwrite="true"

16.     <fileset dir="${dr}"

17.       <exclude name="**/*.tmp"/> 

18.     </fileset> 

19.    </copy> 

20.  

21.   </target> 

22. <!-- ========================= --> 

23.   <target name="doit" 

24.      depends="cpf" 

25.      description="do the work"

26.       

27.    <delete file="some.zip" /> 

28.    

29.    <zip destfile="some.zip" 

30.        basedir="${dr}"  /> 

31.    

32.    <delete dir="${dr}" /> 

33.     

34.    <mkdir dir="classdir" /> 

35.     

36.   <javac srcdir="anotherdir" 

37.          destdir="classdir"  

38.          listfiles="true" /> 

39.    

40.   </target> 

41. </project> 

42.  

43. ===================== 

44. -Ddr=onedir