Enterprise Java

Liberty on Oracle Application Container Cloud

In this blog post, I will describe how to deploy the CloudEE Duke application packaged in a Liberty über-jar to Oracle Application Container Cloud.

The deployment artifact required for deployment in Oracle Application Container Cloud is a ZIP archive containing the application über-jar and a manifest file (manifest.json). The Liberty version of the manifest.json for CloudEE Duke is listed below.


    "runtime": {
        "majorVersion": "8"
    "command": "java -jar cloudee-duke.jar",
    "release": {
        "version": "1.0",
        "build": "1",
        "commit": "123"
    "notes": "Dukes says hello from Liberty"

You need to specify the port for Liberty to use. This cam be done by configuring it in the server.xml using the environment variable ${env.PORT}  as shown here:

<server description="Sample Liberty server">
    <httpEndpoint  httpPort="${env.PORT}" 
                   host="*" />
    <quickStartSecurity userName="duke" userPassword="duke"/>
    <keyStore id="defaultKeyStore" password="Liberty"/>

The über-jar is produced by using a combination of the Maven Resources Plugin as well as the Liberty Maven Plugin:


See the complete pom.xml for an example on how to produce the deployable ZIP archive with the maven command:

mvn clean package assembly:single -Pliberty

This will produce a file called cloudee-duke-oracle-liberty.zip  in the target folder. This is the ZIP archive you will deploy to Oracle Application Container Cloud as shown in the screenshot below.

When your application is deployed, you should be able to access the hello endpoint


Duke says Hello!

You will also have the health and metrics endpoints provided by the MicroProfile implementation


outcome: “UP”,
checks: [ ]


# TYPE base:classloader_total_loaded_class_count counter
# HELP base:classloader_total_loaded_class_count Displays the total number of classes that have been loaded since the Java virtual machine has started execution.
base:classloader_total_loaded_class_count 9430
# TYPE base:cpu_system_load_average gauge

Published on Java Code Geeks with permission by Ivar Grimstad, partner at our JCG program. See the original article here: Liberty on Oracle Application Container Cloud

Opinions expressed by Java Code Geeks contributors are their own.

Ivar Grimstad

Ivar Grimstad is an experienced software architect focusing on Enterprise Java. He is participating in the Java Community Process as a member of the Expert Groups for JSR 368 (JMS 2.1), JSR 371 (MVC 1.0), JSR 375 (Java EE Security API). He is also a member of the NetBeans Dream Team.
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Inline Feedbacks
View all comments
Back to top button