The Liferay Plugins SDK is not available for Liferay DXP 7.1. Visit the Deprecated Apps in 7.1: What To Do article for more information on the Plugins SDK removal. Liferay Workspace succeeds the Plugins SDK as Liferay’s opinionated development environment. You should use it if you’re not using an alternative build system like Gradle or Maven.
Here are Workspace’s key features:
- Module and component templates
- Sample projects
- Portal server configurations
- Project validation
- Integration testing
- Folder structure flexibility
- Commands to migrate plugins, install Liferay DXP bundles, and start/stop Portal instances
The plugin upgrade tutorials later in this series show how Liferay Dev Studio automatically adapts existing plugins to Liferay DXP 7.1. There’s also a tutorial that demonstrates how you can optionally migrate traditional plugins to Workspace.
Here’s an example Workspace folder structure:
Here’s the Workspace anatomy:
bundles/
(generated) → default folder for Liferay DXP bundlesconfigs/
→ holds Portal server configurationsext/
→ holds Ext modules and Ext WAR filesgradle/
→ holds the Gradle wrapper filesmodules/
→ holds module projectsplugins-sdk/
(generated) → holds plugins from previous releasesthemes/
→ holds theme projects created with the Liferay Theme Generator, which use the Liferay JS Theme Toolkitwars/
→ holds traditional web application projectsbuild.gradle
→ common Gradle build filegradle-local.properties
→ sets user-specific properties for your workspacegradle.properties
→ specifies the Portal server configuration and project locationsgradlew / gradlew.bat
→ executes the Gradle command wrapperpom.xml
(only in Workspaces generated by Maven) → common Maven build filesettings.gradle
→ applies plugins to the Workspace and configures its dependencies
Workspace module, theme, and WAR projects use the same Portal server configurations. Developers can create configurations for module development, user acceptance testing, production, and more.
Each subfolder under configs
holds a Portal server configuration defined by
its portal-ext.properties
file. The Gradle property
liferay.workspace.environment
in Workspace’s gradle.properties
file
specifies the configuration to use. See the
Testing Projects
section for more details.
Other Gradle properties set root locations for the Liferay DXP bundle, modules, themes, and a Plugins SDK. See the Gradle Workspace Properties section for a list of all available Workspace properties.
Workspace Folder Structure Properties
Property | Description |
---|---|
liferay.workspace.environment | Name of a configs subfolder holding the Portal server configuration to use |
liferay.workspace.ext.dir | Ext projects root folder |
liferay.workspace.home.dir | Liferay DXP bundle root folder |
liferay.workspace.modules.dir | Module projects root folder |
liferay.workspace.plugins.sdk.dir | Plugins SDK root folder |
liferay.workspace.themes.dir | Theme projects root folder |
liferay.workspace.wars.dir | WAR-style projects root folder |
Workspace has Gradle tasks equivalent to the Plugins SDK Ant targets.
Plugins SDK to Workspace Task Map
Plugins SDK Ant Target | Workspace Gradle Task | Task Description |
---|---|---|
build-css | buildCSS | Builds CSS files |
build-lang | buildLang | Translates language keys using Language Builder |
build-service | buildService | Runs Service Builder |
clean | clean | Deletes all build outputs |
compile | classes | Compiles classes |
deploy | deploy (or blade deploy ) | Installs the current project to Liferay DXP’s OSGi framework |
jar | jar | Compiles the project and packages it as a JAR file |
war | assemble | Assembles project output |
Other Workspace Gradle tasks provide additional functionality.
Workspace Gradle Task | Task Description |
---|---|
buildDB | Builds database SQL scripts from the generic SQL scripts |
buildSoy | Compiles Closure Templates in JavaScript functions |
components | Lists the project’s components |
configJSModules | Generates the config file needed to load AMD files via combo loader in Liferay DXP |
dependencies | Lists the project’s declared dependencies |
formatSource | Runs Liferay Source Formatter to format project files |
initBundle | Downloads and installs a Liferay DXP bundle |
model | Lists the project’s configuration model |
projects | Lists the project’s sub-projects |
properties | Lists the project’s |
replaceSoyTranslation | Replaces goog.getMsg definitions |
transpileJS | Transpiles the project’s JavaScript files |
This is just a subset of available Gradle commands in a Liferay Workspace. Run
gradlew tasks
from a project in workspace for a full list of Gradle commands.