Short answer, to avoid that awkward meeting where someone says the server on prod is different from dev. An executable JAR that contains the Open Liberty runtime gives you a self contained artifact that runs without an external installed server. For Java microservices and DevOps pipelines, that means fewer surprises and faster rollbacks when things go sideways.
Edit pom.xml to include the Open Liberty runtime dependency and the liberty maven plugin so server classes travel with your application code. Also add any feature dependencies your app needs, such as servlet support or JAX RS. The goal is a bootable jar that carries its own embedded server and required features.
Create server.xml fragments for the settings you need, for example feature list, http endpoints and logging. Point the liberty maven plugin at the server.xml you want included and set the packaging goal that produces a runnable archive. This configuration controls which features start and which ports open when the jar runs.
Use the normal Maven lifecycle to assemble the jar. A typical command is
mvn clean package
The liberty maven plugin will copy server artifacts and assemble a bootable jar that contains the Open Liberty runtime and your application code. Test the artifact on a developer machine with
java -jar target/myapp.jar
Verify endpoints, health checks and logs. Local testing reduces the risk of surprises during packaging and deployment.
If you deploy to WebSphere use the server deployment tooling or run the jar on infrastructure that supports the Java runtime. Alternatively publish the executable JAR to your artifact repository and let your CI CD pipeline pull it into the target environment. The artifact is portable and fits most deployment workflows.
The process is straightforward and useful. Add Open Liberty dependencies and the liberty maven plugin, configure the embedded server with server.xml fragments, build a runnable jar with mvn clean package, test it locally, and deploy to WebSphere or your artifact repo. You end up with an executable JAR that makes deployment simpler and less likely to surprise anyone who likes being blamed for outages.
I know how you can get Azure Certified, Google Cloud Certified and AWS Certified. It's a cool certification exam simulator site called certificationexams.pro. Check it out, and tell them Cameron sent ya!
This is a dedicated watch page for a single video.