-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.xml
102 lines (90 loc) · 3.9 KB
/
build.xml
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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project name="ftp4j" default="rel">
<property file="${basedir}/build.properties" />
<target name="clean">
<delete dir="${ftp4j.dirs.tmp}" />
<delete dir="${ftp4j.dirs.api}"/>
<delete dir="${ftp4j.dirs.bin}" />
<delete file="${ftp4j.files.rel}"/>
<delete file="${basedir}/ftp4j.pom"/>
</target>
<target name="compile">
<ant target="bin"/>
</target>
<target name="bin">
<delete dir="${ftp4j.dirs.bin}" />
<mkdir dir="${ftp4j.dirs.bin}" />
<mkdir dir="${ftp4j.dirs.classes}"/>
<javac srcdir="${ftp4j.dirs.src}" destdir="${ftp4j.dirs.classes}" includes="it/sauronsoftware/ftp4j/**" source="1.4" target="1.4" debug="true" />
<copy todir="${ftp4j.dirs.classes}">
<fileset dir="${ftp4j.dirs.src}">
<exclude name="**/*.java" />
<exclude name="**/package.html" />
</fileset>
</copy>
</target>
<target name="jar" depends="bin">
<jar destfile="${ftp4j.files.jar}" basedir="${ftp4j.dirs.classes}" compress="true" />
<checksum file="${ftp4j.files.jar}" algorithm="MD5" fileext=".md5"/>
<checksum file="${ftp4j.files.jar}" algorithm="SHA1" fileext=".sha1"/>
</target>
<target name="jardoc" depends="doc">
<jar destfile="${ftp4j.files.jardoc}" basedir="${ftp4j.dirs.api}" compress="true" />
<checksum file="${ftp4j.files.jardoc}" algorithm="MD5" fileext=".md5"/>
<checksum file="${ftp4j.files.jardoc}" algorithm="SHA1" fileext=".sha1"/>
</target>
<target name="jarsource">
<jar destfile="${ftp4j.files.jarsource}" basedir="${ftp4j.dirs.src}" compress="true"/>
<checksum file="${ftp4j.files.jarsource}" algorithm="MD5" fileext=".md5"/>
<checksum file="${ftp4j.files.jarsource}" algorithm="SHA1" fileext=".sha1"/>
</target>
<target name="doc">
<delete dir="${ftp4j.dirs.api}" />
<mkdir dir="${ftp4j.dirs.api}" />
<javadoc sourcepath="${ftp4j.dirs.src}" destdir="${ftp4j.dirs.api}" doctitle="ftp4j ${version}" access="protected" author="true" version="true" verbose="true">
<package name="it.sauronsoftware.ftp4j.*" />
<excludepackage name="it.sauronsoftware.ftp4j.base64" />
</javadoc>
</target>
<target name="pom">
<copy file="${basedir}/ftp4j.pom.template" tofile="${basedir}/ftp4j.pom" overwrite="true"/>
<replace file="${basedir}/ftp4j.pom" propertyFile="${basedir}/build.properties">
<replacefilter property="version">
<replacetoken><![CDATA[${version}]]></replacetoken>
</replacefilter>
</replace>
</target>
<target name="dist" >
<ant target="rel"/>
<ant target="pom"/>
</target>
<target name="rel" depends="bin,jar,jardoc,jarsource">
<delete dir="${ftp4j.dirs.tmp}" />
<mkdir dir="${ftp4j.dirs.tmp}" />
<property name="ftp4j.dirs.rel" value="${ftp4j.dirs.tmp}/ftp4j-${version}"/>
<mkdir dir="${ftp4j.dirs.rel}" />
<copy todir="${ftp4j.dirs.rel}" verbose="true">
<fileset dir="${basedir}" includes="LICENSE.txt" />
<fileset dir="${basedir}" includes="README.txt" />
<fileset dir="${basedir}" includes="CHANGELOG.txt" />
<fileset dir="${basedir}" includes="BUILD.txt" />
<fileset dir="${basedir}" includes="build.properties" />
<fileset dir="${basedir}" includes="build.xml" />
<fileset dir="${basedir}" includes="ftp4j.pom.template" />
</copy>
<mkdir dir="${ftp4j.dirs.rel}/bin"/>
<copy todir="${ftp4j.dirs.rel}/bin" verbose="true">
<fileset dir="${ftp4j.dirs.bin}" excludes="classes/**" />
</copy>
<mkdir dir="${ftp4j.dirs.rel}/src" />
<copy todir="${ftp4j.dirs.rel}/src" verbose="true">
<fileset dir="${ftp4j.dirs.src}" includes="it/sauronsoftware/ftp4j/**" />
</copy>
<mkdir dir="${ftp4j.dirs.rel}/doc" />
<copy todir="${ftp4j.dirs.rel}/doc" verbose="true">
<fileset dir="${ftp4j.dirs.doc}" />
</copy>
<zip destfile="${ftp4j.files.rel}" basedir="${ftp4j.dirs.tmp}" includes="ftp4j-${version}/**" />
<delete dir="${ftp4j.dirs.tmp}" />
</target>
</project>