Saturday, October 14, 2017

Liferay DXP/7 BLADE CLI Introduction and Its Commands

Liferay DXP/7 have exciting features and one of the major architectural change is to support OSGi modularity framework.

Follow the below article to know more information about Liferay DXP/7 Modularity introduction.



Now Liferay DXP/7 Application development through OSGi bundles and it has followed the OSGi specification.

Follow Liferay DXP/7 Tutorial to get more information.

Liferay DXP/7 introduced module development tool called BLADE CLI. BLADE is a Command Line Interface have set of commands to create Liferay DXP/7 modules and its deployment into the Liferay OSGi run time environment.

Bootstrapped Liferay Advanced Development Environment shortly we call it as BLDAE. It is very easy to install and very flexible to use and create Liferay Modules.

BLADE have implemented based on Gradle build tool. Behind the scene, BLADE uses the Bndtools framework to create and deploy OSGi bundles.  Finally, we can say BLADE is based on the Gradle flavor Bndtools.


BLADE have provided the human readable commands to create Liferay modules. BLADE consist of several Module Templates to create Liferay 7 Application modules like portlet module, hook module and theme module. It also have commands to access sample projects and deploy into OSGi runtime.

 BLADE tools have commands to create Liferay 7 module and we can use any Development IDE to edit the code then deploy through BLADE CLI commands. Installation of BLADE tool and Module creation process will be explained in the future articles. Once we installed the BLADE, we can issue the predefined commands to create and deploy the modules.


The following are the set of BLADE CLI commands its description.

deploy:
Deploy commands will build and deploy the modules into Liferay OSGi environment. Usually deploy commands works similar to previous liferay MAVEN deploy but it’s in OSGi way. It will compile, build and package the module and place the module jar file into Liferay Portal deploy directory. Once the module jar file place in deploy directory then Liferay hot deploy process will handle subsequent steps to make the available of module to end user.

convert:
Convert previous Plugins SDK plugins to OSGi modules. Usually Liferay 7 have concept called Liferay Workspace.  It convert Plugins project to Workspace project based on Gradle.
As we know that Liferay DXP/7 based on OSGi and all Liferay 7 application, make it as modules. However, we already have Plugin Environment to develop Liferay previous versions applications so convert toll make it plugins to modules.

create:
Create command used to create new Liferay Application Module based on available module templates. BLADE has provided several module templates to create different types such as portlet, hook and them modules. These commands have several option so choose appropriate template.

gw:
gw is Gradle Wrapper on top of Gradle build to make work easier for developer to run Gradle build commands.

init:
Liferay has introduced Liferay Workspace to manage the Liferay modules and it’s easy to shift one place to other place. Init command will initialize the Liferay Workspace it means it will create directory structure to accommodate modules, related properties and liferay portal server instance.  All will be created once we use init command.

install:
This command install a liferay bundle into Liferay OSGi runtime environment. Bundle is packaged OSGi jar file, which run in OSGi runtime.

help:
Help commands will shows help information like list of available commands and its options.

open:
Open command open or import file in Liferay IDE and open project as well.

samples:
Samples project generated sample projects in Liferay Workspace. Liferay have provided sample project for the developers to understand more about Liferay module development.
Sample command will access those samples from repository and downloaded into local Liferay Workspace. We can edit, deploy and test the sample modules.

server:
This command start Liferay Portal Server Instance, which reside in Liferay Workspace bundle directory.

sh:
Sh command connect to Apache Gogo shell console to manage OSGi bundles which are available in OSGi runtime.


update:
Update command will update to latest versions when new version is available.

version:
It will display BLADE CLI version information.

Author

0 comments :

Post a Comment

Recent Posts

Recent Posts Widget

Popular Posts