Skip to content

Latest commit

 

History

History
161 lines (110 loc) · 4.87 KB

File metadata and controls

161 lines (110 loc) · 4.87 KB

Describe all different ideal template projects for developing Cloud Native application with Open Liberty

Note
This repository contains the guide documentation source. To view the guide in published form, view it on the Open Liberty website.

Drafting: Describe all different ideal template projects for developing Cloud Native application with Open Liberty.

Basic ideal template project

Descibe and explain each required file for the basic ideal template project. Testing <testing>.

Assume that the project is a simple RESTful microservice by using MicroProfile features.


Maven configuration file

pom.xml

link:basic-hotspot/pom.xml[role=include]
pom.xml

(To be confirmed) Users will update the groupId, artifactId, and version.

~ what should the groupId be?
~ what should the artifactId be?
~ assume that version is 1.0-SNAPSHOT

(To be confirmed) The project is targeted to package the microserive as a war file.

(To be confirmed) Currently, we define <version.*/> properties for the plugin version.

~ is it necessary?
~ if yes, why not the <dependency/>?
~ suggest not need to do that

(To be confirmed) We define ports properties for the server and test, so that both can pick up the same ports if users change them.

(To be confirmed) We define the 2 provided dependencies: jakartaee and microprofile.

(To be confirmed) Assume to use Microshed Testing (MST), so we define those test dependencies.

(To be confirmed) We define <finalName/> as the artifactId.


Gradle configuration file

build.gradle and settings.gradle

~ Should include Gradle project?


Liberty server configuration file

pom.xml

link:basic-hotspot/pom.xml[role=include]

server.xml

link:basic-hotspot/src/main/liberty/config/server.xml[role=include]
src/main/liberty/config/server.xml

(To be confirmed) Users will update the description

(To be confirmed) The minimal set of features are: jaxrs-2.1, …​

~ what should the minimal set of features be?
~ should include mpHealth feature?

(To be confirmed) The httpEndpoint ports are defined by the defaultValue of the default.http.port and default.http.port variables. They can be overridden through the pom.xml.

(To be confirmed) The webApplication location should be ${artifactId}.war. The contextRoot is defined by the defaultValue of the app.context.root variable. It can be overridden through the pom.xml.

~ Should externalize the context root?


Application class

src/main/java/io/openliberty/templates/basic/SimpleRestApplication.java

Endpoint class

src/main/java/io/openliberty/templates/basic/SimpleRestEndpoint.java

Unit Test


Integration Test


Dockerfile

Use the Liberty Development Mode to develop microservice

Change the server port

Build docker image

  • When build docker image, should the artifacts be from src or target?

Run docker image