Deploy applications to Liberty servers using developer tools
We can add applications to the server by right-clicking on the server in the Servers view then selecting Add and Remove from the menu.
This task assumes that the application is in the Eclipse workspace. If we have a prebuilt application archive file we want to add and run, we must first import the file into the Eclipse workspace. Alternatively, we can use the steps described in Deploy applications in Liberty.
When we add an application to the server, the workbench tries to determine which features are required by the application and enables them in the server configuration for you if they are not already enabled.
- In the Servers view, right-click the server and select Add and Remove.
- In the Add and Remove wizard, under the Available list, select the applications we want to add then click
Add. Or click Add All to add all available
applications to the server.
Important: If the application contains errors, we can receive a warning. Select Cancel to cancel publishing and fix your errors, or select OK to publish the application without correcting the errors. We can select Always publish applications with errors on this server to stop receiving a warning when you attempt to publish an application containing errors.
- Alternatively, we can right-click on an application in the Project Explorer view and select Run As > Run on Server, or Debug As > Debug on Server. This adds the application to the server (if not already added), starts the server (if not already started) and runs the application.