- Java 7
- Maven 3
- npm install instructions
- Grunt, Bower
npm install -g grunt-cli bower
- MySQL
- Create the database:
- Run
mysql -u root
- Execute in MySQL:
create database canvassweb;
andcreate database canvasswebtest;
- Exit MySQL shell
- Run
- Set your MySQL password:
- Run
mysqladmin -u root password "newpassword"
- Create a hibernate.properties file in canvass-web-main/src/main/resources
- Use something like
hibernate.connection.url = jdbc:mysql://localhost:3306/canvassweb?autoReconnect=true
- Use something like
- Create a hibernate.properties file in canvass-web-test/src/main/resources
- Use something like
hibernate.connection.url = jdbc:mysql://localhost:3306/canvasswebtest?autoReconnect=true
- Use something like
- Set the fields hibernate.connection.username and hibernate.connection.password to be root, "newpassword"
- Advisable to create a 'canvass' user instead of using root
- Don't commit changes to hibernate.properties, unless you want your password permanently stored in github history
- Run
- Create the database:
- From base directory
- Run
mvn install
- From base directory, or canvass-web-main
- Execute
mvn tomcat7:run
- Visit http://localhost:9090/
- From base directory
- Run
java -jar canvass-web-exec/target/canvass-web-exec-1.0-SNAPSHOT-war-exec.jar
- Visit http://localhost:8080/
- From base directory, or canvass-web-test
- Run
mvn integration-test
- This will start an embedded Tomcat server with Selenium and run integration tests in Surefire
✓ : Implemented, ✗ : Not Implemented
✓ Tomcat 7 (Web Host)
✗ JBoss AS7 (Potential Web Host)
- After reading the great java server app debate report, and discovering that Glassfish has just been ditched by Oracle, JBoss (recently renamed Wildfly) seems the best option. It supports JavaEE, has a great management web console, and commercial support available. Wildfly RC8 was released in december, and a stable version is coming soon but it is too early to use it.
✗ RestExpress (Future REST API)
- Built with Netty/IO for faster zero-copy, event-driven service (Node.js is event-driven)
✓ Jersey (Current REST API)
✓ Guice (Dependency Injection)
✓ Maven (Java Build)
✓ Hibernate (DAL)
✓ MySQL (DB)
✓ Bootstrap (Visuals)
✓ Coffescript Compiling (Frontend)
✓ Sass Compiling (Style)
✓ AngularJS (Frontend)
✓ Surefire/JUnit (Java/Server Testing)
✓ Selenium/WebDriver (Integration Testing)
✓ Protractor/Jasmine (Javascript/Client Testing)
- Use Protractor, which supplants Karma as the recommended test framework for AngularJS
✓ Grunt (Javascript Build)
✓ Sailthru (Email)
✗ Logback (Logging)
- Static web (HTML, CSS, Javascript)
- API
mvn compile
will not work on canvass-web-test and therefore not on canvass-web- Use
mvn install
instead