Liferay Workspace
Liferay Workspace is an environment designed to handle the full development life cycle (i.e. create, build, deploy, test) for Liferay DXP projects. Because it is implemented with Gradle scripts and plugins, Liferay Workspace integrates seamlessly with any IDE or development tool. It also works hand-in-hand with Liferay’s CLI utilities: Blade CLI, which exists to manage workspaces and projects, and the Liferay Cloud CLI, which exists to manage Cloud services and deploy client extensions to the Cloud Platform.
Prerequisites
Complete these prerequisites to install Liferay Workspace on your computer:
-
Install Java: Oracle JDK 11
-
Install Blade CLI with this command:
curl -L https://raw.githubusercontent.com/liferay/liferay-blade-cli/master/cli/installers/local | sh
A
Blade installed successfully
message is displayed after completing the installation. Typeblade
to check if the tool is working.NoteWhile we recommend using Blade to set up Liferay Workspace, you can also use Gradle to complete the process manually. See Creating a Liferay Workspace Manually for more information.
-
Install and configure the Liferay Cloud CLI by following these steps:
-
Run this command:
curl https://cdn.liferay.cloud/lcp/stable/latest/install.sh -fsSL | bash
If you get a permission error, try replacing
bash
withsudo bash
and running the command again.NoteFor Windows systems, find the link to download the Windows installer at Installing the CLI Tool.
-
Run
lcp login
to authenticate the tool with your Liferay Cloud Platform’s account. -
When prompted to open the browser, type
Y
and press the Enter key. -
Finally, log into your account and wait for the success screen. Your tool should then be authenticated.
-
-
Configure the CLI tool to point to Liferay Cloud Platform’s remote URL (
liferay.cloud
). See Configuring the CLI Remote for instructions. -
Run the
lcp login
command to authenticate the CLI tool with your platform account. -
Choose and install one of these IDEs in your computer:
- VS Code (recommended)
- Sublime Text
- Eclipse
- Intellij IDEA
Creating a Liferay Workspace
Follow these steps to generate your own Liferay Workspace:
-
In your command line interface, go to a directory or create an empty folder where you want to generate your workspace.
-
Run this command to see and choose your preferred DXP version:
blade init -l
TipDXP’s latest version is recommended.
-
Run this command with your chosen version and a name for your workspace:
blade init -v [Liferay version] [workspace name]
For example,
blade init -v clarity-workspace
If the command doesn’t return any errors, the workspace has been successfully generated and is ready to use. You can keep all development resources for the course here.
Next, we’ll introduce you to Client Extensions and explain how they relate to Liferay Workspace.
Up Next: Client Extensions
Additional Resources
Follow these links to troubleshoot installation and learn more about the tools covered in this article: