Mastering Liferay Workspaces and Tooling

Course Overview

Setting Up Clarity's Developer Workspace

You can create a Liferay Workspace from scratch using Blade CLI commands or Liferay Developer Studio. Clarity plans to experiment with both methods to determine the best approach for their needs. Here, you’ll practice creating workspaces using both methods.

If you're building client extensions, refer to the liferay-sample-workspace on GitHub for an example of each type of client extension.

Exercise: Creating Liferay Workspaces Using Blade

  1. Open a terminal window.

  2. Navigate to the location where you want to create your workspace.

  3. Run this command:

    blade init clarity-blade-workspace

    This returns a list of available Liferay products and versions you can use for your workspace:
    Use blade to see a list of available Liferay products and versions you can use for your workspace
    Alternatively, if you know your Liferay version, you can specify it as part of your blade init command (e.g., -v dxp-2024.q3.6).
  4. Enter 1 to select the latest version.
    Tip: Unless you need a specific version, Liferay recommends the latest release.

  5. Verify a new folder called clarity-blade-workspace appears.

This generates a new folder with all the files needed for your workspace:

A folder with all the files needed for your workspace is created.

Exercise: Create Liferay Workspaces Using Liferay Developer Studio

  1. Open Liferay Developer Studio.

  2. Select the directory you want to use for your workspace.
    Select the directory you want to use for your workspace.

  3. Click Launch.

  4. In the Welcome window, click New Liferay Workspace.

  5. Alternatively, open the File drop-down menu and select NewLiferay Workspace Project.

  6. For project name, enter clarity-lds-workspace.

  7. For build type, select Gradle.

  8. For product version, select dxp-2023.q3.9.
    For product version, select dxp-2023.q3.9.

  9. Click Finish.

  10. Verify the workspace appears in the Project Explorer panel:
    Verify the workspace appears in the Project Explorer panel.
     

Exercise: Import Existing Workspaces into Liferay Developer Studio

You can also import existing workspaces into Liferay Developer Studio. Here, you’ll import clarity-blade-workspace.

  1. Open the File drop-down menu and select Open Projects from File System.

  2. For Import Source, select the clarity-blade-workspace project.
    For Import Source, select the clarity-blade-workspace project.

  3. Click Finish.

  4. Verify the workspace appears in the Project Explorer panel:
    Verify the workspace appears in the Project Explorer panel.

Conclusion

Great! You've successfully created Liferay Workspaces using both Blade CLI and Liferay Developer Studio. Next, you'll learn how to manage workspace versions and ensure you're always working with the latest features and improvements.

  • Exercise: Creating Liferay Workspaces Using Blade

  • Exercise: Create Liferay Workspaces Using Liferay Developer Studio

  • Exercise: Import Existing Workspaces into Liferay Developer Studio

  • Conclusion

Loading Knowledge

Capabilities

Product

Education

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy