Chapter 3. Application deployment in CodeReady Studio

In order to deploy applications to a server from within the IDE, you must configure the IDE with information about the server. For a local server this information includes the following:

  • A server runtime environment with details about the server location, runtime JRE, and configuration files
  • A server adapter with management settings for the server runtime environment, including access parameters, launch arguments, and publishing options

JBoss Server Tools enables you to efficiently configure a local server ready for use with the IDE using Runtime Detection. As demonstrated here, this feature is useful for quickly configuring a server for deploying and testing an application.

The following section describes how to:

  • Configure a local server.
  • Configure a remote server.
  • Deploy your application.

3.1. Configuring a local server

Runtime Detection searches a given local system path to locate certain types of runtime servers. For any servers found, Runtime Detection automatically generates both a default server runtime environment and a default server adapter. These items can be used for immediate application deployment as is or they can be customized to meet your requirements.

The following section describes how to configure a local server in CodeReady Studio.

Procedure

  1. Start CodeReady Studio.
  2. Click WindowPreferences.

    The Preferences window appears.

  3. Enter JBoss Tools in the search field.
  4. Select JBoss Runtime Detection.

    The JBoss Runtime Detection window appears.

  5. Click the Add button.
  6. Locate the directory containing the runtime server.
  7. Click the OK button.
  8. Click the Apply and Close button.

Verification steps

  1. Click WindowShow ViewOther.

    The Show View window appears.

  2. Enter Servers in the search field.
  3. Select Servers.
  4. Click the Open button.

    The Servers view appears.

Your newly added local server is now listed in the Servers view.

3.2. Configuring a remote server

The following section describes how to configure a remote server.

Procedure

  1. Start CodeReady Studio.
  2. Press Ctrl+N.

    The New window appears.

  3. Enter Server in the search field.
  4. Select Server.
  5. Click the Next button.

    The Define a New Server window appears.

  6. Select the server type.
  7. Click the Next button.
  8. Select the Remote check box.
  9. Select one of the Controlled by options.
  10. Select the Server lifecycle externally managed check box.
  11. Assign runtimes to the server.
  12. Click the Next button.

    The Remote System Integration window appears.

  13. Click the Browse button in the Remote Server Home field.
  14. Specify the path to the directory that contains the remote server.
  15. Click the Finish button.

Verification steps

  1. Click the WindowShow ViewOther.

    The Show View window appears.

  2. Type Servers in the search field.
  3. Select Servers.
  4. Click the Open button.

    The Servers view appears.

Your newly added remote server is now listed in the Servers view.

3.3. Deploying an application

After configuring the local server, you can deploy applications to the server from the IDE using the server adapter. The server adapter enables runtime communication between the server and IDE for easy deployment of applications and server management.

The following section describes how to deploy an application to the server in CodeReady Studio.

Procedure

  1. Start CodeReady Studio.
  2. Right-click the target projectRun asRun on Server.

    The Run on Server window appears.

  3. Select the Choose an existing server check box.
  4. Expand localhost to select the server for deployment.
  5. Click the Finish button.

    The Console view appears.

Your application opens in the internal CodeReady Studio web browser.