-
Notifications
You must be signed in to change notification settings - Fork 39
/
build.xml
69 lines (69 loc) · 2.73 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
<?xml version="1.0" encoding="utf-8"?>
<project name="jAlbum" basedir="." default="all">
<property name="dedup.dir" location="dedup"/>
<property name="photoweb.dir" location="photoweb"/>
<property name="distribute.dir" location="distribute"/>
<property name="scripts.dir" location="scripts"/>
<target name="test" depends="release"/>
<target name="all">
<ant antfile="build.xml" dir="${dedup.dir}" target="jar"/>
<ant antfile="build.xml" dir="${photoweb.dir}" target="war"/>
<mkdir dir="${distribute.dir}"/>
<mkdir dir="${distribute.dir}/lib"/>
<mkdir dir="${distribute.dir}/lib/extra"/>
<mkdir dir="${distribute.dir}/log"/>
<move todir="${distribute.dir}" overwrite="true">
<fileset dir="${dedup.dir}">
<include name="start.jar"/>
</fileset>
<fileset dir="${photoweb.dir}/dist">
<include name="root.war"/>
</fileset>
</move>
<copy todir="${distribute.dir}" overwrite="false">
<fileset dir="${dedup.dir}">
<include name="dedup.db"/>
<include name="favicon.ico"/>
<include name="jalbum.xml"/>
<include name="keystore"/>
<include name="log4j.xml"/>
</fileset>
<fileset dir="${scripts.dir}">
<include name="start.sh"/>
<include name="start.bat"/>
<include name="readme.txt"/>
</fileset>
</copy>
<copy todir="${distribute.dir}/lib" overwrite="true">
<fileset dir="${dedup.dir}/lib"/>
</copy>
<copy todir="${distribute.dir}/lib/extra" overwrite="true">
<fileset dir="${photoweb.dir}/lib">
<exclude name="jetty-io-8.0.0.M2.jar"/>
<exclude name="jetty-server-8.0.0.M2.jar"/>
</fileset>
</copy>
<copy todir="${distribute.dir}/js" overwrite="true">
<fileset dir="${dedup.dir}/js"/>
</copy>
<ant antfile="build.xml" dir="${dedup.dir}" target="clean"/>
<ant antfile="build.xml" dir="${photoweb.dir}" target="clean"/>
</target>
<target name="release" depends="all">
<mkdir dir="${distribute.dir}/relase_tmp"/>
<copy todir="${distribute.dir}/relase_tmp" overwrite="true">
<fileset dir="${dedup.dir}">
<include name="jalbum.xml"/>
<include name="log4j.xml"/>
<include name="keystore"/>
</fileset>
</copy>
<fixcrlf srcdir="${distribute.dir}/relase_tmp" includes="**/*.xml" eol="crlf"/>
<zip destfile="jAlbum_release.zip">
<zipfileset dir="${distribute.dir}" excludes=".svn/**, thumbnail/**, log/**, relase_tmp/**, dedup.db, log4j.xml, jalbum.xml"/>
<zipfileset dir="${dedup.dir}" includes="dedup.db"/>
<zipfileset dir="${distribute.dir}/relase_tmp" includes="log4j.xml, jalbum.xml, keystore"/>
</zip>
<delete dir="${distribute.dir}/relase_tmp"/>
</target>
</project>