Chapter 3. JBoss EAP and JBoss WFK basics in CodeReady Studio

Eclipse IDE supports application development and deployment with Red Hat JBoss Enterprise Application Platform (JBoss EAP) and Red Hat JBoss Web Framework Kit (JBoss WFK). However, you need to configure Maven repositories first. This configuration is essential for using the enterprise versions of the example Maven projects provided in Red Hat Central. These projects are intended for deployment to JBoss EAP and require IDE access to JBoss EAP and JBoss WFK repositories.

The following section describes how to use CodeReady Studio to:

  • Configure Maven repositories.
  • Set up JBoss EAP.
  • Verify that JBoss EAP and CodeReady Studio are working correctly.

3.1. Configuring Maven repositories

The following section describes how to configure Maven repositories.

Procedure

  1. Start CodeReady Studio.
  2. Click WindowPreferences.

    The Preferences window appears.

  3. Enter JBoss Tools in the search field.
  4. Select JBoss Maven Integration.

    The JBoss Maven Integration window appears.

  5. Click the Configure Maven Repositories button.

    The Maven Repositories window appears.

  6. Click the Add Repository button.

    The Add Maven Repository window appears.

  7. Click the down-arrow in the Profile ID field.
  8. Select the redhat-ga-repository.

    Other fields are populated automatically.

  9. Click the OK button.
  10. Click the Finish button.

    The Confirm File Update window appears.

  11. Click the Yes.
  12. Click the Apply and Close button.

Additional resources

3.2. Setting up JBoss EAP

To set up JBoss EAP in Eclipse IDE, you must direct the IDE to the local or remote runtime servers. This establishes a communication channel between the IDE and the JBoss EAP server for efficient deployment and server management workflows.

The following section describes how to install JBoss EAP in CodeReady Studio.

Prerequisites

Procedure

  1. Start CodeReady Studio.
  2. Start Git Perspective.
  3. Click WindowPreferences.

    The Preferences window appears.

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

    The JBoss Runtime Detection window appears.

  6. Click the Download button.

    The Download Runtimes window appears.

  7. Select one of the JBoss EAP versions.

    Note

    If you select the JBoss EAP version 6.0.x or earlier, follow the on-screen instructions. If you select a later version, follow the instructions below.

  8. Click the Next button.
  9. Click the Add button.
  10. Enter your access.redhat.com username and password.
  11. Click the OK button.

    The Secure Storage Password window appears.

  12. Enter the new master password.

    Optionally, you can provide a password hint.

  13. Click the Next button.

    Review the license agreement, if satisfied, accept the license and click the Next button to continue with the installation.

  14. Click the Browse button to select the Install folder.
  15. Click the Browse button to select the Download folder.
  16. Click the Finish button.

    The Download Red Hat JBoss EAP) window appears.

    Note that downloading and installing the Runtime might take a while.

  17. Ensure the path to the JBoss EAP installation file is checked.
  18. Click the Apply and Close 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 JBoss EAP is now listed in the Servers view.

3.3. Verifying that JBoss EAP and CodeReady Studio are working correctly

The following section describes how to verify that JBoss EAP and CodeReady Studio are working correctly by building, deploying, and running the imported helloworld application in the JBoss EAP server.

Procedure

  1. Start CodeReady Studio.
  2. Open Git Perspective.
  3. Open Project Explorer.
  4. Click the Red Hat Central icon.

    Figure 3.1. Click the Red Hat Central icon

    red hat central crs
  5. Enter helloworld into the search field.
  6. Click the helloworld-rs quickstart.

    The New Project Example window appears.

  7. Click the Finish button.

    Note that it might take some time for the helloworld application and its Maven dependencies to get imported. Once all the dependencies are imported, the New Project Example window appears.

  8. Click the Finish button.
  9. In the Server view select the Red hat JBoss EAP.
  10. Click the Start the Server icon.

    Figure 3.2. Click the Start the Server icon

    start the server crs
  11. In the Project Explorer view right-click the jboss-helloworld-rsRun AdRun on Server.

    The Run on Server window appears.

  12. Click the Finish button.

    The helloworld application opens in the internal CodeReady Studio web browser.

  13. Choose between the JSON or XML format.

The CodeReady Studio web browser prints the Hello World! message.