Get started Bring yourself up to speed with our introductory content.

Create a Java executable JAR with the Tomcat plug-in for Maven

The trend toward microservices development and Docker-based deployments turned the world of Java application packaging on its head.

It was once normal to install a single application server on a powerful piece of hardware, where you would then deploy multiple applications. The practice today is to package individual web applications within a single Java executable JAR file and then use an embedded Tomcat server as the servlet engine. You then package the Tomcat server embedded in the Java executable JAR in a Docker container, deployed to cheap, commodity-based hardware and managed at runtime by a microservices orchestration tool, such as Kubernetes or Docker Swarm. The key to all of this is the ability to run web apps in their own Java executable JAR.

An embedded Tomcat example

This video will step you through an embedded Tomcat example in which a simple Java application is deployed into a web-based runtime and packaged as a Java executable JAR. You will learn the steps to create a simple Java web app up to the stage before deployment to a Docker container begins.

The Tomcat plug-in for Maven

This particular embedded Tomcat example relies heavily on the Tomcat plug-in for Maven. Once installed and configured, the Tomcat plug-in for Maven performs a number of key tasks. It downloads the Java web server, builds the application and packages the required components in the Java executable JAR file. Without the Tomcat plug-in for Maven, this embedded Tomcat example would require twice as many steps.

Significance of the Java executable JAR

After you view the video and work through this embedded Tomcat example, you should also take away a deeper understanding of how the trend toward microservices and cloud-native computing impacts the way developers build enterprise applications, especially if you are a software professional with a history of Java Platform, Enterprise Edition-based development.

View All Videos

Join the conversation

1 comment

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

How does deploying individual Java web apps onto embedded Tomcat engines and packaging them in individual Java executable JAR files change the way you approach development?
Cancel

-ADS BY GOOGLE

SearchSoftwareQuality

SearchCloudApplications

SearchAWS

TheServerSide.com

SearchWinDevelopment

DevOpsAgenda

Close