-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.xml
135 lines (121 loc) · 4.18 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<?xml version="1.0"?>
<!-- $Id: build.xml,v 1.15 2004/09/04 12:15:48 taganaka Exp $ -->
<project name="rsslib4j" default="init" basedir=".">
<description>
rsslib4j build file
</description>
<property name="src" location="src" value="src"/>
<property name="build" location="build"/>
<property name="lib" location="lib" value="lib"/>
<property name="bin" location="bin"/>
<property name="javadoc" location="javadoc" value="javadoc"/>
<property name="libsrc" location="${lib}/src"/>
<property name="version" value="0.2"/>
<property name="prgname" value="rsslib4j"/>
<property name="jarfile" value="${prgname}-${version}.jar"/>
<property name="dist-bin" location="${prgname}-bin-${version}" value="${prgname}-bin-${version}"/>
<property name="dist-src" location="${prgname}-src-${version}" value="${prgname}-src-${version}"/>
<property name="mainclass" value="org.gnu.stealthp.rsslib.Test"/>
<!-- Create init structure -->
<target name="init" description="Creates the Environment">
<tstamp/>
<mkdir dir="${build}"/>
<mkdir dir="${bin}"/>
</target>
<!-- Make application -->
<target name="make" depends="init" description="Compiles the Source into ./build">
<javac destdir="${build}" deprecation="yes" debug="true" source="1.4">
<classpath>
<fileset dir="${lib}">
<include name="**/*.jar"/>
</fileset>
</classpath>
<src path="${src}"/>
</javac>
</target>
<target name="jar" depends="make">
<jar jarfile="${bin}/${jarfile}" update="true" index="true" basedir="${build}">
<manifest>
<attribute name="Main-Class" value="${mainclass}"/>
</manifest>
</jar>
</target>
<target name="dist-bin" depends="make,jar,javadoc" description="Create a distribution">
<delete dir="${dist-bin}"/>
<mkdir dir="${dist-bin}"/>
<copy todir="${dist-bin}/${lib}">
<fileset dir="${lib}"/>
</copy>
<copy todir="${dist-bin}/${javadoc}">
<fileset dir="${javadoc}"/>
</copy>
<copy todir="${dist-bin}">
<fileset dir="./" includes="*.txt"/>
<fileset dir="./" includes="*.xml"/>
<fileset dir="./" includes="classpath"/>
<fileset dir="./" includes="runtest"/>
</copy>
<copy file="${bin}/${jarfile}" todir="${dist-bin}"/>
<exec executable="chmod" os="Linux">
<arg line="+x ${dist-bin}/classpath ${dist-bin}/runtest"/>
</exec>
<tar tarfile="${dist-bin}.tgz" compression="gzip">
<tarfileset dir="${dist-bin}" prefix="${dist-bin}"/>
</tar>
<delete dir="${dist-bin}"/>
</target>
<target name="dist-all" depends="dist-bin,dist-src" description="Create a distribution"/>
<target name="dist-src" depends="make,jar,javadoc" description="Create a distribution">
<delete dir="${dist-src}"/>
<mkdir dir="${dist-src}"/>
<copy todir="${dist-src}/${lib}">
<fileset dir="${lib}"/>
</copy>
<copy todir="${dist-src}/${src}">
<fileset dir="${src}"/>
</copy>
<copy todir="${dist-src}">
<fileset dir="./" includes="*.txt"/>
<fileset dir="./" includes="*.xml"/>
<fileset dir="./" includes="classpath"/>
<fileset dir="./" includes="runtest"/>
</copy>
<copy todir="${dist-src}/${javadoc}">
<fileset dir="${javadoc}"/>
</copy>
<!--copy file="${bin}/${jarfile}" todir="${dist-src}"/-->
<exec executable="chmod" os="Linux">
<arg line="+x ${dist-src}/classpath ${dist-src}/runtest"/>
</exec>
<tar tarfile="${dist-src}.tgz" compression="gzip">
<tarfileset dir="${dist-src}" prefix="${dist-src}"/>
</tar>
<delete dir="${dist-src}"/>
</target>
<target name="clean" description="Remove the creatable Stuff">
<delete dir="${build}"/>
<delete dir="${bin}"/>
<delete dir="${dist-bin}"/>
<delete dir="${dist-src}"/>
</target>
<target name="javadoc" depends="make">
<mkdir dir="${javadoc}"/>
<javadoc
packagenames="*, "
sourcepath="${src}"
destdir="${javadoc}"
windowtitle="${prgname}RSS Parser API Documentation"
header="${prgname}"
use="true"
version="true"
author="true"
private="true"
>
<classpath>
<fileset dir="${lib}">
<include name="**/*.jar"/>
</fileset>
</classpath>
</javadoc>
</target>
</project>