Creating a Liferay Workspace with IntelliJ IDEA

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:

  1. Open the New Project wizard by selecting FileNewProject. If you’re starting IntelliJ for the first time, you can do this by selecting Create New Project in the opening window.

  2. Select Liferay from the left menu.

  3. Choose the build type for your workspace (i.e., Gradle or Maven). Then click Next.

    intellij-workspace-build.png

    Figure 1: Choose Liferay Gradle Workspace or Liferay Maven Workspace, depending on the build you prefer.

  4. Specify your workspace’s name, location, intended Liferay Portal version, and SDK (i.e., Java JDK). Then click Finish.

    intellij-workspace-project.png

    Figure 2: Specify your workspace’s configurations.

  5. 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:

  1. Select FileNewProject from Existing Sources….

  2. Select the workspace you want to import. Then click OK.

    intellij-import-workspace.png

    Figure 3: Specify your workspace’s configurations.

  3. Click the Import project from external model radio button and select the build tool your workspace uses (e.g., Gradle or Maven).

  4. Configure the project import (if necessary) and then click Finish. See the Import a Project section of IntelliJ’s official documentation for more information.

  5. 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!

0 (0 Votes)
Installing the Liferay IntelliJ Plugin Previous