Friday 5 August 2016

How to create a liferay Workspace using Liferay IDE

How to create a liferay Workspace using Liferay IDE

So What is liferay workspace, A liferay workspace project is a project that is intended to generate and hold up all of the  liferay module and projects. This helps out the developer by providing Gradel scripts and the configuration properties, so that the user is not suppose create and configure the properties required to develop and build the projects.
The Liferay workspace even had the support for legacy WAR based projects using the Plugins SDK. The developer can configure the workspace to develop the projects in the same way.

Before creating a workspace please go through the tutorial on how to install blade. Blade installation is required in order to use the Liferay Workspace.

So now How to create your first Liferay Workspace -:
Click on New -> Liferay Workspace Project
Enter the desired name in this case FirstWorkspace. Click on Finish. This will create a new Workspace.
If you want to configure the liferay server automatically and want to download liferay portal. click on the Download liferay bundle, this will download a new liferay bundle and will configure a new server with the downloaded bundle. This is one of the sample of power that liferay workspace provides to the user.


Once the liferay workspace is created it will generate a folder structure as shown below.


Following are the details of the folder structure created in the project.
Configs -> This folder holds the configuration files for different environments. For example in the above folder structure we can see that there are DEV, LOCAL, UAT and PROD environment. Each environment is having its own properties file. These files will be picked up depending upon the environment upon which the build is being deployed.  The current environment is controlled from the gradle.properties.
Gradel -> It holds the Gradel Wrappers that are used by the workspace
Modules-> It holds the custom modules that are being developed in this Liferay Workspace project .
Themes -> It holds the themes that has been generated by using the Theme Generator.
gradel.properties ->  This file contains the liferay and envirment specific properties that would be used by gradel to build up this module.  Folowing are some of the properties that are by default available to the gradel.
#liferay.workspace.bundle.url=https://sourceforge.net/projects/lportal/files/Liferay Portal/7.0.1 GA2/liferay-ce-portal-tomcat-7.0-ga2-20160610113014153.zip
#liferay.workspace.environment=local
#liferay.workspace.home.dir=bundles
#liferay.workspace.modules.default.repository.enabled=false
#liferay.workspace.modules.dir=modules
#liferay.workspace.plugins.sdk.dir=plugins-sdk
#liferay.workspace.themes.dir=themes


microsoft.translator.client.id=
microsoft.translator.client.secret=


One of the feature of using the liferay workspace project is that it will hide the complexities of gradel by adding multiple sub project in the setting.gradel file. you need not to worry about them.
In other case if you want to configure a pre existing Liferay server to the Liferay Workspace you need to specify the Liefray Home of the server in the gradel.properties.

liferay.workspace.home.dir=PATH_TO_LIFERAY_HOME

Once we are done with the development and want to share this workspace to someone else, we can go ahead and bundle the complete workspace into a single file using the following command -:
.\gradlew distBundle[Zip|Tar]
This will generate a Tar|Zip file and that can be distributed to the users.
gradlew initBundle
Is used to test the current build on the liferay instance. The liferay instance is taken
from the gradel.properties file as described above.

It’s important to note that an Eclipse workspace can only have one Liferay Workspace project.




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

j\

0 comments:

Post a Comment

 

Copyright @ 2016 LiferayRevisited.