-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
98 lines (78 loc) · 2.54 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
<?xml version="1.0"?>
<project name="tcboxcar" default="compile" basedir=".">
<property name="src" value="./src"/>
<property name="build" value="./build"/>
<property name="dist" value="./dist"/>
<property name="compile.debug" value="true"/>
<property name="tc.home" value="${user.home}/TeamCity"/>
<property name="tc.data.dir" value="${user.home}/.BuildServer"/>
<property name="tc.lib" value="${tc.home}/webapps/ROOT/WEB-INF/lib"/>
<property name="deploy.dir" value="${tc.data.dir}/plugins"/>
<property name="version.num" value="0.1"/>
<path id="compile.classpath">
<fileset dir="lib">
<include name="javaee-api-5.jar"/>
<include name="httpclient-4.1.1.jar"/>
<include name="httpcore-4.1.jar"/>
</fileset>
<fileset dir="${tc.lib}">
<include name="*.jar"/>
<exclude name="commons-httpclient-3.1.jar"/>
</fileset>
</path>
<target name="compile" depends="init">
<javac srcdir="${src}"
destdir="${build}"
debug="${compile.debug}"
source="1.5">
<classpath refid="compile.classpath"/>
</javac>
</target>
<target name="run-test" depends="compile">
<java classname="net.slimeslurp.tcboxcar.BoxcarApi">
<classpath refid="compile.classpath"/>
<classpath>
<pathelement path="build"/>
</classpath>
</java>
</target>
<target name="init">
<mkdir dir="${build}"/>
<mkdir dir="${build}/lib"/>
<mkdir dir="${dist}"/>
</target>
<target name="dist" depends="compile">
<copy todir="${build}/buildServerResources">
<fileset dir="buildServerResources"/>
</copy>
<copy file="teamcity-plugin.xml" todir="${build}"/>
<!--
<copy todir="${build}/lib">
<fileset dir="lib">
<exclude name="javaee-api-5.jar"/>
</fileset>
</copy>
-->
<mkdir dir="${dist}/server"/>
<jar destfile="${dist}/server/tcboxcar.jar" basedir="build">
<metainf dir="META-INF">
<include name="*"/>
</metainf>
</jar>
<copy todir="${dist}/server">
<fileset dir="lib">
<exclude name="javaee-api-5.jar"/>
</fileset>
</copy>
<zip destfile="${dist}/tcboxcar.zip" basedir="${dist}">
<include name="server/*"/>
</zip>
</target>
<target name="deploy" depends="dist">
<copy file="${dist}/tcboxcar.zip" todir="${deploy.dir}"/>
</target>
<target name="clean" description="Removes previous build">
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
</project>