Cyan Spring ATS
Open Source Algorithmic Trading Software
BuildThe following software is required to build the application:
Build The Server
Unzip the source code distrubtion cyanspring-src-<ver>.zip to a directory, say c:\projects\algo.
Put the bin directory of Maven into your system path, and test you can run
mvn -verFor 64-bit operating system, please set system environment variable
MAVEN_OPTS="-Xms256m -Xmx256m -XX:PermSize=128m -XX:MaxPermSize=128"
If your computer is behind a corporate firewall, please check this to configure a proxy.
in c:\projects\algo directory.
mvn clean install
This will compile all the java codes required by server. If you are compiling it first time, Maven will download lots of required packages into your local Maven repository. In the case some downloads fail, run the above command again.
When Maven compilation is finished successfully, change directory to c:\projects\algo\server and run:
This builds a release of current server component. You can find the release package in c:\projects\algo\server\target\cyanspring-server-
Maven build tips:
To update all module versions
mvn versions:set -DnewVersion=<new version>
Build The Client(CSTW)
Run Eclipse for RCP & RAP developers, create a new workspace say ws-algo.
In Eclipse, select File->import->Existing projects into workspace, select directory c:\projects\algo\CSTWjars, then click finish. This will import the project CSTWjars into the workspace.
In Eclipse, select File->import->Existing projects into workspace, select directory c:\projects\algo\CSTW, then click finish. This will import the project CSTW into the workspace.If you are compiling CSTW on an operating system other than Windows 64-bit OS. You need to do the following:
- Double click on Product.product file in the CSTW project to bring it up in the content editor
- In content editor, choose 'Dependencies' tab, you should see "org.eclipse.swt.win32.win32.x86" as an error. Click the remove button to remove it
- Click 'Add required Plug-ins' button to add your platform required eclipse rcp plug-ins
Wait for Eclipse to finish the compilation and confirm no errors in the above two projects, browse into CSTW project and double click on file Product.product
This will bring up the RCP build page, In the Overview tab and export pane, click on "Eclipse product export wizard" link to export a CSTW build.
Run in Eclipse
It is always nice if you can run all components in an IDE and debug/test them. CSTW currently works with Eclipse Kepler
Bring up Eclipse and create a work space, then go File->import->existing maven projects and import all maven projects under c:\projects\algo.
Wait for Maven finish building and you may see two errors
- maven-install-plugin:2.3.1:install-file(1 errors)
- maven-jar-plugin:2.4:test-jar(1 errors)
Click resolve later and finish with importing. Eclipse will start to build the projects. Upon build finish, you may see two problems (in the problems tab)
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-jar-plugin:2.4:test-jar (execution: default, phase: test-compile) pom.xml /cyanspring-server line 88 Maven Project Build Lifecycle Mapping Problem
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-install-plugin:2.3.1:install-file (execution: install-2, phase: validate) pom.xml /cyanspring-dependency line 19 Maven Project Build Lifecycle Mapping Problem
Double click on each problem and bring up the pom.xml file in the editor, move the mouse at the problem key word, wait for the solution pop-up and choose
Mark goal xxxx as ignored in Eclipse build in Eclipse preferences
This should resolve these 2 problems and the build will be successful.
Open class com.cyanspring.server.Server, right click Run as->Java application or Debug as->Java application to run or debug the server
To run CSTW from Eclipse, open plugin.xml in CSTW project, in "Overview" table click on link "Launch an Eclipse application", then choose com.cyanspring.cstw.