tags | projects | ||||||
---|---|---|---|---|---|---|---|
|
|
Trade Manager
Environment
Maven 3.2 or higher, Git, MySQL 5.6.24 or higher, Java 1.8.x recommend latest version, IntelliJ open source version
1/ To clone the repo from the command line
$git clone <URL> i.e. https://github.com/trade-manager/trade-manager-web.git
2/ Add the tools-1.8.0.jar to the .m2 repo. From the project dir
$mvn install:install-file -Dfile=lib/tools-1.8.0.jar -DgroupId=com.sun -DartifactId=tools -Dversion=1.8.0 -Dpackaging=jar
3/ Add the Maven Wrapper. From project dir run
$mvn -N io.takari:maven:wrapper
4/ Change the following properties in the project dir db.properties file: db-dba.username(root is default)/db-dba.password. Note the db-dba.username must have schema create privaledges i.e. root. The other values can be changed if so desired.
5/ Create the MySQL DB. From project dir, cd web, then run (make sure
>$mvn clean install
>$ cd web
web>$ mvnw initialize sql:execute
Note demo data for 2016 is added by default comment out the file in the web/pom.xml if not needed.
6/ To run the old Swing UI. From project dir, cd web, then run
web>$mvnw -Duser.timezone=America/New_York -Dlog4j.configuration=file:../config.properties exec:java
OR the new Spring boot Web app
web>$mvnw spring-boot:run Note WIP so not much to see yet
7/ Open IntelliJ and import the parent pom.xml from the project dir. You can now set run configurations for 6/
In IntelliJ, Edit Configuration add a Maven set working dir to /web then set command line to above without mvnw.
If you wish to deploy the app to another director after building it complete the following:
a/ Copy config.properties, web/target/trade-manager-web-0.0.1-SNAPSHOT.jar, strategies dir and web/pom.xml to your new directory.
b/ Change the following config.properties values to trade.csv.default.dir=temp and trade.strategy.default.dir=strategies
c/ To run the old Swing UI from the command line"
>$mvn exec:java -Dexec.mainClass="org.trade.ui.TradeAppMain" -Dexec.args="-Duser.timezone=America/New_York -Dlog4j.configuration=config.properties"