Build

The 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 -ver

For 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:

mvn assembly:assembly

This builds a release of current server component. You can find the release package in c:\projects\algo\server\target\cyanspring-server--build

Maven build tips:

To update all module versions

	mvn versions:set -DnewVersion=<new version>
	
	mvn versions:revert
	
	mvn versions:commit
	

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:

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

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)

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.