This project is a simple, MVC-based task management web application written in Java powered by Spring Boot. Its main purpose is to demonstrate implementation approaches for typical project automation requirements with the help of Gradle. The code of this project is featured in the book "Gradle in Action" published by Manning.
-
Usage of the Gradle Wrapper.
-
Support for a multi-project build.
-
Implements various testing strategies:
-
Unit testing with Spock.
-
Integration testing Spring test utilities.
-
-
Static code analysis with publishing of result to SonarCloud.
-
Deployment of the WAR file to Heroku.
The project includes a Jenkins pipeline definition file named Jenkinsfile
. The pipeline consists of the following steps:
-
Compile source code: Executes the Java compiler to turn production and test source code into byte code.
-
Execute unit tests: Runs the unit test suite for fast feedback.
-
Execute integration tests: Performs long-running integration tests.
-
Perform static code analysis: Analyzes the source code and identifies quality hotspots. For convenience reasons, the project uses the cloud-based service of Sonarqube.
-
Assemble the WAR file: Builds the final deliverable, a WAR file containing all resources needed in the runtime environment.
-
Deploy the deliverable to production: Pushes the WAR file to the Paas, Heroku, upon request.
You can directly run your application your local machine. There’s no need to install a Servlet container. In a terminal window execute the following command from the root level of the project:
Mac OS X/*nix
./gradlew bootRun
Windows
gradlew.bat bootRun
Open your browser of choice and navigate to the URL http://localhost:8080/
.