Saturday 30 July 2016

Blade installation for Liferay7

BLADE Installation for Liferay7

Blade is used to create the OSGI modules for liferay. Though liferay has provided the module support by the plugin SDK, but the modules created by blade can be used with any IDE or any other development environment. Blade is a command line tool that is used to create the modules for liferay 7.
The best and easiest way to install the blade is using the JAR file. This JAR can be installed using the JPM (JAVA PACKAGE MANAGER)
How to install Blade for Liferay7
  • Download the biz.aQute.jpm.run.jar JAR and save it in a directory. Let's say C:\Download
  • Now run the following command in command prompt c:\Downloads>java -jar biz.aQute.jpm.run.jar -g init
  • It will get install the JPM in C:\JPM4J
  • Now run this command. C:\JPM4J\bin> jpm platform path -a . This will add the jpm command in ENV-User Variable so that this can be used in commad prompt.
  • Now add the C:\JPM4J\bin in system variable PATH
  • Run the following command from C:\JPM4J\bin, so that the Blade can be installed, C:\JPM4J\bin>jpm install -f https://liferay-test-01.ci.cloudbees.com/job/liferay-blade-cli/lastSuccessfulBuild/artifact/com.liferay.blade.cli/generated/com.liferay.blade.cli.jar

  • Once the Blade is installed successfully you can verify the same by running the blade version command.



Blade provides a set of command line tools that can be used to create, update, deploy, start etc a module.
  • version-- Display Blade version.
  • create-- Creates a new Liferay module project from available templates.
  • deploy-- Builds and deploy the module for Liferay framework. It detects the current running liferay7 instance and deploy the module in the same.
  • gw-- Executes the Gradle commands using the Gradle Wrapper, if found, else it would not be executed.
  • init-- Initializes a new Liferay Workspace.
  • install-- Installs a bundle into Liferay’s module framework.
  • help-- Gives help on a specific command.
  • server-- Starts or stops server defined by your Liferay project.
  • open-- Opens or imports a file or project in Liferay IDE.
  • migrateTheme-- Migrates a Plugins SDK theme to a new workspace theme project, this is useful when you are migrating the themes.
  • samples-- Will create a sample project of Blade.
  • update-- Will update the Blade to current version of Blade

For more details on the above topic please go through the below video on my youtube channel

Liferay 7 Installation

HOW TO INSTALL LIFERAY 7 ON WINDOWS

Liferay Installation -:
To install liferay on windows below are the required steps -:
But first the minimum requirements for the setup
  1. Liferay Eclipse IDE 3 (Extract to a location)
  2. JAVA 8 (Won't work below java 8)
  3. Mysql 5.6+
  4. Liferay Portal (Extract to a location)
In the first step we are going to check if JAVA-8 is installed on the system.
Liferay7
In the next step configure the Eclipse IDE as usual, by giving up the workspcae name. Once done with this step we will create a new servre.
Open Eclispe and click on the create new server. Now select the Lifery 7x option.
Liferay7
You will get the above screen, now select Next this will produce the below screen. Click on the browse button and select the portal directory in which you had extracted the liferay portal.
Liferay7
In most of the cases the old JDK/JRE will be installed on the system. And the eclipse will be probably starting using the same. Also if you see the eclipse uses JRE by default. So to overcome that you have to define a new JDK/JRE that points to JAVA8. To do that  click on the installed JRE as shown in the below figure. Now select the path to JDK of java 8. Generally it is  C:\Program Files\Java\jdk1.8.0_101 for Windows.
Liferay7
Once done with the above steps you will see that a new server has been created in the  servers tab. Click on the start button and wait for it to start.
Liferay7
Once the server is up you can see the above screen in eclipse and below in the browser.
Liferay7
Liferay by default uses the Hypersonic database, we need to change it for further development. So to change it click on the Change button on the above screen. Post that the below screen will pop up. By default liferay users the lportal database name. So you need to create a new database with  the name lportal. Now insert the username and password of the database in the form and click save.
Liferay7
Once the values are saved these configurations will be saved in the portal-setup-wizard.properties in the LIFERAY_HOME.
Liferay7
Now in order to make the database change effect we need to restart the portal.
Restart the portal, while restarting Liferay will fill up the required database with the sample data and your portal will be up. Once the portal is up the below home page will be visible.
Liferay7
Congratulations you have installed liferay 7 successfully :)

For more details on the above topic please go through the below video on my you tubechannel

      

 

Copyright @ 2016 LiferayRevisited.