Always commit on branch dev
Never commit your version of dev.properties
We provide a development environments with a Vagrant box based on Ubuntu with Java7, Maven3, Node and Bower installed.
- Install VirtualBox and VirtualBox Extension Pack
- Install Vagrant - Require Version 1.3.4 or more
- Open a terminal
- Clone the project
git clone [email protected]:haklop/myqapp.git
cd myqapp
- Start the VM
vagrant up
- Once the machine has booted up, you can shell into it by typing
vagrant ssh
- From the /vagrant directory:
mvn clean jetty:run
- Go to http://localhost:8080
Vagrant will mount your local directory myqapp on /vagrant
Ignore uncommitted changes on dev.properties: git update-index --assume-unchanged src/main/resources/dev.properties
- Create a new project on the Google API's Console. The result of this registration process is a set of values that are known to both Google and your application. WHen requesting a client ID, the callback have to be http://localhost:8080/api/google/callback.
- On dev.properties, replace google.oauth.key and google.oauth.secret respectively by the by the Client ID and Client secret given by Google.
- Go to https://trello.com/1/appKey/generate
- On dev.properties, replace trello.oauth.key and trello.oauth.secret respectively by the key and the secret generated by Trello.
- Create a private board on Trello with 8 lists.
- Replace editingprocess.add.board.id and editingprocess.stats.board.id by the board's id. To simply get the board's id, create a map in the first column and export it as JSON. Locate idBoard on the generated json.
- Go to https://github.com/settings/applications/new and register the application. The callback have to be http://localhost:8080/api/github/callback.
- On dev.properties, replace github.oauth.client.id and github.oauth.client.secret respectively by the Client ID and the Client Secret generated by GitHub.
Create an admin user on Vagrant environment:
mongo
use myqapp
- Replace the attribute _id with your email and execute:
db.userProfile.insert({
"_class" : "com.infoq.myqapp.domain.UserProfile",
"_id" : "[email protected]",
"authorities" : [ "ROLE_EDITOR", "ROLE_ADMIN" ],
"firstName" : "John",
"lastName" : "Smith",
"secretGithub" : "",
"secretTrello" : "",
"tokenGithub" : "",
"tokenTrello" : ""
})
By default, MyQApp is starting on port 8080.
// TODO
The app directory contains the frontend and the src directory contains the backend.
Dependencies are managed with Bower. Grunt is used for building.
Add a dependency:
bower install <my_dependency> --save
Dependencies and build are managed with Maven.
You may also need to provide a plugin group in your /.m2/settings.xml to be able to use the short name of the plugin on the command line.
To do so, simply add the following to your settings.xml:
<pluginGroups>
<pluginGroup>com.atlassian.maven.plugins</pluginGroup>
</pluginGroups>
Create the release branch and set the release version. Release-start creates a release branch and sets the pom version.
mvn jgitflow:release-start
Finish the release and set the next snapshot version. Release-finish creates the release tag, merges the release branch into master, deletes the release branch and push everything to the scm.
mvn jgitflow:release-finish
When something is pushed to master, the application is automatically deployed on the server.
For building the war, use the script build.sh. You must have Nodejs, Bower, Grunt and Maven installed.