Blade CLI

Blade CLI is a command line tool that makes it easy for Liferay developers to create, manage, and deploy Liferay projects (Gradle or Maven). Blade CLI can

  • Create Liferay projects usable in any IDE or development environment
  • Create/manage Liferay DXP instances
  • Deploy Liferay projects
  • And more

The table below describes all Blade CLI commands for the latest Blade CLI release.

convertConverts a Plugins SDK plugin project to a Gradle Workspace project. See the Running the Migration Command command for details.
createCreates a new Liferay project from available templates. See the Creating a Project section for Blade CLI for more information.
deployBuilds and deploys projects to Liferay DXP. See the Deploying a Project section for Blade CLI for more information.
extension installInstalls an extension into Blade CLI.
extension uninstallUninstalls an extension from Blade CLI.
gwExecutes a Gradle command using the Gradle Wrapper, if detected (e.g., blade gw tasks).
helpProvides information for Blade CLI’s commands.
initInitializes a new Liferay Workspace. See the Creating a Liferay Workspace article for more information.
samplesGenerates a sample project. See the Generating Project Samples with Blade CLI article for more information.
server initInitializes the Liferay server configured in Liferay Workspace’s file. Set the liferay.workspace.bundle.url property to configure the server to initialize.
server startStarts the Liferay server in the background. You can add the -d flag to start the server in debug mode. Debug mode can be customized by adding the -p tag to set the custom remote debugging port (defaults are 8000 for Tomcat and 8787 for Wildfly) and/or the boolean -s tag to set whether you want to suspend the started server until the debugger is connected. See the Managing Your Liferay Server with Blade CLI article for more information.
server stopStops the Liferay server.
server runStarts the Liferay server in the foreground. See the server start property for more information.
shConnects to Liferay DXP, executes succeeding Gogo command, and returns output. For example, blade sh lb lists Liferay DXP’s bundles using the Gogo shell. See the Managing Your Liferay Server with Blade CLI article for more information.
updateUpdates Blade CLI to the latest version. See the Updating Blade CLI article for details.
upgradePropsAnalyzes your old and your newly installed 7.x server to show you properties moved to OSGi configuration files or removed from the product.
watchWatches for changes to a deployed project and automatically redeploys it when changes are detected. This command does not rebuild your project and copy it to Portal every time a change is detected, but rather, installs it into the runtime as a reference. This means that the Portal does not make a cached copy of the project. This allows the Portal to see changes that are made to your project’s files immediately. When you cancel the watch task, your module is uninstalled automatically. The blade deploy -w command works similarly to blade watch, except it manually recompiles and deploys your project every time a change is detected. This causes slower update times, but does preserve your deployed project in Portal when it’s shut down.
versionDisplays version information about Blade CLI.

For information on command options, run the command with the --help flag (e.g., blade samples --help).

Continue on to learn about leveraging Blade CLI to create and test Liferay DXP instances and projects.

« Deploying a ProjectInstalling Blade CLI »
Was this article helpful?
0 out of 1 found this helpful