-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
82 lines (71 loc) · 3.16 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
<?xml version="1.0" encoding="UTF-8"?>
<!-- ========================================================
* This file is part of the Salt9000 project.
*
* Salt9000 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Salt9000 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with the Salt9000 project. If not, see <http://www.gnu.org/licenses/>.
*
* Copyright 2014 Marco LOMBARDO, mar9000 near google.com .
============================================================= -->
<!-- ========================================================
Build distribution jar salt.jar to be used from command line.
============================================================= -->
<project name="salt9000" default="dist" basedir=".">
<description>
Build distribution jar salt.jar to be used from command line.
</description>
<property name="src.dir" value="${basedir}/src"/>
<property name="lib.dir" value="${basedir}/lib"/>
<property name="build.dir" value="${basedir}/ant-build"/>
<property name="releases.dir" value="${basedir}/releases"/>
<property name="version" value="1.0.0"/>
<property name="jar.file" value="${releases.dir}/salt9000-${version}.jar"/>
<property name="complete-jar.file" value="${releases.dir}/salt9000-${version}-complete.jar"/>
<property name="main-class" value="org.mar9000.salt.SaltCLI"/>
<path id="compile.classpath">
<pathelement location="${lib.dir}/antlr-runtime-4.4.jar"/>
</path>
<target name="check-environment" description="Create the build dir. for ant .">
<delete dir="${build.dir}"/>
<mkdir dir="${build.dir}"/>
</target>
<target name="compile" depends="check-environment">
<javac srcdir="${src.dir}" destdir="${build.dir}">
<classpath refid="compile.classpath"/>
</javac>
</target>
<target name="dist" depends="compile">
<mkdir dir="${releases.dir}"/>
<mkdir dir="${build.dir}/lib"/>
<copy todir="${build.dir}/lib" flatten="true">
<path refid="compile.classpath"/>
</copy>
<unzip src="lib/antlr-runtime-4.4.jar" dest= "${build.dir}"/>
<jar destfile="${jar.file}" basedir="${build.dir}">
<manifest>
<attribute name="Main-Class" value="${main-class}"/>
</manifest>
</jar>
</target>
<target name="dist-complete" description="Add JGoodies LAF to let possible use the --jg-laf switch."
depends="dist">
<unzip src="lib/antlr-runtime-4.4.jar" dest= "${build.dir}"/>
<unzip src="lib/jgoodies-common-1.8.0.jar" dest= "${build.dir}"/>
<unzip src="lib/jgoodies-looks-2.6.0.jar" dest= "${build.dir}"/>
<jar destfile="${complete-jar.file}" basedir="${build.dir}">
<manifest>
<attribute name="Main-Class" value="${main-class}"/>
</manifest>
</jar>
</target>
</project>