- 2 space indent spaces only (In Eclipse: Project Properties -> Java Code Style -> Formatter -> Indentation)
- Generally follow the Java coding guidelines
- Java 7
- Postgres
- Download and install the Java 7 SE JDK
- In Eclipse: Eclipse -> Preferences -> Java -> Installed JREs -> Search; Check JRE 7
- Install Postgres (the built-in version doesn't have initdb?):
brew install postgresql - Run:
sudo vi /etc/sysctl.confto add the following lines:
# To run multiple instances of postgres
kern.sysv.shmmax=1610612736
kern.sysv.shmall=393216
kern.sysv.shmmin=1
kern.sysv.shmmni=32
kern.sysv.shmseg=8
Note: these values are from: http://www.postgresql.org/docs/9.2/static/kernel-resources.html http://benscheirman.com/2011/04/increasing-shared-memory-for-postgres-on-os-x/
- Reboot or run
sudo sysctl -w (line)for each of the above lines ant testruns all unit tests. This should pass.
- (ONCE): Run
./build.shto set up a local Postgres database inbuild/postgres postgres -D build/postgresstarts Postgres using that local database- (ONCE):
psql -c 'create database mitro;' postgrescreates the database namedmitro ant serverbuilds and starts the server.- Connect to https://localhost:8443/mitro-core/
We have a set of tests that use NodeJS to verify the JS client library and server together:
- Run
./build.shto install node dependencies and set up an empty Postgres database. - Start Postgres:
postgres -D build/postgres - Run the test:
cd js/cli && ./runtests.sh - When it completes, scroll up and look for the word
SUCCESS, above the Java stack trace.