Looking for information about developer tools to use with WebSphere Liberty? Start here…
As developers we hold the tools we use near and dear to our hearts. The debugger is one of my most essential tools, and my use of Eclipse goes back to VisualAge (yikes) for its debugger! We believe that the Liberty ecosystem of tools that you use to create and build your applications is as important as the server itself.
This article discusses some of the tools you can use with Liberty. We would love to hear what other tools you are using that are crucial to your development experience.
WebSphere Developer Tools
The WebSphere Developer Tools (WDT) are lightweight tools, running in Eclipse, for developing, assembling, and deploying applications to WebSphere Application Server Liberty and traditional servers. You can download Eclipse and WDT for free. WDT can help you develop many applications types:
- Enterprise applications
- Web applications
- Apache Maven projects
- Web service applications
- OSGi applications
The power of WDT shines during development with:
- Control over the Liberty server with support for start, stop, debug, view logs, and more
- Incremental application publishing with minimal restarts so that you can write and test your changes locally without having to go through a build/publish cycle or restart the server
- Debug support so that you can easily step through your applications
- Content-assist for server configuration. Server configuration is minimal, but the tools help you find what you need and identify finger-checks, etc
The Liberty Maven plugin (ci.maven) provides goals for managing a Liberty runtime within a Maven project. Our most common use cases focus on Maven projects using the
liberty-assembly packaging types. In version 2.0 of the Liberty Maven plugin, we focused on simplifying POMs, improving WDT integration, and improving the overall experience.
We also made significant updates to the latest versions of WDT and the Liberty Maven plugin to improve your WDT experience when working with Liberty servers managed by Maven WAR projects. Be sure to grab WDT 126.96.36.199 and use version 2.0 of the
liberty-maven-plugin. When your Maven web application project installs a Liberty server, the Eclipse tools can automatically recognize and add the server and runtime to the workbench for easier server interactions.
For Maven WAR projects, you can do things like build your Liberty server within the target of the project, install Liberty features, install your application as a WAR file or as a loose application (more on that later), and create a server archive ready for deployment. Using the
war packaging type, your WAR file is deployed to the local Maven repository and is available to other projects as a dependency.
Liberty assembly projects
You can do similar things when using the
liberty-assembly packaging type. You typically install the Liberty server, install additional features if needed, install application EAR or WAR files from other dependent projects, and create a server package that is installed to your local Maven repository. You can also include application code in a liberty-assembly project if you want. In the 2.0 release of the plug-in, we have bound more goals to the default lifecycle for liberty-assembly projects.
More on v2.0
One of the most significant improvements to the Liberty Maven 2.0 plug-in is support for loose applications. While developing your application, you can install it as a loose application so that you don’t have to constantly repackage the WAR file. Instead, you simply re-compile your code or update files, and your running application is updated! When you are using WDT and your files are automatically compiled, you just change the Java source and your application is updated. From the command line, a simple
mvn compile gets the job done. Check out the
looseApplication parameter for the
In addition to loose application support we have also added:
- The ability to copy a configuration directory rather than one file which is useful if you are using included configuration files.
test-stop-servergoals that honor common skip test mechanisms.
- The ability to easily update your Liberty license to a production license.
liberty-archetype-webapparchetype to create a new sample web project.
liberty-maven-app-parentparent POM that binds commonly used
liberty-maven-plugingoals to the default lifecycle.
liberty-assemblyautomatically binds more goals to simplify your POM.
See Liberty Maven plug-in release 2.0 differences for more information on the release.
Also, many of the samples in https://github.com/WASdev/ already use the version 2.0
liberty-maven-plugin. Some examples use our new parent POM. Others include the needed bindings directly in the project POM.
The Liberty Maven Plug-in 2.0 release is available on the Maven central repository.
The ci.gradle project provides a Liberty Gradle plugin with tasks for managing Liberty servers and applications. If Gradle is your build tool of choice, you can use this plugin manage your environment with tasks like:
- Install the Liberty runtime
- Install and uninstall Liberty features to the runtime
- Create Liberty servers
- Start, stop, run, package, dump, debug, check status for Liberty servers
- Deploy and undeploy applications to a running server
- Clean the server to remove logs, apps, and workarea files
- Package the Liberty server as an archive file
The ci.ant project provides a collection of Ant tasks for managing WebSphere Application Server Liberty servers and applications. If you are writing Ant scripts, use this resource to manage Liberty. You can:
- Install a Liberty runtime
- Install and uninstall Liberty features to the runtime
- Issue Liberty server commands such as create, start, run, stop, package and more.
- Deploy and undeploy applications to a running server.
- Clean the server to remove logs, apps, and workarea files.
- Compile JSP files
Most of these ant tasks provide access to their equivalent Liberty command line functions. The Maven plug-in uses these tasks and adds more smarts derived from the Maven project structure and liberty-maven-plugin goals. The Gradle plug-in provides a wrapper to these Ant tasks.
Check out our downloads, videos, and additional information, and let us know how we can help.
Ask a question on Stack Overflow or on one of our Git repositories.
Downloads and Resources
- WebSphere Developer Tools downloads
- WebSphere Developer Tools for Eclipse Knowledge Center
- https://github.com/WASdev/ – A collection of samples to help you learn more about Liberty. It is also home of the following Git repositories including their documentation:
- Liberty app accelerator – Start building your own apps for WebSphere Liberty.
- WDT in Eclipse and Maven Integration
- Importing Liberty Maven plug-in projects into Eclipse
- Back to basics: Debug a Liberty app in Eclipse with WDT
- Getting started using the Liberty app accelerator
- Get started with a Hello World app on Liberty using IntelliJ IDEA
- Creating a Hello World app with Spring MVC on Liberty
- Writing tests for Liberty apps