Setting up an external environment for Liferay 5.0.1 [Windows]

Posted by eichelgartenweg on 8:43 AM with No comments
To setup an ext-environment (or: development environment) for Liferay 5 you will need following files:
Ant
Jikes
Java JDK (1.5 and 1.6 will work)
Liferay 5.0.1 source
Liferay 5.0.1 Tomcat-Bundle

First you need to install/unpack Apache Ant, Jikes and the Java JDK.
Also you need to set the system variables ANT_HOME, JIKES_HOME, JAVA_HOME to the correct folders.
1. Create following folder for the external enviroment
1.1 ROOT (c:/ext)
1.2 EXT (c:/ext/portal)
1.3 SRC (c:/ext/src)
1.4 TOMCAT (c:/ext/tomcat)
2. Unpack the downloaded Liferay files
2.1 Unpack Liferay 5.0.1 source to SRC
2.2 Unpack Liferay 5.0.1 Tomcat-Bundle to TOMCAT

3. Create release property file
3.1 Go to SRC and create a file called
release."WINDOWS_USER_NAME".properties
(e.g: release.Administrator.properties)
3.2 Open file and enter
lp.ext.dir=EXT
(e.g: lp.ext.dir=c:/ext/portal)

4. Run ant compile to create files for EXT
4.1 Open command promt and go to SRC
4.2 Execute
ant clean start build-ext
4.3 The compiled files will be moved to EXT


5. Create appserver property file
5.1 Go to EXT and create a file called
app.server."WINDOWS_USER_NAME".properties
(e.g: app.server..Administrator.properties)
5.2 Open file and enter
app.server.type=tomcat
app.server.tomcat.dir=TOMCAT
(e.g: app.server.tomcat.dir=c:/ext/tomcat)

6. Run ant deploy to deploy files in Tomcat
6.1 Open command promt and go to EXT
6.2 Execute
ant clean deploy
6.3 The deployed files will be moved to TOMCAT/"LIFERAY_ROOT"


Optional:
Create Eclipse projects for external enviroment
1. Open Eclipse (workspace: ROOT)
2. Create new java project called src from existing project (path: SRC)
3. Create new java project called portal from existing project (path: EXT)
4. Open Ant-View (Window > Show View > Ant)
5. Drag & Drop build.xml from src-project into the ant view (on the right)
6. Drag & Drop build.xml from portal-project into the ant view (on the right)

Very useful link:
Liferay Wiki