June 3, 2016 | Written by: Bobby Woolf
Categorized: Community | Compute Services
Share this post:
WebSphere Liberty is the next generation application server, and Liberty and Eclipse make a great local development environment for developing Java EE applications. One task you’ll need to be able to perform is using Eclipse to to package a Liberty server and application. This will create a single archive file that can be used to install the application and its runtime on another computer.
In this excerpt from “Java EE, the next inception: Install a local Java EE development environment for WebSphere Liberty,” we’ll explore how to create a packaged Liberty server using Eclipse. That will conclude this series.
The next series explores how to develop and deploy Java EE applications to Bluemix.
To start at the beginning of this series, see WebSphere Liberty: Developing Java EE applications for the cloud.
Packaging a server
As explained earlier, packaging a server creates a compact archive for installing an application and its server configuration on another computer. Before packaging a server, first remove any unneeded features from the feature manager’s list of enabled features to make the archive as compact as possible.
To package a server using the WebSphere Developer Tools in Eclipse:
- In the Servers view, select the server you want to package.
- Expand the server’s tree view to see the projects associated with the server. These are the applications that will be packaged with the server, so remove any you do not want to include.
- If the server is running, stop the server.
- With the server selected, select Utilities > Package Server:
- In the Package Server dialog:
- Specify the archive file to create.
- Specify how much of the server to include, such as No runtime (usr).
- Click Finish.
You now have an archive file that contains the application packaged with the server configuration.