forked from moqui/moqui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
98 lines (87 loc) · 4.47 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
This Work is in the public domain and is provided on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
including, without limitation, any warranties or conditions of TITLE,
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.
You are solely responsible for determining the appropriateness of using
this Work and assume any risks associated with your use of this Work.
This Work includes contributions authored by David E. Jones, not as a
"work for hire", who hereby disclaims any copyright to the same.
-->
<!--
README: These are just tools for using the Moqui WAR file.
The actual build is done with Gradle.
-->
<project name="Moqui WAR Tools" default="run" basedir=".">
<property environment="env"/>
<property name="version" value="1.2.1"/>
<property name="tomcat.home" value="../apache-tomcat-7.0.32"/>
<property name="moqui.runtime" value="runtime"/>
<property name="moqui.conf.dev" value="conf/MoquiDevConf.xml"/>
<property name="moqui.conf.production" value="conf/MoquiProductionConf.xml"/>
<target name="add-runtime">
<!-- unzip the "moqui-${version}.war" file to the wartemp directory -->
<mkdir dir="wartemp"/>
<unzip src="moqui-${version}.war" dest="wartemp"/>
<copy todir="wartemp">
<fileset dir="." includes="${moqui.runtime}/**" excludes="**/*.jar,${moqui.runtime}/db/**,${moqui.runtime}/log/**,${moqui.runtime}/classes/**"/>
</copy>
<copy todir="wartemp/WEB-INF/lib"><fileset dir="${moqui.runtime}/lib" includes="*.jar"/></copy>
<copy todir="wartemp/WEB-INF/classes"><fileset dir="${moqui.runtime}/classes" includes="**/*"/></copy>
<copy file="MoquiInit.properties" todir="wartemp/WEB-INF/classes" overwrite="true"/>
<!-- zip it up again -->
<zip destfile="moqui-plus-runtime.war" basedir="wartemp"/>
<delete verbose="off" failonerror="false" dir="wartemp"/>
</target>
<target name="deploy-tomcat">
<delete verbose="on" failonerror="false" dir="${tomcat.home}/runtime"/>
<delete verbose="on" failonerror="false" dir="${tomcat.home}/webapps/ROOT"/>
<delete verbose="on" failonerror="false" file="${tomcat.home}/webapps/ROOT.war"/>
<delete verbose="on" failonerror="false">
<fileset dir="${tomcat.home}/logs" includes="*"/>
</delete>
<copy file="moqui-${version}.war" tofile="${tomcat.home}/webapps/ROOT.war"/>
</target>
<target name="run" description="Run Moqui Web server in dev/default mode with Embedded Winstone (run the executable war file)">
<delete verbose="off" failonerror="false" dir="execwartmp"/>
<java jar="moqui-${version}.war" fork="true">
<jvmarg value="-server"/>
<jvmarg value="-Xmx256M"/>
<jvmarg value="-XX:MaxPermSize=128m"/>
<jvmarg value="-Dmoqui.conf=${moqui.conf.dev}"/>
<jvmarg value="-Dmoqui.runtime=${moqui.runtime}"/>
</java>
</target>
<target name="run-production" description="Run Moqui Web server in production mode">
<delete verbose="off" failonerror="false" dir="execwartmp"/>
<java jar="moqui-${version}.war" fork="true">
<jvmarg value="-server"/>
<jvmarg value="-Xms512M"/>
<jvmarg value="-Xmx512M"/>
<jvmarg value="-XX:MaxPermSize=128m"/>
<jvmarg value="-Dmoqui.conf=${moqui.conf.production}"/>
<jvmarg value="-Dmoqui.runtime=${moqui.runtime}"/>
</java>
</target>
<target name="load" description="Run Moqui data loader (run the executable war file with -load)">
<java jar="moqui-${version}.war" fork="true">
<jvmarg value="-server"/>
<jvmarg value="-Xmx256M"/>
<jvmarg value="-XX:MaxPermSize=128m"/>
<jvmarg value="-Dmoqui.conf=${moqui.conf.dev}"/>
<jvmarg value="-Dmoqui.runtime=${moqui.runtime}"/>
<arg value="-load"/>
</java>
</target>
<target name="load-production" description="Run Moqui data loader in production mode">
<java jar="moqui-${version}.war" fork="true">
<jvmarg value="-server"/>
<jvmarg value="-Xmx256M"/>
<jvmarg value="-XX:MaxPermSize=128m"/>
<jvmarg value="-Dmoqui.conf=${moqui.conf.production}"/>
<jvmarg value="-Dmoqui.runtime=${moqui.runtime}"/>
<arg value="-load"/>
</java>
</target>
</project>