JBoss.orgCommunity Documentation
In this chapter it will be described how to deploy modules onto the server.
There are several ways to deploy to a server, provided by the Web Tools Platform (WTP) and some additional methods provided by JBoss Tools. These methods are described further in this chapter.
On the package explorer it is possible to publish either a project to a server or just a single file. Let's look at how to do this.
The first WTP method is to right-click on a project, such as a Dynamic Web project, EJB project, or EAR project and then select
→ . The resulting dialog allows you to select which supporting server the project can be published to.Click the
button to see add or remove projects page where you can choose projects to configure them on server.This page of the wizard also allows to undeploy modules from the server. For that choose proper module(s) from the right and click the
. The modules will be completely undeployed after restarting your server or republishing.
Generally, for the JBoss AS Server Adapters, publishing using this method will force a default, best-guess, packaging configuration for your project. This best-guess does not publish incrementally, but instead repackages your entire project into a .war
, .jar
, or .ear
as appropriate and then copies that file into the proper deploy directory. For quicker smarter deployment, you will need to create archives using the Project Archives view (see Section 7.1, “Project Archives View”) and customize packaging yourself.
The root elements of the Servers View are the server objects. Expanding these, you will see the modules listed. With this in mind, we suggest two more ways to deploy resources onto the server.
For the first method, you should right click on a server and select the
menu item.This will bring up a dialog (see Figure 6.2, “Add or Remove Projects”) that allows you to either publish projects or modules to a server, or remove them from the server. If the selected module is a project like a Dynamic Web project, EJB project, or EAR project, it will be published as through Run on Server wizard, with a best-guess full package. If, however, the selected element is an archive from the Project Archives view (see Section 7.1, “Project Archives View”), it will be published according to the rules of that module type.
Nested beneath each server, there is a list of modules. Each module displays the module name, as well as decorated information on the module's various states. Right-clicking on the desired module and selecting
will force a full rebuild of the entire module.Here, Incremental Publish is meant to enable publishing of only those parts where changes have been made.
You can also use the "Finger touch" button for a quick restart of the project without restarting the server:
The "Finger" touches descriptors dependent on project (i.e. web.xml
for WAR, application.xml
for EAR, jboss-esb.xml
in ESB projects).