-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
63 lines (55 loc) · 2.46 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
<project name="Inventory" default="empty">
<property file="build.properties"/>
<target name="empty"/>
<target name="compile">
<delete dir="${outputDirRoot}"/>
<mkdir dir="${outputDirRoot}"/>
<javac srcdir="${srcDirs}" classpath="${externalLibs}" destdir="${outputDirRoot}" debug="true"
debuglevel="lines,vars,source"/>
</target>
<target name="gen-wsdl" depends="compile">
<exec executable="wsgen" failonerror="true">
<arg line="-wsdl -r descriptors/META-INF -d ${outputDirRoot} -cp ${outputDirRoot} ershop.webservices.inventory.impl.InventoryQuery"/>
</exec>
</target>
<target name="create-database" depends="compile">
<java classpath="${externalLibs};${outputDirRoot};descriptors;."
classname="ershop.entity.SetupDB" fork="true" failonerror="true"/>
<sql
driver="org.hsqldb.jdbcDriver"
url="jdbc:hsqldb:hsql://localhost/webshop_inventory"
userid="ER"
password="erwebshop"
src="populate_db.sql"
classpath="${externalLibs}"
/>
</target>
<target name="make-jar" depends="gen-wsdl">
<copy todir="${outputDirRoot}">
<fileset dir="descriptors"/>
</copy>
<jar basedir="${outputDirRoot}" destfile="out/InventoryWS.jar">
<exclude name="ershop/entity/SetupDB.class"/>
<exclude name="ershop/webservices/inventory/jaxws/**"/>
</jar>
</target>
<target name="deploy-ws" depends="make-jar">
<copy file="out/InventoryWS.jar" todir="${wsrepository}"/>
</target>
<target name="gen-wsclient" depends="deploy-ws">
<delete dir="test/ws_client" quiet="true"/>
<exec executable="wsimport" failonerror="true">
<arg line="-s test" description="where to put generated java files"/>
<arg line="-p ws_client" description="package name for the generated classes"/>
<arg line="-d ${outputDirRoot}" description="output class files directory"/>
<arg line="${wsdlFileLocation}" description="wsdl file location"/>
</exec>
</target>
<target name="move-dependencies-to-wso2-classpath">
<copy todir="${wso2.lib}" flatten="true">
<path>
<pathelement path="${externalLibs}"/>
</path>
</copy>
</target>
</project>