Back to Catalog

Creating a multi-module application with Gradle

BeginnerGuided Project

You will learn how to build an application with multiple modules with Gradle and Open Liberty.

Language

  • English

Topic

  • Open Liberty

Skills You Will Learn

  • Open Liberty, Jakarta EE, MicroProfile, Gradle

Offered By

  • OpenLiberty

Estimated Effort

  • 30 minutes

Platform

  • SkillsNetwork

Last Update

  • June 25, 2025
About this Guided Project
A Jakarta EE application consists of modules that work together as one entity. An enterprise archive (EAR) is a wrapper for a Jakarta EE application, which consists of web archive (WAR) and Java archive (JAR) files. To deploy or distribute the Jakarta EE application into new environments, all the modules and resources must first be packaged into an EAR file.

In this guide, you will learn how to:
  • establish a dependency between a web module and a Java library module,
  • use Gradle to package the WAR file and the JAR file into an EAR file so that you can run and test the application on Open Liberty, and
  • use the Liberty Gradle plug-in to develop a multi-module application in dev mode without having to prebuild the JAR and WAR files. In dev mode, your changes are automatically picked up by the running Liberty instance.
You will build a unit converter application that converts heights from centimeters into feet and inches. The application prompts the user to enter a height value in centimeters. Then, the application processes the input by using functions that are found in the JAR file to return the height value in imperial units.

Instructors

Gilbert Kwan

WAS software developer

I am an advisory software developer of WebSphere Application Server, now, I am the Open Liberty guides lead. Visit this blog https://openliberty.io/blog/2021/11/25/GilbertKwan_MeetTheTeam.html if you like to know me more.

Read more