forked from metanorma/barcode4j
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-dist.xml
134 lines (131 loc) · 5.45 KB
/
build-dist.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"?>
<project default="website" basedir=".">
<import file="${basedir}/build.xml"/>
<property name="docs.dir" value="${build.dir}/javadocs"/>
<property environment="env"/>
<!-- =================================================================== -->
<!-- Website -->
<!-- =================================================================== -->
<target name="site">
<!--
<echo message="Make sure that you have installed Apache Forrest and"/>
<echo message="the FORREST_HOME environment variable is set (see http://forrest.apache.org/)"/>
<echo message="FORREST_HOME = ${forrest.home}"/>
-->
<echo message="Make sure you have a proper Forrest Trunk installation (see http://forrest.apache.org/)"/>
<condition property="forrest.call" value="forrest.bat" else="forrest">
<os family="windows"/>
</condition>
<exec executable="${forrest.call}"/>
</target>
<target name="applet">
<subant target="all">
<dirset dir="${basedir}" includes="examples/demo-applet"/>
</subant>
</target>
<target name="website" depends="package, javadocs, applet, site" description="Creates the whole Barcode4J website in one run">
<mkdir dir="${build.dir}/site"/>
<mkdir dir="${build.dir}/site/trunk/javadocs"/>
<copy todir="${build.dir}/site/trunk/javadocs">
<fileset dir="${docs.dir}"/>
</copy>
<copy todir="${build.dir}/site">
<fileset dir="${basedir}/examples/demo-applet/build">
<include name="barcode4j-demo-applet.jar"/>
</fileset>
</copy>
<copy todir="${build.dir}/site">
<fileset dir="${build.dir}">
<include name="barcode4j-light.jar"/>
</fileset>
</copy>
<tar destfile="${build.dir}/barcode4j-site.tar.gz" basedir="${build.dir}/site" compression="gzip"/>
</target>
<target name="deploy-site" description="Deploys the website to SourceForge"><!-- depends="website"-->
<scp todir="${ssh.uid},[email protected]:/home/groups/b/ba/barcode4j/htdocs " trust="yes" keyfile="${ssh.key}" passphrase="${ssh.key.passphrase}" verbose="true" sftp="true">
<fileset dir="${build.dir}/site"/>
</scp>
</target>
<!-- =================================================================== -->
<!-- Distribution -->
<!-- =================================================================== -->
<target name="dist-clean" depends="clean">
<delete dir="${dist.dir}"/>
</target>
<target name="dist" depends="dist-clean, package, webapp, website" description="Creates the distribution files">
<echo message="Creating the distribution"/>
<property name="rel-name" value="${name}-${version}"/>
<mkdir dir="${dist.dir}/work/bin/${rel-name}/docs"/>
<mkdir dir="${dist.dir}/work/src/${rel-name}"/>
<!-- Copy site (without javasrc) -->
<copy todir="${dist.dir}/work/bin/${rel-name}/docs">
<fileset dir="${build.dir}/site">
<!--exclude name="javasrc/**"/-->
</fileset>
</copy>
<copy todir="${dist.dir}/work/bin/${rel-name}">
<fileset dir="${basedir}/">
<include name="build/*.jar"/>
<include name="build/*.war"/>
<include name="README*"/>
<include name="LICENSE*"/>
<include name="NOTICE*"/>
<include name="barcode.bat"/>
<include name="barcode.cfg"/>
<include name="examples/**"/>
<include name="lib/*.jar"/>
<include name="legal/**"/>
<exclude name="WARNING*"/>
<exclude name="build/*fop-ext-post-0.20.5*"/>
<exclude name="lib/saxon*"/>
<exclude name="**/junit*"/>
<exclude name="examples/**/build/**"/>
<exclude name="examples/xsl-fo/*.bat"/>
<exclude name="**/out/**"/>
</fileset>
</copy>
<copy todir="${dist.dir}/work/src/${rel-name}">
<fileset dir="${basedir}/">
<include name="README*"/>
<include name="LICENSE*"/>
<include name="NOTICE*"/>
<include name="status.xml"/>
<include name="forrest.properties"/>
<include name="properties.xml"/>
<include name="barcode.bat"/>
<include name="barcode.cfg"/>
<include name="build*.xml"/>
<include name="build.properties"/>
<include name="bundle.xml"/>
<include name="ivy*.xml"/>
<include name="ikvm*.txt"/>
<include name="checkstyle*"/>
<include name="examples/**"/>
<include name="lib/**/*.jar"/>
<include name="legal/**"/>
<include name="src/**"/>
<exclude name="WARNING*"/>
<exclude name="**/build/**"/>
<exclude name="**/out/**"/>
<exclude name="lib/saxon*"/>
<exclude name="src/fop-post-0.20.5/**"/>
<exclude name="src/sandbox/**"/>
<exclude name="examples/xsl-fo/*.bat"/>
<exclude name="build-local.properties"/>
<exclude name="*gump*.xml"/>
</fileset>
</copy>
<zip destfile="${dist.dir}/${rel-name}-bin.zip">
<fileset dir="${dist.dir}/work/bin"/>
</zip>
<tar destfile="${dist.dir}/${rel-name}-bin.tar.gz" compression="gzip" longfile="gnu">
<tarfileset dir="${dist.dir}/work/bin"/>
</tar>
<zip destfile="${dist.dir}/${rel-name}-src.zip">
<fileset dir="${dist.dir}/work/src"/>
</zip>
<tar destfile="${dist.dir}/${rel-name}-src.tar.gz" compression="gzip" longfile="gnu">
<tarfileset dir="${dist.dir}/work/src"/>
</tar>
</target>
</project>