-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.bat
48 lines (35 loc) · 1.95 KB
/
build.bat
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
@echo off
setlocal ENABLEDELAYEDEXPANSION
rem ***************************************************
rem See docs/Readme.txt for installation instructions.
rem Change this dir to be the location for J2SE edition
rem ***************************************************
@if defined JAVA_HOME goto javahomedefined
SET JAVA_HOME=C:/Program Files/Java/jdk1.7.0_45
:javahomedefined
rem set the path to include the bin dir
PATH=%JAVA_HOME%/bin;%PATH%
rem tools.jar is needed for the javac compiler
SET CLASSPATH=.;%JAVA_HOME%/jre/lib/rt.jar;%JAVA_HOME%/lib/tools.jar;ant/lib/*;
echo Path=%PATH%
echo ClassPath=%CLASSPATH%
rem If the config.properties does not exit in the app dir copy it from the config dir.
if not exist config.properties (
copy config\config.properties .
echo Using default config.properties from /config dir.)
SET ANT_BUILD_FILE=ant/build.xml
rem SET ANT_BUILD_FILE=ant/buildtest.xml
rem *******************************************************
rem After application install TARGET 1/ AND 2/ must be run.
rem *******************************************************
rem 1/ TARGET=all Build and compile the trademanager application.
rem 2/ TARGET=createDB Create the database user and default data.
rem 3/ TARGET=upgradeDB Upgrade the database to the latest version see reamme.txt.
rem 4/ TARGET=resetDefaultData Deletes all the data from the DB and reload the default data.
rem 5/ TARGET=deleteTransactionData Deletes all the Contract/Candle/Tradestrategies from the database. Leaves configuration in tact.
rem 6/ TARGET=deleteTradeOrderData Deletes all the orders from the database.
rem 7/ TARGET=deleteAccountRuleData Delete the accounts and rules from the database. These will reload on login.
rem 8/ TARGET=all ANT_BUILD_FILE=ant/buildtest.xml Build and compile all test cases. This depends on 1/
SET TARGET=all
java -classpath "%CLASSPATH%" org.apache.tools.ant.Main -buildfile "%ANT_BUILD_FILE%" "%TARGET%"
pause