-
Notifications
You must be signed in to change notification settings - Fork 10
Development Environment Setup
The XCoLab is written in Java. You will need Java 8 to run compile and run the project:
-
Install Java (JDK 8) from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
-
Determine the Java home directory path (for JDK 8). Under Mac OS it's usually similar to
/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home, but run/usr/libexec/java_hometo be sure. Update your profile file to export your Java home directory env variable:nano ~/.profileAdd the line:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home
In order to run the XCoLab locally, you will need Mysql:
-
Install mysql. On Mac OS with homebrew:
brew install mysql mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
-
Make sure mysql is running. On Mac OS with homebrew:
brew tap homebrew/services brew services start mysql
-
Clone XCoLab GitHub repository: https://github.com/CCI-MIT/XCoLab. Lets call the directory to which the repository was downloaded
XCOLAB_SRC. -
Create a file in your home directory with the name .xcolab.application.properties
-
Copy file
XCOLAB_SRC/microservices/services/src/main/resources/application.propertiesto~/.xcolab.application.propertiesand edit it to match your local configuration for mysql and your (fake) smtp servercp XCOLAB_SRC/microservices/services/src/main/resources/application.properties ~/.xcolab.application.properties -
Create a database that uses "utf8mb4 collation" encoding and specify a user & password:
mysql -u root -p CREATE DATABASE xcolab CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -
Import newest database dump (ask Patrick for it):
cat dump.sql.bz2 | bunzip2 | mysql -u liferay -p xcolab -
Make sure you are in the root directory of the repository: (
cd XCOLAB_SRC) -
Build the whole project by running
./mvnw package(this downloads all dependencies, which may take a few minutes the first time). -
Start the servers:
./startAll.sh(this may take a few minutes, it will be much faster when you only restart some servers). -
You can follow all the logs with this utility script:
./tailAll.sh -
Once all servers are started (no more log output), you can access the site here: http://localhost:18082/