-
Notifications
You must be signed in to change notification settings - Fork 1
Build
We're using Maven to build this application. There are multiple modules as outlined on the modules page. All of our dependencies should be available from Maven Central.
Building the system with all tests is done as follows:
mvn clean install
The project is setup with Atlassian Clover in order to provide code coverage and complexity metrics. While this is a commercially licensed tool, it offers excellent configuration options in order to avoid including generated methods in the analysis.
mvn clean clover2:setup verify clover2:aggregate clover2:clover
The front-end build uses npm, grunt, bower, and yeoman. If these tools are not installed, do the following:
- Install node.js
- Make sure npm is on your path
- Enter this command:
npm install -g grunt-cli bower yo generator-karma generator-angular
To build everything go to the parent directory module we99 and do mvn clean install
To run the distribution build (slower because it uses minification on the frontend resources), use
mvn clean install -Pyo
This will produced an optimized war file in we99/we99-web/target. You can deploy this war file in any Java EE web server. An example of a possible tomcat deployment is provided at this link. Just unzip and run the tomcat startup script in the bin directory. Requires Java 8 to be installed.
Note: The Jetty deployment (see maven instructions below) is actually faster than the Tomcat deployment for various reasons. It is recommended you use Jetty if you desire the most optimal performance.
You can deploy the web application by going to the web-ui directory and using mvn clean jetty:run
Start a browser and go to http://localhost:8080/we99
The default user is we99.2015@gmail.com
See email chain for password
Adding new javascripts to the project can be done with bower. Bower is a tool for installing and managing front-end dependencies. To add new libraries, use the following commands in the ./we99/we99-web/src/main/webapp
bower install --save
(installs into bower_components. The --save option permanently adds the package to the bower dependency list)
grunt wiredep
Injects all bower dependencies (both css and js) into index.html
The project layout is based on the default layout from the yeoman angularJS generator. To add new files to the web application, you can use any of the yo commands listed at this page
For example, to create a new route for newthing you can do
yo angular:route newthing
This will create a route for newthing in app.js, and also generate the html and js files for the view and controller
After the generator finishes, feel free to rename or relocate files if they are not to your liking. Please make sure that you update the references if you move anything. For example, if you move an html partial file to a subdirectory, you should update app.js so that the html view path is correct.
- [Application Flow] (https://github.com/massfords/we99/wiki/Application-Flow-Mockups)
- Mockups
- Dose Response Curves