-
Notifications
You must be signed in to change notification settings - Fork 10
Development Environment Setup Windows
- Download from http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html and install.
- Determine the Java home directory path (under Windows it is usually similar to
C:\Program Files\Java\jdk1.7.0_67). - Add
JAVA_HOMEto the environment variables with the value:C:\Program Files\Java\jdk1.7.0_67. - Update/create Path environment variable: prepend the value
%JAVA_HOME%\binto make Java available in the command line. - Open a new command prompt (Winkey + R then type cmd) and run
java -versionto verify that it is correctly installed.
- Download distribution from http://maven.apache.org/download.cgi and unzip the archive (assuming
C:\Program Files\Apache Software Foundation\apache-maven-3.2.3) - Add
M2_HOMEto the environment variables with the value:C:\Program Files\Apache Software Foundation\apache-maven-3.2.3. - Add
M2to the environment variables with the value:%M2_HOME%\bin. - Optional: Add
MAVEN_OPTSto the environment variables with the value:-Xms256m -Xmx512m. - Update/create Path environment variable: prepend the value
%M2%to make Maven available in the command line. - Open a new command prompt (Winkey + R then type cmd) and run
mvn --versionto verify that it is correctly installed.
- Download from dev.mysql.com/downloads/mysql/ and install.;
- Open a new command prompt (Winkey + R then type cmd) and run
mysql -u root -p, type in the password set during installation and verify that it is correctly installed. - Executing the following commands in the mysql shell:
CREATE DATABASE cxolab;
CREATE USER 'liferay'@'localhost' IDENTIFIED BY 'liferay';
GRANT ALL PRIVILEGES ON * . xcolab TO 'liferay'@'localhost';
FLUSH PRIVILEGES;In case you are getting errors talking about date Format. Go to control panel -> region & language -> change to a U.S. type format
- Download Liferay 6.2 bundled with Tomcat (Community Edition) from http://www.liferay.com/downloads/liferay-portal/available-releases
- Unzip downloaded bundle, let's call the target folder
XCOLAB_BUNDLES_DIR(assumingE:\dev\XCOLAB\XCOLAB_BUNDLES_DIR)
-
Clone XCoLab GitHub repository: https://github.com/CCI-MIT/XCoLab. Let's call the directory to which the repository was downloaded
XCOLAB_SRC( assumingE:\dev\XCOLAB\XCOLAB_SRC) -
Add environment variables. If you have problems, try using \ instead of / for your paths!
- Add
XCOLAB_SRCto the environment variables with the value:E:/dev/XCOLAB/XCOLAB_SRC.
- Add
XCOLAB_BUNDLES_DIRto the environment variables with the value:E:/dev/XCOLAB/XCOLAB_BUNDLES_DIR. - Go to
XCOLAB_BUNDLES_DIR, check tomcat version (assuming 7.0.42) and addTOMCAT_VERSIONto the environment variables with the value:7.0.42. - Add
CATALINA_HOMEto the environment variables with the value:%XCOLAB_BUNDLES_DIR%/tomcat-%TOMCAT_VERSION%/bin
You can find a .bat file under XCOLAB_SRC/script/Install.bat. The script covers steps 5. to 10.
- Copy file
XCOLAB_SRC/conf/deploy.propertiesto%USERPROFILE%\.xcolab.deploy.properties, edit that file and setliferay.auto.deploy.dirtoXCOLAB_BUNDLES_DIR/deploy. With the given paths your file would look like:liferay.auto.deploy.dir=E:/dev/XCOLAB/XCOLAB_BUNDLES_DIR/deploy
**If you have problems, try using \ instead of / **
-
First it's needed to put all "parent" artifacts in local maven repository, execute
mvn install -Nin following dirsXCOLAB_SRC XCOLAB_SRC/taglibs XCOLAB_SRC/themes XCOLAB_SRC/services XCOLAB_SRC/portlets XCOLAB_SRC/hooks XCOLAB_SRC/layouts -
Install plansProposalsFacade-service
cd XCOLAB_SRC/services/plansProposalsFacade mvn install -N cd XCOLAB_SRC/services/plansProposalsFacade/plansProposalsFacade-portlet-service mvn compile package install
-
install common taglibs/libraries
cd XCOLAB_SRC/taglibs/colabIceFacelets mvn compile package install cd XCOLAB_SRC/taglibs/colabJspTags mvn compile package install
-
Install plansProposalFacade-portlet
cd XCOLAB_SRC/services/plansProposalsFacade/plansProposalsFacade-portlet mvn compile package liferay:deploy -DskipTests=true -
Install theme, layout tmpl and hooks
cd XCOLAB_SRC/themes/climatecolab-theme mvn compile package liferay:deploy cd XCOLAB_SRC/layouts/climatecolab-layout mvn compile package liferay:deploy cd XCOLAB_SRC/hooks/climatecolab-hooks mvn compile package liferay:deploy
-
Install all portlets
cd XCOLAB_SRC/portletsfor each PORTLET go to PORTLET directory and execute
mvn compile package liferay:deploy
You can find a .bat file for that under XCOLAB_SRC/script/DeployAllPortlets.bat
cd %XCOLAB_SRC%\portlets
for /D %%I in (*) DO (
if exist %%I\nul (
cd %%I
echo %cd%
call mvn compile package liferay:deploy || (
echo Error: Stopping deploying process, check error message ...
echo Press Key to exit ...
pause > nul
exit
)
cd ..
)
)
-
Edit file
XCOLAB_BUNDLES_DIR/tomcat-xxx/conf/context.xmlinside add definition of jdbc/LiferayPool resource, IE:
<Resource auth="Container" driverClassName="com.mysql.jdbc.Driver" maxActive="100" maxIdle="30" maxWait="10000" name="jdbc/LiferayPool" password="liferay" type="javax.sql.DataSource" url="jdbc:mysql://localhost:3306/xcolab?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false" username="liferay"/>
-
Copy
XCOLAB_SRC/conf/portal-ext.propertiestoXCOLAB_BUNDLES_DIR/tomcat-xxx/webapps/ROOT/WEB-INF/classes -
Copy images
mkdir XCOLAB_BUNDLES_DIR/tomcat-7.0.42/webapps/ROOT/WEB-INF/classes/images copy XCOLAB_SRC/conf/member_photo.png XCOLAB_BUNDLES_DIR/tomcat-xxx/webapps/ROOT/WEB-INF/classes/images/
-
Import database dump. Request it from mailto:pdeboer@mit.edu
mysql -u xcolab_stud -pxcolab_stud xcolab < PathToYourDump.sql;
-
It might be needed to increase permGen and Xmx, go to
XCOLAB_BUNDLES_DIR/tomcat-xxx/bin/edit setenv.bat and change permgen to 512 and Xmx to 2048 (or higher if resources are available) -
Unzip simulation client lib into
XCOLAB_BUNDLES_DIR/tomcat-xxx/lib/extcd XCOLAB_BUNDLES_DIR/tomcat-xxx/lib/ext unzip XCOLAB_SRC/other/simulation-client.zip -
Download
document_library.zipand unpack it inXCOLAB_BUNDLES_DIR/data -
Create/edit
XCOLAB_BUNDLES_DIR/portal-setup-wizard.propertiesand make sure it looks as follows:admin.email.from.name=ClimateColab Administrator liferay.home=E:/dev/XCOLAB/XCOLAB_BUNDLES_DIR admin.email.from.address=no-reply@climatecolab.org setup.wizard.enabled=false
Verify that the path to liferay.home is correct (E:/dev/XCOLAB/XCOLAB_BUNDLES_DIR if you use the given path)
**If you have problems, try using // instead of / **
Check https://github.com/CCI-MIT/XCoLab/wiki/Common-Pitfalls for Common Pitfalls.
-
Run the server:
XCOLAB_BUNDLES_DIR/tomcat-xxx/bin/startup.bat or %CATALINA_HOME%/startup.bat
-
Follow the server logs in the file XCOLAB_BUNDLES_DIR/tomcat-xxx/logs/catalina.out.
If you get the following exception: "The database contains changes from a previous upgrade attempt that failed.", modify the
Release_MySQL table and set thestate_column of all rows to 0. If you get an error that another version of Liferay is to be deployed, in theRelease_Table change the columnbuildNumberof the row withreleaseid= 1 according to your version of Liferay (e.g. 6201 for Liferay 6.2.1). If you get the ClassNotFoundException for the class "org.xcolab.hooks.climatecolab.mailserverconfig.OverwriteMailServerConfig", try commenting the line "global.startup.events=org.xcolab.hooks.climatecolab.mailserverconfig.OverwriteMailServerConfig" in the portal-setup-wizard.properties file. If you get the ClassNotFoundException for the class "org.xcolab.portlets.members.expando.EnsureCountryExpandoCreated", try commenting the line "application.startup.events=org.xcolab.portlets.members.expando.EnsureCountryExpandoCreated" in the portal-setup-wizard.properties file.