Creating A Liferay Workspace
You can create a Liferay Workspace manually or with Blade CLI.
Creating a Liferay Workspace Manually
To create a Liferay Workspace manually, you must have Gradle installed. You must also either know the ID of the Liferay product (DXP, Portal rolling release, or Commerce) you’re targeting or be able to look it up with Blade CLI using the blade init -l
command.
-
Create a folder on your system to store your workspace.
-
Inside this folder, create a file called
settings.gradle
with this content: -
Now add the Gradle wrapper to your project using this command:
-
Create a file called
gradle.properties
containing this:This defines the latest GA of Liferay Portal. You can always get a current list using Blade CLI by typing
blade init -l
.
Creating a Liferay Workspace with Blade CLI
-
At your command line interface, navigate to the folder where you want your workspace generated.
-
Find the version of Liferay you want to target by listing the available versions:
-
Now you’re ready to create your workspace. Run this command:
For example,
Your workspace is created. Note that you can target any 7.x version of Liferay:
The workspace version is stored in the hidden .blade.properties
file in the workspace’s root folder, using the liferay.version.default
property. When you create projects based on templates, the version stored here determines which template version is used.
Configuring a Proxy
If you’re behind a proxy server, you can set it up.
-
Open your
~/.gradle/gradle.properties
file. Create this file if it does not exist. -
Add the following properties to the file:
Make sure to replace the proxy host and port values with your own.
-
If the proxy server requires authentication, also add the following properties:
Excellent! Your proxy settings are set in your Liferay Workspace.