In this tutorial, you’ll learn how to generate a Liferay Workspace using IntelliJ IDEA, which runs on Blade CLI behind the scenes. IntelliJ gives you a graphical interface instead of the command prompt, which can streamline your workflow. You’ll also learn how to import an existing Liferay Workspace into IntelliJ. To learn more about Liferay Workspaces, visit its dedicated tutorial section.
Creating a Liferay Workspace
Follow the steps below to create a Liferay Workspace:
Open the New Project wizard by selecting File → New → Project. If you’re starting IntelliJ for the first time, you can do this by selecting Create New Project in the opening window.
Select Liferay from the left menu.
Choose the build type for your workspace (i.e., Gradle or Maven). Then click Next.
Specify your workspace’s name, location, intended Liferay Portal version, and SDK (i.e., Java JDK). Then click Finish.
A window opens for additional build configurations for the build type you selected (i.e., Gradle or Maven). Verify the settings and click OK.
Awesome! You’ve successfully created a Liferay Workspace in IntelliJ IDEA!
Importing a Liferay Workspace
To import an existing workspace into IntelliJ, follow the steps below:
Select File → New → Project from Existing Sources….
Select the workspace you want to import. Then click OK.
Click the Import project from external model radio button and select the build tool your workspace uses (e.g., Gradle or Maven).
Configure the project import (if necessary) and then click Finish. See the Import a Project section of IntelliJ’s official documentation for more information.
Step through the remaining import prompts and then open your imported workspace as you desire (i.e., in the current window or a new window).
Excellent! Your existing Liferay Workspace is now imported in IntelliJ IDEA!