A lightweight open framework for building fast and efficient cloud-native Java microservices:
- Open Liberty is fast to start up with low memory footprint and live reload for quick iteration.
- Simple to add and remove features from the latest versions of MicroProfile and Java EE.
- Zero migration lets you focus on what's important, not the APIs changing under you.
Launch a sample app using Maven
git clone https://github.com/OpenLiberty/sample-getting-started.git
cd sample-getting-started
mvn clean package liberty:run
Open browser to http://localhost:9080/ and explore the demo application.
See this guide to learn how it works.
- This guide demonstrates development using Docker containers.
- This guide demonstrates development using the Liberty Maven Plugin.
- This reference demonstrates the basic server operation commands.
Our CONTRIBUTING document contains details for submitting pull requests.
FYI: The project recently renamed master branch to release. More info here: https://github.com/OpenLiberty/open-liberty/wiki/Master-rename-to-Release
-
Clone the repository to your system.
git clone [email protected]:OpenLiberty/open-liberty.git -
Run a gradle build.
Prerequisite - Environment variable
JAVA_HOMEmust point to a Java 17 or Java 21 SDK. If settingJAVA_HOMEto Java 17, you will also need to setJAVA_21_HOMEto a Java 21 SDK.cd open-liberty/dev ./gradlew cnf:initialize ./gradlew assembleTroubleshooting - If
./gradlew assembleshows out of memory error, you can increase the memory indev/gradle.propertiesfile. Stop the gradle daemon after you change the memory setting by using./gradlew --stop. If it does not help the problem, try cleaning up your maven repository cache (usingrm -rf ~/.m2) and gradle cache (usingrm -rf ~/.gradle/caches). -
Run the unit or FAT tests.
./gradlew testfor unit tests./gradlew build.example_fat:buildandrunto run a FAT projectNOTE:
./gradlew buildruns theassembleandtesttasks -
Perform a local release
./gradlew releaseNeededNOTE: This task releases all projects to the local releaseRepo. The final openliberty zip can be found in
open-liberty\dev\cnf\release\dev\openliberty\<version>\openliberty-xxx.zip
Usage is provided under the EPL 2.0 license See LICENSE for the full details.