-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.xml
135 lines (113 loc) · 4.42 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
135
<?xml version="1.0"?>
<!--
# THIS IS THE ANOMICFTPD BUILD SCRIPT
# YOU CAN USE IT TO COMPILE YOUR OWN RELEASE
# THE TARGET OF THE COMPILATION CAN BE FOUND
# IN THE 'RELEASE' DIRECTORY AFTERWARDS
# YOU NEED APACHE ANT TO USE THIS SCRIPT
# ==========================================
# This Software is Copyrighted
# (C) by Michael Peter Christen; [email protected]
# first published on http://yacy.net
# Frankfurt, Germany, 2009
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-->
<project name="AnomicFTPD" default="all" basedir=".">
<description>
AnomicFTPD - a ftp file server
</description>
<tstamp>
<format property="REPL_DATE_FORMAT" pattern="yyyymmdd" />
</tstamp>
<property name="src" location="src"/>
<property name="build" value="build"/>
<property name="lib" value="lib"/>
<property name="doc" value="doc"/>
<property name="dist" value="dist"/>
<property name="release" value="RELEASE"/>
<property name="releaseFile" value="AnomicFTPD_v0.98_build20101120.tar.gz"/>
<property name="parentDir" value="AnomicFTPD"/>
<property name="accessRightsDir" value="755"/>
<property name="accessRightsExec" value="755"/>
<property name="accessRightsFile" value="644"/>
<property name="release_main" location="${release}/MAIN"/>
<target name="init">
<tstamp/>
<mkdir dir="${build}"/>
</target>
<target name="clean">
<delete dir="${build}"/>
</target>
<target name="compile" depends="init" description="compile the source " >
<javac srcdir="${src}" destdir="${build}">
<compilerarg line="-Xlint:unchecked" />
<compilerarg line="-target 1.1" />
<compilerarg line="-source 1.2" />
</javac>
<mkdir dir="${lib}" />
<jar jarfile="${lib}/AnomicFTPD.jar" basedir="${build}"/>
</target>
<target name="copy" depends="compile">
<!-- copy docs -->
<copy todir="${release_main}/lib">
<fileset dir="${lib}" includes="**/*"/>
</copy>
<!-- copy libs, including the main class files in the lib -->
<copy todir="${release_main}/doc">
<fileset dir="${doc}" includes="**/*"/>
</copy>
<!-- copy configuration files -->
<copy todir="${release_main}">
<fileset dir=".">
<!-- copy configuration files -->
<include name="ftpd.accounts"/>
<include name="ftpd.groups"/>
<include name="ftpd.init"/>
<include name="gpl.txt"/>
<include name="readme.txt"/>
<!-- copy Unix wrappers -->
<include name="ftpd.bat"/>
<include name="ftpd.command"/>
<include name="ftpd.sh"/>
<!-- copy development tools -->
<include name="build.xml"/>
<!-- exclude classes path -->
<exclude name="classes"/>
</fileset>
</copy>
<!-- copy source code -->
<copy todir="${release_main}/src">
<fileset dir="${src}">
<include name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="dist" depends="copy,compile" description="generate the release" >
<tar destfile="${release}/${releaseFile}" compression="gzip" defaultexcludes="yes" longfile="fail">
<tarfileset dir="${release_main}" prefix="${parentDir}/" dirmode="${accessRightsDir}" mode="${accessRightsExec}">
<include name="**/*.sh"/>
<include name="**/*.command"/>
</tarfileset>
<tarfileset dir="${release_main}" prefix="${parentDir}/" dirmode="${accessRightsDir}" mode="${accessRightsFile}" >
<include name="**/*"/>
<exclude name="**/*.sh"/>
<exclude name="**/*.command"/>
</tarfileset>
</tar>
<delete dir="${release_main}"/>
</target>
<target name="all" description="make project" depends="dist">
<echo>making all</echo>
</target>
</project>