Example Java webapp infrastructure for Continuous Delivery
This is an example of a Java webapp project which supports techniques for continuous delivery.
Core concepts are:
- Embedded Jetty webapp for lightweight configuration, ease of use and single self contained deployment of a single binary to any environment.
- Scripted deployment of the app which supports both push and pull deployment.
Content:
- settings.xml.example: Example settings.xml. Rename and put in ~/.m2.
- pom.xml: Parent pom for the entire project.
- database/: Contains code for generating DB schema with Liquibase.
- core/: Domain objects and Dao's.
- webapp/: Embedded Jetty webapp artifact. Contains the deployable webapp artifact.
- scripts/: Contains scripts for deploying, starting and monitoring of the webapp.
- config/: Contains config for the app and the deploy script.
Preconditions:
- CI environment (e. g. Jenkins)
- Artifact repository (e. g. Nexus)
- Database (e. g. MySQL)
Usage:
- Build it:
mvn clean install
- See Readme.md in sub projects for usage of the different artifacts.
Releasing:
mvn release:prepare -DdryRun=true -Dintegration=false
mvn release:clean release:prepare release:perform -Dintegration=false -Dgoals=deploy
Skipping targets:
The following options are available to skip certain targets:
-DskipTests
(skip all tests)
-Dintegration=false
(skip all integration tests)
-DskipAssembly
(skip war packaging, appassembler and zip assembly)