== GETTING STARTED
=== Prerequisites:
- Java SDK 1.6
- Maven 2
- Eclipse or IDEA
=== Instructions
- Check out: git clone [email protected]:jhannes/larm-poc.git
- Install dependencies in your local repo: dependencies/install-dependencies.bat
- Build everything: mvn install
- Create IDE project files: mvn eclipse:eclipse or mvn idea:idea
- Import project into your workspace
- In Eclipse: File -> Import -> Existing projects into workspace
- In IDEA: File -> Open Project
- Start client in 2-tier mode: Run main class no.statnett.larm.poc.client.ApplicationFrame
- IDEA: Make sure Working Directory is project directory
- Place EDIEL quotes files in data/ediel/input to have the client read them
== DEPLOYMENT
- mvn install builds everything
- larm-poc-web/target/larm-poc-server-1.0-SNAPSHOT-onejar.jar is a complete
executable jar that can be copied to the deployment server
- Copy larm-poc-server-1.0-SNAPSHOT-onejar.jar to server
- java -jar larm-poc-server-1.0-SNAPSHOT-onejar.jar
- Access the service at http://localhost:8080/larm-web/
== DEVELOPMENT
These tests are normative for development:
- no.statnett.larm.reservekraft.ReservekraftBudListDialogTest describes
the mapping between the domain and the user interface
- no.statnett.larm.reservekraft.ReservekraftBudSpecificationTest describes
the mapping between the domain and the database
These files are the starting points for the runtime:
- no.statkraft.larm.poc.web.WebServer
- Reads configuration, sets up web applications and starts Jetty in test mode
- The web.xml file specifies servlets for serving the JNLP definition for serving the client jar files and for serving services using Hessian
- no.statnett.larm.poc.LarmPocServer
- The main class started by the executable jar
- Reads configuration, sets up web applications and starts Jetty in production mode
- no.statnett.larm.poc.client.ApplicationFrame
- Locates the server Repository (can be two-tier or three-tier, based on URL)
- Sets up the client's panels in the application frame
== FITNESSE
- Run fitnesseMain.FitNesseMain from the larm-fitnesse project, or execute larm-poc/larm-fitnesse/run-fitnesse.bat
- Access FitNesse at http://localhost:8090
== STYLE GUIDE (ECLIPSE)
- Import coding-conventions-eclipse.xml under Java -> Code Style -> Formatter (Windows -> Preferences)
- Import cleaup-actions-eclipse.xml under Java -> Code Style -> Clean Up
- Add the following warnings to Java -> Compiler -> Errors/Warnings
- Potential programming problems -> Potential null point access
- Potential programming problems -> Class overrides equals but not hashCode
- Unnecessary code -> Parameter is never read
- Unnecessary code -> Redundant null check
- Unnecessary code -> Unnecessary cast or 'instanceof' operation
- Annotations -> Missing @Override annotation
- Avoid ALL compiler warnings
- Use UTF-8 encoding for all files (General -> Workspace, Text file encoding)