forked from christoph-neumann/simple-hornetq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
109 lines (83 loc) · 2.7 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
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
<?xml version="1.0" encoding="UTF-8"?>
<project name="simple-hornetq" default="all">
<path id="classpath">
<fileset dir="lib"/>
<fileset dir="deps/build"/>
</path>
<target name="init">
<!-- create needed directories -->
<mkdir dir="deps/build"/>
<mkdir dir="build"/>
<mkdir dir="target"/>
<!-- define the ivy tasks -->
<taskdef name="ivy-configure" classname="org.apache.ivy.ant.IvyConfigure" classpathref="classpath"/>
<taskdef name="ivy-resolve" classname="org.apache.ivy.ant.IvyResolve" classpathref="classpath"/>
<taskdef name="ivy-retrieve" classname="org.apache.ivy.ant.IvyRetrieve" classpathref="classpath"/>
<taskdef name="ivy-publish" classname="org.apache.ivy.ant.IvyPublish" classpathref="classpath"/>
<!-- retrieve dependencies with ivy -->
<ivy-retrieve pattern="deps/[conf]/[artifact]-[revision].[ext]" type="jar"/>
<!-- print out the classpath -->
<property name="classpath-str" refid="classpath"/>
<echo message="Classpath = ${classpath-str}"/>
<!-- define the scala related task -->
<taskdef resource="scala/tools/ant/antlib.xml" classpathref="classpath"/>
</target>
<target name="compile" depends="init">
<scalac
srcdir="src/scala"
destdir="build"
deprecation="on"
force="changed">
<include name="**/*.scala"/>
<classpath>
<pathelement path="build"/>
<path refid="classpath"/>
</classpath>
</scalac>
</target>
<target name="deploy" depends="compile">
<mkdir dir="target/lib"/>
<copy todir="target/lib">
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
<fileset dir="deps/runtime">
<include name="*.jar"/>
</fileset>
</copy>
<copy todir="target">
<fileset dir="src/scripts"/>
</copy>
<copy todir="target/lib">
<fileset dir="src/properties"/>
</copy>
<!-- jar up our service runtime -->
<jar destfile="target/lib/${ant.project.name}.jar">
<fileset dir="build">
<include name="**/*.class"/>
</fileset>
</jar>
<!-- set permissions -->
<chmod file="target" perm="a+x">
<fileset dir="target">
<include name="*.sh"/>
</fileset>
</chmod>
</target>
<target name="run" depends="deploy">
<exec dir="target" executable="bash">
<arg line="./run.sh"/>
</exec>
</target>
<target name="all" depends="deploy">
</target>
<target name="clean">
<delete dir="build"/>
<delete dir="target"/>
<delete dir="deps"/>
</target>
<target name="clean-and-all" description="cleans and then builds all" >
<antcall target="clean"> </antcall>
<antcall target="all"> </antcall>
</target>
</project>