After you’ve adapted your traditional plugin to Liferay Portal’s API, you can continue maintaining it in the Plugins SDK. The Plugins SDK, however, is deprecated as of Liferay Portal CE 7.0. Maintaining plugins in the SDK will become increasingly difficult. Liferay Workspace replaces the Plugins SDK, providing a comprehensive Gradle development environment and more. A simple command migrates traditional plugins (such as portlets) to Gradle-based web application projects. From there you can build and deploy them to Liferay Portal CE 7.0 as Web ARchives (WARs).
Running the Migration Command
convert command migrates Plugins SDK plugins to web application projects in Workspace’s
wars folder. Plugin files are re-organized to follow the standard web application folder structure.
Standard Web Application Anatomy:
- descriptor files
css→ CSS files
- JSP files
java→ Java source
- build files
In a terminal, navigate to the Liferay Workspace root folder. Then pass your Plugins SDK project’s name to Blade’s
blade convert [PLUGIN_PROJECT_NAME]
Blade extracts the plugin from the Plugins SDK and reorganizes it in a standard web application project in Workspace’s
Note: You can execute
blade convert -l to show a list of projects that can be migrated in your Plugins SDK. Run
blade convert --all to migrate all plugin projects in your Plugins SDK to Workspace.
The image below shows the plugin files before and after they’re migrated to Workspace.
The following table maps traditional plugin source files to the standard web application folder structure Workspace uses.
Plugins SDK folders to web application folders:
|Files||Plugins SDK folder (old)||Web app folder (new)|
|Java|| || |
|JSPs|| || |
|icons|| || |
|CSS|| || |
|JS|| || |
|descriptors|| || |
|libraries|| || |
From your plugin’s new location, you can invoke Workspace Gradle tasks on it and build its
blade gw war
To deploy the
.war, copy it from the plugin’s
build/libs folder to the
Welcome to your plugin’s new home in Workspace!