Liferay 7 development setup
Liferay 7 development setup tutorial is to setup Liferay 7 development environment in local machine and access this tutorial to setup Liferay Eclipse IDE and tomcat in your local.
- Liferay uses plugin sdk development environment and hold portlets,themes,layouts,ext,hooks and ANT Build scripts.
- Liferay 7 uses OSGI platform that replaces traditional use of plugin-sdks with OSGI Modules, but still Liferay 7 supports Plugin SDK development.
- Liferay 7 uses liferay-workspace to hold all modules,gradles, libraries,themes,wars,configs
- portal-service.jar renamed to portal-kernel.jar, so liferay 6 code base need to be update with new API change in Liferay7 migration process.
Liferay 7 Development Setup:
Step1: Download Liferay and Java8
- Click here to download Liferay7 tomcat community edition(liferay-ce-portal-tomcat-7.0-ga3) from sourceforge
- Download Eclipse IDE :liferay-ide-eclipse-windows-x64-3.1.0-M1. I recommend to download liferay-ide-neon-m1 version as it is latest one.
- Install Java8
- MySQL version should be greater than 5.6
- Extract the eclipse and it requires JDK8. update eclipse.inf file with -vm argument with JDK 8 bin path
-
--vm C:/Program Files/Java/jdk1.8.0_101/bin -vmargs -Dosgi.requiredJavaVersion=1.8 -XX:+UseG1GC -XX:+UseStringDeduplication -Dosgi.requiredJavaVersion=1.8 -Xms768m -Xmx1256m
Step2: Create Liferay Workspace
Liferay workspace need to create to hold all modules and make sure that you configured proper proxy settings in eclipse if you are behind firewall. Go to windows-> preferences -> Network settings and select Manual. Update the with corp user name and password.
In eclipse, click on File-> New -> Liferay Workspace Project and provide workspace name. It will download all required libraries from gradle repository.
Step3 : Liferay 7 workspace structure
Step4 : Liferay 7 Tomcat Setup in Eclipse
Now, we will configure tomcat in Liferay. Click on File->New-> Server; Select Liferay 7.x and click on Next. Update the tomcat server location with download tomcat and Lieray bundles directory with in liferay home(which you extracted liferay-ce-portal-tomcat-7.0-ga3)
.
Step5 : Liferay 7 Bundles auto configuration
In Liferay 7 community edition, module auto deployment path need to configure and can done in two ways
-
- Liferay tomcat runtime:
- gradle.properties – open gradle.properties file in liferay-workspace folder and add the below property
- liferay.workspace.home.dir=D:/programming/Lifera7Ce/liferay-ce-portal-7.0-ga3
Step6: Liferay 7 Database configuration
- liferay.workspace.home.dir=D:/programming/Lifera7Ce/liferay-ce-portal-7.0-ga3
- Create database in mysql : create database lportal7_ce character set utf8;
- Create portal-ext.properties file and add below database properties and liferay home.
-
jdbc.default.url=jdbc\:mysql\://localhost:3307/lportal7_ce?useUnicode\=true&characterEncoding\=UTF-8&useFastDateParsing\=false jdbc.default.driverClassName=com.mysql.jdbc.Driver jdbc.default.username=root jdbc.default.password=root liferay.home=D:/programming/Lifera7Ce/liferay-ce-portal-7.0-ga3
Copy the mysql to tomcat\lib\ext if not is not exist and start the server and you will get config page and complete the setup
- Liferay home page will open and start developing portlet.
Note: Some times, you may the below exception, so the access the below tutorial to fix the issue:
org.gradle.tooling.BuildException: Could not fetch model of type ‘EclipseProject’ using Gradle distribution ‘https://services.gradle.org/distributions/gradle-3.0-bin.zip’.
Liferay Gradle SSLHandshake or PKIX path building Issue
Liferay Gradle SSLHandshake or PKIX path building Issue While setting up Liferay DXP in local, you might get the below exception in creating workspace project for the first time. You will get the issue if JDK version is below Java…
7 thoughts on “Liferay7 development setup”
Leave a Reply
You must be logged in to post a comment.
It was nice tutorial. Can existing liferay plugin sdk configured in liferay7
You have to 2 things inorder to configure your liferay plugin sdk in liferay 7
1)Upgrade your database to liferay 7 using liferay database upgrade client present in liferay 7 bundle.
2)Upgrade your plugin sdk code using liferay-code-upgrade-tool present in liferay ide.
Good job, I got it working thanks to this tutorial.
Just want to add that the portal-ext.properties must be put in D:/programming/Lifera7Ce/liferay-ce-portal-7.0-ga3/tomcat-8.0.32/webapps/ROOT/WEB-INF/classes
Thanks Montes. Placing portal-ext properties is depends on “liferay.home” property in portal-ext.properties.
Good job!!!! Thanks.It helped me a lot. It will be helpful if u add gradle related proxy issue in the tutorial https://web.liferay.com/community/forums/-/message_boards/message/72484485
Sure. I will addd