Creating a Liferay Workspace

You can create a Liferay Workspace using the following tools:

Visit the appropriate section to learn how to create a workspace with the highlighted tool.

Blade CLI

  1. Navigate to the folder where you want your workspace generated.

  2. Run the following command to build a Gradle-based workspace:

    blade init -v 7.2 [WORKSPACE_NAME]
    

You can also create a Maven-based workspace with Blade CLI. See the Maven section for more information.

Dev Studio

  1. Select FileNewLiferay Workspace Project.

    Figure 1: By selecting Liferay Workspace Project, you begin the process of creating a new workspace for your Liferay projects.

    Figure 1: By selecting *Liferay Workspace Project*, you begin the process of creating a new workspace for your Liferay projects.

    A New Liferay Workspace dialog appears, presenting several configuration options.

  2. Give your workspace project a name.

  3. Choose the location where you’d like your workspace to reside. Checking the Use default location checkbox places your Liferay Workspace in the Eclipse workspace you’re working in.

  4. Select the build tool you want your workspace to be built with (i.e., Gradle or Maven).

  5. Choose the Liferay Portal version you plan to develop for (i.e., 7.2, 7.1, or 7.0).

  6. Select the specific target platform version corresponding to the GA release you’re developing for (e.g., 7.2.0 → 7.2 GA1). For more information on target platform benefits, see the Managing the Target Platform articles.

  7. Check the Download Liferay bundle checkbox if you’d like to auto-generate a Liferay instance in your workspace. You’ll be prompted to name the server and provide the server’s download URL, if selected.

  8. Check the Add project to working set checkbox if you want your workspace to be a part of a larger working set you’ve already created in Dev Studio. For more information on working sets, visit Eclipse Help.

  9. Click Finish to create your Liferay Workspace.

    Figure 2: Dev Studio provides an easy-to-follow menu to create your Liferay Workspace.

    Figure 2: Dev Studio provides an easy-to-follow menu to create your Liferay Workspace.

A dialog appears prompting you to open the Liferay Workspace perspective. Click Yes, and your perspective will switch to Liferay Workspace.

IntelliJ

  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.

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

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

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

    Figure 4: Specify your workspaces configurations.

    Figure 4: 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.

Maven

  1. Execute the following Maven command:

    mvn archetype:generate -Dfilter=liferay
    
  2. Select the com.liferay.project.templates.workspace archetype to generate.

  3. Step through the remaining prompts to generate the workspace project.

A Maven-based Liferay Workspace can also be generated using Blade CLI. Follow Blade CLI’s workspace creation instructions and insert the -b maven parameter in the Blade command.

« Installing Liferay WorkspaceImporting a Liferay Workspace into an IDE »
Was this article helpful?
0 out of 0 found this helpful