714 |
30 May 08 |
nicklas |
1 |
<?xml version="1.0" encoding="UTF-8"?> |
716 |
02 Jun 08 |
nicklas |
2 |
<!-- |
716 |
02 Jun 08 |
nicklas |
$Id $ |
716 |
02 Jun 08 |
nicklas |
4 |
|
716 |
02 Jun 08 |
nicklas |
Copyright (C) 2008 Nicklas Nordborg |
716 |
02 Jun 08 |
nicklas |
6 |
|
1381 |
15 Aug 11 |
martin |
This file is part of the FTP Server extension for BASE. |
716 |
02 Jun 08 |
nicklas |
Available at http://baseplugins.thep.lu.se/ |
1381 |
15 Aug 11 |
martin |
BASE main site: http://base.thep.lu.se/ |
1381 |
15 Aug 11 |
martin |
10 |
|
1381 |
15 Aug 11 |
martin |
This is free software; you can redistribute it and/or |
716 |
02 Jun 08 |
nicklas |
modify it under the terms of the GNU General Public License |
1381 |
15 Aug 11 |
martin |
as published by the Free Software Foundation; either version 3 |
716 |
02 Jun 08 |
nicklas |
of the License, or (at your option) any later version. |
1381 |
15 Aug 11 |
martin |
15 |
|
1381 |
15 Aug 11 |
martin |
The software is distributed in the hope that it will be useful, |
716 |
02 Jun 08 |
nicklas |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
716 |
02 Jun 08 |
nicklas |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
716 |
02 Jun 08 |
nicklas |
GNU General Public License for more details. |
1381 |
15 Aug 11 |
martin |
20 |
|
716 |
02 Jun 08 |
nicklas |
You should have received a copy of the GNU General Public License |
1381 |
15 Aug 11 |
martin |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
716 |
02 Jun 08 |
nicklas |
23 |
--> |
714 |
30 May 08 |
nicklas |
24 |
<project |
985 |
11 Mar 09 |
nicklas |
25 |
name="FtpServerExtension" |
714 |
30 May 08 |
nicklas |
26 |
default="jar" |
714 |
30 May 08 |
nicklas |
27 |
basedir="."> |
714 |
30 May 08 |
nicklas |
28 |
|
714 |
30 May 08 |
nicklas |
<!--create this file if you need to override values from properties below --> |
714 |
30 May 08 |
nicklas |
30 |
<property file="build.properties" /> |
714 |
30 May 08 |
nicklas |
31 |
|
714 |
30 May 08 |
nicklas |
<!-- variables used --> |
714 |
30 May 08 |
nicklas |
33 |
<property name="name" value="base-ftpserver" /> |
2589 |
18 Aug 14 |
nicklas |
34 |
<property name="version" value="1.5-dev" /> |
714 |
30 May 08 |
nicklas |
35 |
<property name="src" location="src" description="Location of source files" /> |
714 |
30 May 08 |
nicklas |
36 |
<property name="build" location="build" description="Location of compiled files" /> |
714 |
30 May 08 |
nicklas |
37 |
<property name="jar.name" value="${name}.jar" |
714 |
30 May 08 |
nicklas |
38 |
description="Name of JAR file with the extensions." /> |
714 |
30 May 08 |
nicklas |
39 |
<property name="tar.prefix" value="${name}-${version}" |
714 |
30 May 08 |
nicklas |
40 |
description="Prefix of .tar.gz file for download." /> |
714 |
30 May 08 |
nicklas |
41 |
<property name="tar.name" value="${tar.prefix}.tar.gz" |
714 |
30 May 08 |
nicklas |
42 |
description="Full name of .tar.gz file for download." /> |
714 |
30 May 08 |
nicklas |
43 |
<property name="javac.arg" value="-Xlint:unchecked" /> |
2281 |
13 Mar 14 |
nicklas |
44 |
<property name="javac.source" value="1.7" /> |
2281 |
13 Mar 14 |
nicklas |
45 |
<property name="javac.target" value="1.7" /> |
1025 |
07 Apr 09 |
nicklas |
46 |
<property name="javac.encoding" value="UTF-8" /> |
1398 |
05 Oct 11 |
nicklas |
47 |
<property name="depend.base-version" |
2281 |
13 Mar 14 |
nicklas |
48 |
value="3.3.0" |
1398 |
05 Oct 11 |
nicklas |
49 |
description="The BASE version that this project depends on." |
1398 |
05 Oct 11 |
nicklas |
50 |
/> |
1398 |
05 Oct 11 |
nicklas |
51 |
<property name="depend.jars" |
2753 |
08 Oct 14 |
nicklas |
52 |
value="http://base.thep.lu.se/chrome/site/files/base/jars/${depend.base-version}" |
1398 |
05 Oct 11 |
nicklas |
53 |
description="The location of the BASE core JARs that this project depends on." |
1398 |
05 Oct 11 |
nicklas |
54 |
/> |
714 |
30 May 08 |
nicklas |
55 |
|
714 |
30 May 08 |
nicklas |
<!-- set up classpath for compiling --> |
714 |
30 May 08 |
nicklas |
57 |
<path id="classpath"> |
714 |
30 May 08 |
nicklas |
58 |
<fileset dir="lib"> |
714 |
30 May 08 |
nicklas |
59 |
<include name="**/*.jar" /> |
714 |
30 May 08 |
nicklas |
60 |
</fileset> |
1382 |
19 Aug 11 |
martin |
61 |
<fileset dir="META-INF/lib"> |
1382 |
19 Aug 11 |
martin |
62 |
<include name="**/*.jar" /> |
1382 |
19 Aug 11 |
martin |
63 |
</fileset> |
714 |
30 May 08 |
nicklas |
64 |
</path> |
714 |
30 May 08 |
nicklas |
65 |
|
714 |
30 May 08 |
nicklas |
66 |
<target name="init"> |
714 |
30 May 08 |
nicklas |
67 |
<mkdir dir="${build}" /> |
714 |
30 May 08 |
nicklas |
68 |
</target> |
714 |
30 May 08 |
nicklas |
69 |
|
714 |
30 May 08 |
nicklas |
70 |
<target name="clean"> |
714 |
30 May 08 |
nicklas |
71 |
<delete failonerror="false" includeemptydirs="true"> |
714 |
30 May 08 |
nicklas |
72 |
<fileset dir="${build}" defaultexcludes="no" /> |
714 |
30 May 08 |
nicklas |
73 |
<fileset file="${jar.name}" /> |
714 |
30 May 08 |
nicklas |
74 |
<fileset file="${tar.name}" /> |
714 |
30 May 08 |
nicklas |
75 |
</delete> |
714 |
30 May 08 |
nicklas |
76 |
</target> |
714 |
30 May 08 |
nicklas |
77 |
|
714 |
30 May 08 |
nicklas |
78 |
<target |
714 |
30 May 08 |
nicklas |
79 |
name="package" |
714 |
30 May 08 |
nicklas |
80 |
depends="clean,jar" |
714 |
30 May 08 |
nicklas |
81 |
description="Clean and create binary distribution package" |
714 |
30 May 08 |
nicklas |
82 |
> |
714 |
30 May 08 |
nicklas |
83 |
<tar |
714 |
30 May 08 |
nicklas |
84 |
destfile="${tar.name}" |
714 |
30 May 08 |
nicklas |
85 |
longfile="gnu" |
714 |
30 May 08 |
nicklas |
86 |
compression="gzip" |
714 |
30 May 08 |
nicklas |
87 |
> |
714 |
30 May 08 |
nicklas |
88 |
<tarfileset |
714 |
30 May 08 |
nicklas |
89 |
dir="." |
714 |
30 May 08 |
nicklas |
90 |
prefix="${tar.prefix}" |
714 |
30 May 08 |
nicklas |
91 |
preserveLeadingSlashes="true" |
1382 |
19 Aug 11 |
martin |
92 |
includes="${jar.name},README,LICENSE*,ftp-config.xml" |
714 |
30 May 08 |
nicklas |
93 |
/> |
714 |
30 May 08 |
nicklas |
94 |
</tar> |
714 |
30 May 08 |
nicklas |
95 |
</target> |
714 |
30 May 08 |
nicklas |
96 |
|
714 |
30 May 08 |
nicklas |
97 |
<target |
714 |
30 May 08 |
nicklas |
98 |
name="jar" |
714 |
30 May 08 |
nicklas |
99 |
depends="build" |
714 |
30 May 08 |
nicklas |
100 |
description="Creates the extension JAR file" |
714 |
30 May 08 |
nicklas |
101 |
> |
1382 |
19 Aug 11 |
martin |
102 |
|
714 |
30 May 08 |
nicklas |
103 |
<jar |
714 |
30 May 08 |
nicklas |
104 |
jarfile="${jar.name}" |
714 |
30 May 08 |
nicklas |
105 |
manifest="META-INF/MANIFEST.MF" |
1382 |
19 Aug 11 |
martin |
106 |
> |
714 |
30 May 08 |
nicklas |
107 |
<fileset dir="${build}" /> |
714 |
30 May 08 |
nicklas |
108 |
<fileset dir="." includes="META-INF/**" /> |
714 |
30 May 08 |
nicklas |
109 |
<fileset dir="." includes="resources/**" /> |
714 |
30 May 08 |
nicklas |
110 |
</jar> |
714 |
30 May 08 |
nicklas |
111 |
</target> |
714 |
30 May 08 |
nicklas |
112 |
|
714 |
30 May 08 |
nicklas |
113 |
<target |
714 |
30 May 08 |
nicklas |
114 |
name="build" |
714 |
30 May 08 |
nicklas |
115 |
depends="init,checkjar" |
714 |
30 May 08 |
nicklas |
116 |
description="Compiles the plugin and put in jar" |
714 |
30 May 08 |
nicklas |
117 |
> |
714 |
30 May 08 |
nicklas |
118 |
<mkdir dir="${build}" /> |
714 |
30 May 08 |
nicklas |
119 |
<javac |
714 |
30 May 08 |
nicklas |
120 |
encoding="${javac.encoding}" |
714 |
30 May 08 |
nicklas |
121 |
srcdir="${src}" |
714 |
30 May 08 |
nicklas |
122 |
destdir="${build}" |
714 |
30 May 08 |
nicklas |
123 |
debug="true" |
714 |
30 May 08 |
nicklas |
124 |
classpathref="classpath" |
714 |
30 May 08 |
nicklas |
125 |
source="${javac.source}" |
714 |
30 May 08 |
nicklas |
126 |
target="${javac.target}" |
1230 |
19 Aug 10 |
nicklas |
127 |
includeantruntime="false" |
714 |
30 May 08 |
nicklas |
128 |
> |
714 |
30 May 08 |
nicklas |
129 |
<compilerarg value="${javac.arg}" /> |
714 |
30 May 08 |
nicklas |
130 |
</javac> |
714 |
30 May 08 |
nicklas |
131 |
</target> |
714 |
30 May 08 |
nicklas |
132 |
|
1399 |
10 Oct 11 |
nicklas |
133 |
<target |
1399 |
10 Oct 11 |
nicklas |
134 |
name="install" |
1399 |
10 Oct 11 |
nicklas |
135 |
depends="jar" |
1399 |
10 Oct 11 |
nicklas |
136 |
> |
1399 |
10 Oct 11 |
nicklas |
137 |
<fail unless="base.plugins" message="base.plugins is not set to the path of BASE plug-ins directory." /> |
1399 |
10 Oct 11 |
nicklas |
138 |
<copy todir="${base.plugins}"> |
1399 |
10 Oct 11 |
nicklas |
139 |
<fileset file="${jar.name}" /> |
1399 |
10 Oct 11 |
nicklas |
140 |
</copy> |
1399 |
10 Oct 11 |
nicklas |
141 |
<echo>Copied '${jar.name}' to '${base.plugins}'.</echo> |
1399 |
10 Oct 11 |
nicklas |
142 |
</target> |
1399 |
10 Oct 11 |
nicklas |
143 |
|
1241 |
07 Sep 10 |
nicklas |
144 |
<target name="update-version"> |
1241 |
07 Sep 10 |
nicklas |
145 |
<echo>Setting version to: ${version}</echo> |
1241 |
07 Sep 10 |
nicklas |
146 |
<echo>extensions.xml</echo> |
1241 |
07 Sep 10 |
nicklas |
147 |
<replaceregexp |
1241 |
07 Sep 10 |
nicklas |
148 |
file="META-INF/extensions.xml" |
1241 |
07 Sep 10 |
nicklas |
149 |
match="<version>.*</version>" |
1241 |
07 Sep 10 |
nicklas |
150 |
replace="<version>${version}</version>" |
1241 |
07 Sep 10 |
nicklas |
151 |
encoding="UTF-8" |
1241 |
07 Sep 10 |
nicklas |
152 |
/> |
1398 |
05 Oct 11 |
nicklas |
153 |
<replaceregexp |
1398 |
05 Oct 11 |
nicklas |
154 |
file="META-INF/extensions.xml" |
1398 |
05 Oct 11 |
nicklas |
155 |
match="<min-base-version>.*</min-base-version>" |
1398 |
05 Oct 11 |
nicklas |
156 |
replace="<min-base-version>${depend.base-version}</min-base-version>" |
1398 |
05 Oct 11 |
nicklas |
157 |
encoding="UTF-8" |
1398 |
05 Oct 11 |
nicklas |
158 |
/> |
1241 |
07 Sep 10 |
nicklas |
159 |
<echo>Don't forget to commit the changes to the subversion repository!</echo> |
1241 |
07 Sep 10 |
nicklas |
160 |
</target> |
1241 |
07 Sep 10 |
nicklas |
161 |
|
714 |
30 May 08 |
nicklas |
162 |
<target |
714 |
30 May 08 |
nicklas |
163 |
name="checkjar" |
1398 |
05 Oct 11 |
nicklas |
164 |
description="Checks that the required BASE JAR files exists." |
714 |
30 May 08 |
nicklas |
165 |
> |
714 |
30 May 08 |
nicklas |
166 |
<available classname="net.sf.basedb.core.Application" |
1382 |
19 Aug 11 |
martin |
167 |
classpathref="classpath" property="basecore" /> |
714 |
30 May 08 |
nicklas |
168 |
<available classname="net.sf.basedb.clients.web.extensions.menu.FixedMenuItemFactory" |
1382 |
19 Aug 11 |
martin |
169 |
classpathref="classpath" property="baseweb" /> |
1398 |
05 Oct 11 |
nicklas |
170 |
<fail unless="basecore" message="Can't find base-core-${depend.base-version}.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." /> |
1398 |
05 Oct 11 |
nicklas |
171 |
<fail unless="baseweb" message="Can't find base-webclient-${depend.base-version}.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." /> |
1398 |
05 Oct 11 |
nicklas |
172 |
<echo>Found all requried BASE core JAR files.</echo> |
714 |
30 May 08 |
nicklas |
173 |
</target> |
714 |
30 May 08 |
nicklas |
174 |
|
714 |
30 May 08 |
nicklas |
175 |
<target |
714 |
30 May 08 |
nicklas |
176 |
name="download-lib" |
1398 |
05 Oct 11 |
nicklas |
177 |
description="Download BASE JAR files" |
714 |
30 May 08 |
nicklas |
178 |
> |
714 |
30 May 08 |
nicklas |
179 |
<echo> |
714 |
30 May 08 |
nicklas |
180 |
------------------------------------------------------- |
714 |
30 May 08 |
nicklas |
181 |
NOTE! You may specifiy a different download location by |
714 |
30 May 08 |
nicklas |
182 |
creating the file './build.properties' and |
714 |
30 May 08 |
nicklas |
183 |
setting 'depend.jars' to the URL to download from. |
714 |
30 May 08 |
nicklas |
184 |
------------------------------------------------------- |
714 |
30 May 08 |
nicklas |
185 |
</echo> |
1398 |
05 Oct 11 |
nicklas |
186 |
<download-lib file="base-core-${depend.base-version}.jar" /> |
1398 |
05 Oct 11 |
nicklas |
187 |
<download-lib file="base-webclient-${depend.base-version}.jar" /> |
714 |
30 May 08 |
nicklas |
188 |
</target> |
714 |
30 May 08 |
nicklas |
189 |
|
714 |
30 May 08 |
nicklas |
190 |
<macrodef name="download-lib" description="Download BASE core JAR files"> |
714 |
30 May 08 |
nicklas |
191 |
<attribute name="file" /> |
714 |
30 May 08 |
nicklas |
192 |
<sequential> |
714 |
30 May 08 |
nicklas |
193 |
<get |
714 |
30 May 08 |
nicklas |
194 |
dest="lib/compile/@{file}" |
1398 |
05 Oct 11 |
nicklas |
195 |
src="${depend.jars}/@{file}" |
714 |
30 May 08 |
nicklas |
196 |
usetimestamp="true" |
714 |
30 May 08 |
nicklas |
197 |
verbose="true" |
714 |
30 May 08 |
nicklas |
198 |
ignoreerrors="true" |
714 |
30 May 08 |
nicklas |
199 |
/> |
714 |
30 May 08 |
nicklas |
200 |
</sequential> |
714 |
30 May 08 |
nicklas |
201 |
</macrodef> |
714 |
30 May 08 |
nicklas |
202 |
</project> |