-
Notifications
You must be signed in to change notification settings - Fork 15
/
ant.macros.xml
executable file
·99 lines (81 loc) · 2.7 KB
/
ant.macros.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
<?xml version="1.0" encoding="UTF-8"?>
<project name="Http4e.Macros">
<!-- Properties -->
<property file="${basedir}/../ant.properties" />
<property name="ide.libs" location="${basedir}/../eclipse.sdk" />
<property name="build" location="${basedir}/../.build" />
<property name="dist" location="${basedir}/../install/plugins" />
<!-- Macros -->
<macrodef name="clean" description="clean up">
<attribute name="product" />
<sequential>
<echo>Cleaning</echo>
<delete dir="${build}/@{product}" />
</sequential>
</macrodef>
<macrodef name="copy-bin-includes" description="copy bin includes">
<attribute name="build.project" />
<attribute name="build.dependent" />
<sequential>
<echo>Copying bin.includes from ${basedir}</echo>
<java classpath="@{build.dependent}" classname="org.roussev.http4e.ant.AntReader">
<arg value="${basedir}/build.properties" />
<arg value="${basedir}" />
<arg value="@{build.project}" />
</java>
</sequential>
</macrodef>
<macrodef name="prepare" description="prepare directories">
<attribute name="product" />
<sequential>
<echo>Preparing</echo>
<mkdir dir="${build}/@{product}" />
</sequential>
</macrodef>
<macrodef name="compile" description="prepare directories">
<attribute name="build.dependent" />
<attribute name="product" />
<attribute name="ide.type" />
<attribute name="ide.version" />
<sequential>
<path id="compile.classpath">
<fileset dir="${basedir}/lib">
<include name="*.jar" />
</fileset>
<fileset dir="${ide.libs}/@{ide.version}/@{ide.type}">
<include name="*.jar" />
</fileset>
</path>
<echo>
Compiling with libs:
${basedir}/lib
${ide.libs}/@{ide.version}/@{ide.type}
</echo>
<javac srcdir="${basedir}/src" destdir="${build}/@{product}" debug="false" target="1.5">
<classpath refid="compile.classpath" />
<classpath location="@{build.dependent}" />
<include name="**/*.java" />
</javac>
</sequential>
</macrodef>
<macrodef name="dist" description="prepare directories">
<attribute name="product" />
<sequential>
<echo>Disting..</echo>
<zip file="${dist}/@{product}_${product.version}.jar" basedir="${build}/@{product}">
</zip>
</sequential>
</macrodef>
<macrodef name="eclipse" description="prepare directories">
<attribute name="ide.type" />
<attribute name="ide.version" />
<sequential>
<echo>Starting ide</echo>
<java jar="${dist}/@{ide.version}/@{ide.type}/eclipse/startup.jar" fork="true">
<arg value="-consolelog" />
<arg value="-clean" />
<arg value="-debug" />
</java>
</sequential>
</macrodef>
</project>