forked from npmiller/solap4py-java
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.xml
More file actions
135 lines (119 loc) · 4.04 KB
/
build.xml
File metadata and controls
135 lines (119 loc) · 4.04 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
134
135
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="compile" name="Solap4py-java" xmlns:ivy="antlib:org.apache.ivy.ant">
<!--
================
Build properties
================
-->
<property file="build.properties" />
<!-- Sets the user/pass properties to "" if not set. Do not edit here. -->
<property name="proxy.user" value="" />
<property name="proxy.pass" value="" />
<!-- Proxy configuration, if needed -->
<target name="probe-proxy">
<condition property="proxy.enabled">
<and>
<isset property="proxy.host" />
<isset property="proxy.port" />
<matches pattern="[1-65535]" string="${proxy.port}" />
</and>
</condition>
</target>
<target name="proxy" depends="probe-proxy" if="proxy.enabled">
<setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.user}" proxypassword="${proxy.pass}" nonproxyhosts="${non.proxy.host}" />
</target>
<!--
===========
Build setup
===========
-->
<target name="bootstrap" depends="proxy" description="Used to install the ivy task jar">
<mkdir dir="${ivy.jar.dir}" />
<get skipexisting="true" src="http://search.maven.org/remotecontent?filepath=org/apache/ivy/ivy/2.3.0/ivy-2.3.0.jar" dest="${ivy.jar.file}" usetimestamp="true" />
</target>
<target name="init-ivy" depends="bootstrap">
<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" />
</target>
<target name="resolve" depends="init-ivy" description="Download dependencies and setup classpath">
<ivy:resolve />
<ivy:report todir='${ivy.reports.dir}' graph='false' xml='false' />
<ivy:cachepath pathid="compile.path" conf="compile" />
<ivy:cachepath pathid="test.path" conf="test" />
<ivy:cachepath pathid="build.path" conf="build" />
<ivy:cachepath pathid="runtime.path" conf="runtime" />
</target>
<target name="init" depends="resolve" description="Create builds directories">
<mkdir dir="${classes.dir}" />
<mkdir dir="${test.classes.dir}" />
<mkdir dir="${test.reports.dir}" />
</target>
<!--
===============
Compile targets
===============
-->
<target name="compile" depends="init">
<javac srcdir="${src.dir}" destdir="${classes.dir}" includeantruntime="false" debug="true" classpathref="compile.path" />
</target>
<target name="compile-tests" depends="compile">
<javac srcdir="${test.src.dir}" destdir="${test.classes.dir}" includeantruntime="false" debug="true">
<classpath>
<path refid="test.path" />
<pathelement path="${classes.dir}" />
</classpath>
</javac>
</target>
<!--
============
Test targets
============
-->
<target name="test" depends="compile-tests">
<taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml" classpathref="build.path" />
<jacoco:coverage destfile="${build.dir}/jacoco.exec" xmlns:jacoco="antlib:org.jacoco.ant">
<junit haltonfailure="no" fork="true">
<classpath>
<path refid="test.path" />
<pathelement path="${classes.dir}" />
<pathelement path="${test.classes.dir}" />
</classpath>
<formatter type="plain" usefile="false" />
<formatter type="xml" />
<batchtest fork="yes" todir="${test.reports.dir}">
<fileset dir="${test.src.dir}">
<include name="**/*Test.java" />
<exclude name="**/AllTests.java" />
</fileset>
</batchtest>
</junit>
</jacoco:coverage>
</target>
<!--
=====================
Run targets
=====================
-->
<target name="run" depends="compile">
<echo message="Starting Solap4py-java Server..." />
<java classname="fr.solap4py.core.Solap4py">
<classpath>
<path refid="runtime.path" />
<pathelement location="${classes.dir}" />
</classpath>
</java>
</target>
<!--
=============
Clean targets
=============
-->
<target name="clean" depends="init-ivy">
<delete dir="${build.dir}" />
</target>
<target name="clean-all" depends="clean">
<ivy:cleancache />
</target>
</project>