This repository has been archived by the owner on Nov 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
99 lines (71 loc) · 3.06 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
<!--
NOTE: This project is not configured by default to use this Ant build file, and
the included README.md does not include documentation or support. To use the Ant
build file, you need to ensure that your IDE configurations have been updated,
and any libraries or dependencies included via Maven have been downloaded and
configured for use locally with Ant.
-->
<project default="startdeploy">
<!-- ######## Type your Application/Flexy Parameters ######## -->
<!-- The project name -->
<property name="ProjectName" value="flexy-thingworx-connector"/>
<!-- The main class to run (where the main function is) -->
<property name="MainClass" value="com.hms_networks.americas.sc.thingworx.TWConnectorMain"/>
<!-- The JAVA heapsize -->
<property name="HeapSize" value="5M"/>
<!-- The Flexy Admin login -->
<property name="FlexyLogin" value="adm"/>
<!-- The Flexy Admin password -->
<property name="FlexyPassword" value="adm"/>
<!-- The Flexy IP address -->
<property name="FlexyIP" value="10.0.0.53"/>
<!-- Enable Debug mode -> Type 'true' if online debugging is used -->
<property name="Debug" value="false"/>
<!-- ####################################################### -->
<property name="ftp.dir" value="/usr"/>
<property name="src.dir" value="src"/>
<property name="projectHome" location="." />
<target name="buildjar">
<jar destfile="${projectHome}/build/${ProjectName}.jar" basedir="${projectHome}/bin" />
</target>
<target name="deploy_ftp" depends="buildjar">
<ftp
server="${FlexyIP}" remotedir="${ftp.dir}"
userid="${FlexyLogin}" password="${FlexyPassword}"
action="mkdir" verbose="true"/>
<ftp
server="${FlexyIP}" remotedir="${ftp.dir}"
userid="${FlexyLogin}" password="${FlexyPassword}"
verbose="true" passive="yes">
<fileset dir="build/"/>
</ftp>
</target>
<target name="stop" depends="deploy_ftp">
<get
username="${FlexyLogin}"
password="${FlexyPassword}"
dest="stop.log"
verbose="true"
src="http://${FlexyIP}/rcgi.bin/jvmCmd?cmd=stop"/>
</target>
<target name="startdeploy_debug" depends="stop" if="${Debug}">
<get
username="${FlexyLogin}"
password="${FlexyPassword}"
dest="startdebug.log"
verbose="true"
src="http://${FlexyIP}/rcgi.bin/jvmCmd?cmd=start&runCmd=%20-heapsize%20${HeapSize}%20-classpath%20${ftp.dir}/${ProjectName}.jar%20-emain%20${MainClass}%20-debugger%20-port%202800"
/>
<echo>Debug Mode started</echo>
</target>
<target name="startdeploy" depends="startdeploy_debug" unless="${Debug}">
<get
username="${FlexyLogin}"
password="${FlexyPassword}"
dest="start.log"
verbose="true"
src="http://${FlexyIP}/rcgi.bin/jvmCmd?cmd=start&runCmd=%20-heapsize%20${HeapSize}%20-classpath%20${ftp.dir}/${ProjectName}.jar%20-emain%20${MainClass}"
/>
<echo>Application uploaded and started</echo>
</target>
</project>