-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.xml
119 lines (102 loc) · 2.72 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
110
111
112
113
114
115
116
117
118
119
<?xml version="1.0" encoding="UTF-8"?>
<project name="ons" default="all">
<property name="data.dir" value="ons.solubility.data"/>
<property name="data.src" value="${data.dir}/src"/>
<property name="data.jar" value="${data.dir}/jar"/>
<property name="data.bin" value="${data.dir}/bin"/>
<property name="j2ee.dir" value="/usr/local/package/glassfish-v2ur2"/>
<property name="j2ee.lib" value="${j2ee.dir}/lib"/>
<property name="ws.host" value="http://localhost"/>
<property name="ws.port" value="8080"/>
<target name="all">
</target>
<path id="libraries">
<pathelement path="${data.jar}/gdata-client-1.0.jar"/>
<pathelement path="${data.jar}/gdata-core-1.0.jar"/>
<pathelement path="${data.jar}/gdata-spreadsheet-1.0.jar"/>
</path>
<path id="j2eelib">
<pathelement path="${j2ee.lib}/webservices-rt.jar"/>
<pathelement path="${j2ee.lib}/webservices-tools.jar"/>
</path>
<taskdef name="wsgen"
classname="com.sun.tools.ws.ant.WsGen">
<classpath>
<path refid="j2eelib"/>
</classpath>
</taskdef>
<taskdef name="wsimport"
classname="com.sun.tools.ws.ant.WsImport">
<classpath>
<path refid="j2eelib"/>
</classpath>
</taskdef>
<target name="test-webservice" depends="compile-webservice">
<wsimport
keep="true"
verbose="true"
destdir="${data.src}"
package="ons.solubility.ws.test"
wsdl="${data.dir}/Ons.wsdl"
>
</wsimport>
<javac srcdir="${data.src}"
destdir="${data.bin}"
source="1.6"
target="1.6"
>
<include name="**/ONServiceTest.java"/>
<classpath>
<path refid="libraries"/>
</classpath>
</javac>
<java
classname="ons.solubility.ws.test.ONServiceTest"
fork="true"
failonerror="true"
>
<classpath>
<pathelement location="${data.bin}"/>
</classpath>
</java>
</target>
<target name="publish-webservice" depends="compile-webservice">
<java
classname="ons.solubility.ws.ONService"
fork="true"
failonerror="true"
>
<arg value="-H"/><arg value="${ws.host}"/>
<arg value="-p"/><arg value="${ws.port}"/>
<classpath>
<path refid="libraries"/>
<pathelement location="${data.bin}"/>
</classpath>
</java>
</target>
<target name="compile-webservice" >
<javac srcdir="${data.src}"
destdir="${data.bin}"
source="1.6"
target="1.6"
>
<include name="**/ONService.java"/>
<classpath>
<path refid="libraries"/>
</classpath>
</javac>
<wsgen
resourcedestdir="${data.dir}"
destdir="${data.bin}"
keep="true"
genwsdl="true"
sei="ons.solubility.ws.ONService"
>
<classpath>
<path location="${data.bin}"/>
<path refid="libraries"/>
</classpath>
</wsgen>
<replace file="${data.dir}/Ons.wsdl" token="REPLACE_WITH_ACTUAL_URL" value="${ws.host}:${ws.port}/onsolubility"/>
</target>
</project>