forked from etsy/jading
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.xml
More file actions
133 lines (117 loc) · 4.82 KB
/
build.xml
File metadata and controls
133 lines (117 loc) · 4.82 KB
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
<?xml version="1.0"?>
<project name="jading" default="jar" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant" xmlns="antlib:org.apache.tools.ant">
<property name="build.dir" location="/tmp/jading/build" />
<property name="build.lib" location="${build.dir}/lib" />
<property name="build.jar" location="${build.dir}/jar" />
<property name="build.classes" location="${build.dir}/classes" />
<property name="build.test.classes" location="${build.dir}/test-classes" />
<property name="build.test.reports" location="${build.dir}/xml-reports" />
<property name="build.javadoc" location="${build.dir}/javadoc" />
<property name="ivy.install.version" value="2.2.0" />
<property name="ivy.home" value="${build.dir}/ivy" />
<property name="ivy.jar.dir" value="${ivy.home}/lib" />
<property name="src.java.dir" location="${basedir}/src/main/java" />
<property name="main.resource.dir" location="${basedir}/src/main/resources" />
<property name="src.java.test.dir" location="${basedir}/src/test/java" />
<property name="test.resource.dir" location="${basedir}/src/test/resources" />
<property file="${basedir}/resolved.properties" />
<echo message="Resolved?: ${resolved}" />
<target name="download-ivy" unless="${resolved}">
<mkdir dir="${ivy.jar.dir}"/>
<get src="http://repo2.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar" dest="${ivy.jar.dir}/ivy.jar" usetimestamp="true"/>
</target>
<target name="init-ivy" depends="download-ivy" unless="${resolved}">
<path id="ivy.lib.path">
<fileset dir="${ivy.jar.dir}" includes="*.jar"/>
</path>
<taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
<ivy:settings file="${basedir}/ivysettings.xml" />
</target>
<target name="retrieve-ivy" depends="init-ivy" unless="${resolved}">
<ivy:resolve file="${basedir}/ivy.xml" conf="*" />
<ivy:retrieve pattern="${build.lib}/[artifact]-[revision].[ext]" conf="*" />
</target>
<path id="compile.classpath">
<fileset dir="${build.lib}">
<include name="**/*.jar" />
</fileset>
<pathelement location="${main.resource.dir}" />
</path>
<path id="test.classpath">
<path refid="compile.classpath" />
<pathelement location="${build.classes}" />
<pathelement location="${test.resource.dir}" />
</path>
<target name="compile" depends="retrieve-ivy">
<mkdir dir="${build.classes}" />
<javac includeantruntime="false" destdir="${build.classes}"
source="1.6" target="1.6" debug="true"
classpathref="compile.classpath" deprecation="${java.deprecation}">
<src path="${src.java.dir}" />
</javac>
</target>
<target name="jar" depends="compile">
<jar jarfile="${build.dir}/${ant.project.name}-${ivy.revision}.jar">
<fileset dir="${build.classes}">
<include name="**/*" />
</fileset>
<fileset dir="${main.resource.dir}">
<include name="**/*.rb" />
</fileset>
</jar>
</target>
<target name="jade-jar">
<jar jarfile="${execution.dir}/jade.jar">
<!-- Contents prepared by jade -->
<fileset dir="${build.jar}">
<include name="**/*" />
</fileset>
<!-- Contents prepared by Ant -->
<fileset dir="${build.classes}">
<include name="**/*" />
</fileset>
<fileset dir="${main.resource.dir}">
<include name="**/*" />
</fileset>
</jar>
</target>
<target name="compile-test" depends="compile">
<mkdir dir="${build.test.classes}" />
<javac includeantruntime="false" destdir="${build.test.classes}"
source="1.6" target="1.6" debug="true"
classpathref="test.classpath" deprecation="${java.deprecation}">
<src path="${src.java.test.dir}" />
</javac>
</target>
<target name="test" depends="compile-test">
<mkdir dir="${build.test.reports}" />
<junit dir="." fork="true" forkmode="perTest" maxmemory="2G"
haltonfailure="yes">
<formatter type="plain" usefile="false" />
<formatter type="xml" />
<classpath>
<path refid="test.classpath" />
<pathelement location="${build.test.classes}" />
</classpath>
<batchtest todir="${build.test.reports}">
<fileset dir="${build.test.classes}">
<include name="**/*Tests.class" />
</fileset>
</batchtest>
</junit>
</target>
<target name="doc" depends="compile">
<mkdir dir="${build.javadoc}" />
<javadoc sourcepath="${src.java.dir}" destdir="${build.javadoc}"
version="true" windowtitle="Jading" doctitle="Jading">
<classpath>
<path refid="compile.classpath" />
<pathelement location="${build.classes}" />
</classpath>
</javadoc>
</target>
<target name="clean">
<delete dir="${build.dir}" />
<delete file="${basedir}/resolved.properties" />
</target>
</project>