DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. JavaEE 8 + Payara 5 + MicroProfile 2.1 + Docker in About a Minute

JavaEE 8 + Payara 5 + MicroProfile 2.1 + Docker in About a Minute

Getting started with microservices is quick and easy. All you need is a few terminal commands and you'll be up and running in under a minute.

Ivo Woltring user avatar by
Ivo Woltring
·
Feb. 13, 19 · Tutorial
Like (5)
Save
Tweet
Share
10.00K Views

Join the DZone community and get the full member experience.

Join For Free

Thin Wars to the Rescue

It can be really easy to start on your JavaEE application. It’ll take you about a minute…

In this minute you will get a project with:

  • JavaEE 8.
  • MicroProfile 2.1.
  • Preconfigured Payara 5 full server Docker container.
  • Maven essential setup.
  • Run and build scripts for all of this.

The Minute Has Started…

Enter the code below in a terminal where you want to create your project and press enter.

mvn archetype:generate \
  -DarchetypeGroupId=nl.ivonet \
  -DarchetypeArtifactId=javaee8-payara-microprofile-archetype \
  -DarchetypeVersion=1.0 -U        

The first time you run this command, it will take just a bit more time as it will
download everything needed from the Maven central repository.

You will be asked these questions:

Define value for property 'groupId': YOUR_GROUP_ID_HERE         
Define value for property 'artifactId': helloworld          
Define value for property 'version' 1.0-SNAPSHOT: :          
Define value for property 'package' com.example: :          
Define value for property 'docker-hub-name': YOUR_DOCKER_HANDLE_HERE        

Just follow the instructions and your project will be created:

cd helloworld
./run        

This will start the project in a Docker container. The Docker container will be downloaded the first time and that might take more than the minute depending on the speed of your internet connection. After the first time, it will only take seconds.

Now go to http://localhost:8080/helloworld/rest/example and you will have a working
example HelloWorld application.

Done!

After Burner

Now you can load it into your favorite IDE and start building your own stuff. Don’t forget to read the README.md of the project to learn more about the available commands.

Have fun.

Docker (software)

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Connecting Your Devs' Work to the Business
  • Easy Smart Contract Debugging With Truffle’s Console.log
  • Kubernetes vs Docker: Differences Explained
  • Writing a Modern HTTP(S) Tunnel in Rust

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: