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 3.2, “Project Archives View”) and customize packaging yourself.
As it has been already mentioned Servers view contains two parts: the top part that displays all defined servers and the bottom part which provides categories with additional information. Thus, in this section we suggest two more ways to deploy resources onto the server.
In the top part of the Servers view you should right click on a server and select the menu item.
This will bring up a dialog (see Figure 5.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 3.2, “Project Archives View”), it will be published according to the rules of that module type.
In the bottom part of Servers view there is a category called Modules which should display all currently-published modules on the server. 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.
In the Project Archives View you can right-click on any declared archive and select the Publish To Server element. For more on this subject, see Section 3.2.4, “Publishing to Server” in the Project Archives View section.
The only way to ensure an Incremental Build, such as changes to one .jsp
, .html
, or .class
file, is to enable the builder for that project. This is done by either changing the global preferences for the Archives View, or by enabling project-specific preferences and ensuring the builder is on.
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).