Liberty is an open source tool to allow deploying artifacts into Open Liberty or IBM Websphere Liberty servers. It provides a deploy builder that will assist in the necessary configuration for the deployer service. Using the deployer service, the following actions are currently supported:
- install artifact
- uninstall artifact
- start artifact
- stop artifact
- restart artifact
- get a list of installed artifacts
- get a list of installed artifacts for a given package
- change the autostart configuration (only supported for the custom strategy)
An artifact is a java package (war, ear, etc) that is currently supported by Open Liberty or IBM Websphere Liberty.
Right now, Liberty is supplied only as an importable dependency, but a CLI version is set to be developed as part of the roadmap.
Import using Maven or Gradle:
<dependency>
<groupId>io.github.asseco-pst</groupId>
<artifactId>liberty</artifactId>
<version>...</version>
</dependency>
compile group: 'io.github.asseco-pst', name: 'liberty', version: '...'
- Clone the project
git clone git@github.com:asseco-pst/liberty.git
- Run the following command on the root of the project:
gradlew build
To be developed as part of the roadmap.
Install a new artifact in a Liberty Server
// Sets up the deployment service
IDeployService deployService = deployBuilder
.setProfileDetails('<server_uri>>', '<server_port>', '<username>', '<password>')
.setDeployStrategy(Strategy.DROPINS)
.setArtifactPath("<path_to_artifact>")
.build()
// Installs and starts the artifact on the Liberty server
deployService.connect().installArtifact().await(2000).startArtifact()