Java ee microservices starter-kit with payara-micro and docker

View on GitHub

Java EE micro service starter kit with docker, payara micro, arquillian on AWS Cloud


  1. JDK 1.8
  2. Gradle 3.x
  3. Docker
  4. AWS Cli

Setting up properties

Before changing properties you need to setup:

Change aws config in

## EC2 Container Repository
## Elastic beanstalk s3 deployment bucket
## Elastic beanstalk config

Building project

gradle clean build -Penv=local

Starting embedded server

Server will be running on default port 8080

gradle startServer

Starting unit tests:

gradle test

Starting integration test with arquillian:

Before tests docker compose hast to be started because you may need an local data store which you can run in docker.

Run compose once:

gradle dockerCompose

Then start tests:

gradle itest

Starting/stopping docker server

gradle startDocker
gradle stopDoker

Publishing to ecr repository

This command creates elastic beanstalk application deployment version and publish baked container to EC2 Container Repository:

gradle clean publishToECR -Penv=prod 

Example running apps manually:

You can simply run them as jar applications or you can configure your ide to run jar application so you can debug it.

gradle build -Penv=local
java -jar ./pajara-micro.jar --deploy ./build/libs/starter-1.0.0.war

note if you did not download payara micro run

gradle downloadPayaraMicro