Liferay Folder Structure
1. create Liferay folder in C drive
2. unzip Liferay tomcat 6.0 bundle
(liferay-portal-tomcat-6.0-5.2.3.zip) to Liferay folder
3. unzip Liferay plugin SDK
(liferay-plugins-sdk-5.2.3.zip) to Liferay/plugins folder
4. unzip Liferay EXT
(liferay-portal-ext-5.2.3.zip) to Liferay/EXT folder
5. unzip Liferay Portal Source
(liferay-portal-src-5.2.3.zip) to Liferay/portal folder
After above steps folder structure will
as bellow
c:\Liferay
- data
- deploy
- EXT
- license
- plugins
- portal
- tomact-6.0.18
Eclipse Setup
1. Start Eclipse and create three JAVA
projects (plugins, EXT, Portal) as follow:
2. Create plugins project
- Create New JAVA Project
- Goto > File > New > Java Project
- Project Name > plugins
- Select "Create Project from existing Source"
- Click on browse and select directory plugins (liferay-plugins-sdk-5.2.3)
- Click Finish
3. Create EXT project
- Create New JAVA Project
- Goto > File > New > Java Project
- Project Name > EXT
- Select "Create Project from existing Source"
- Click on browse and select directory EXT (liferay-portal-ext-5.2.3)
- Click Finish
4. Create Portal project
- Create New JAVA Project
- Goto > File > New > Java Project
- Project Name > portal
- Select "Create Project from existing Source"
- Click on browse and select directory Portal (liferay-portal-src-5.2.3)
- Click Finish
5. Run Configuration Settings
- Open "Run Configurations..." under the Run Menu
- Under Java Applications node in the tree, right click and "New"
- Click on New_Configuration and change Name: Liferay
- On Main tab, select the portal source code project or your Plgins project
- In the Main class put org.apache.catalina.startup.Bootstrap, don't check any check boxes
- Go to Arguments tab, in the Program arguments type: start
- In VM arguments put like:
-Xmx512m -XX:PermSize=32m -XX:MaxPermSize=160m -Dfile.encoding=UTF8 -Duser.timezone=GMT -Dcatalina.base=-Xmx512m -Djava.security.auth.login.config=C:/Liferay/tomcat-6.0.18/conf/jaas.config -Dcatalina.base=C:/Liferay/tomcat-6.0.18 -Dcatalina.home=C:/Liferay/tomcat-6.0.18 -Djava.io.tmpdir=C:/Liferay/tomcat-6.0.18/temp
- In Classpath tab, remove ALL User entries, do NOT remove the JRE System library
- Select User Entries and "Add External Jars", find the bootstrap.jar file from the ${tomcat-root-folder}/bin folder and add only that one
- In the Source tab, select any related Java project (EXT, Plugins, Portal), but also the main project. For example, if you want to also debug a plugin, add it's source path here
- Under Common tab check Run (if we want debugging then check Debug)
- Apply all changes
- Run Liferay from Run Icon (View output on console)
- Check Liferay server on http://localhost:8080
Nice tutorial. Thanks a lot. Very easy.
ReplyDeletevery useful for me thanks to u
ReplyDelete