Skip to content

Development Environment Setup

Johannes Bachhuber edited this page Jul 11, 2017 · 75 revisions

Required Software

Java

The XCoLab is written in Java. You will need Java 8 to run compile and run the project:

  1. Install Java (JDK 8) from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

  2. 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_home to be sure. Update your profile file to export your Java home directory env variable:

    nano ~/.profile

    Add the line:

    export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home

Mysql

In order to run the XCoLab locally, you will need Mysql:

  1. 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
  2. Make sure mysql is running. On Mac OS with homebrew:

    brew tap homebrew/services
    brew services start mysql

Setup for Development

  1. Clone XCoLab GitHub repository: https://github.com/CCI-MIT/XCoLab. Lets call the directory to which the repository was downloaded XCOLAB_SRC.

  2. Create a file in your home directory with the name .xcolab.application.properties

  3. Copy file XCOLAB_SRC/microservices/services/src/main/resources/application.properties to ~/.xcolab.application.properties and edit it to match your local configuration for mysql and your (fake) smtp server

    cp XCOLAB_SRC/microservices/services/src/main/resources/application.properties ~/.xcolab.application.properties
    
  4. 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;
  5. Import newest database dump (ask Patrick for it):

    cat dump.sql.bz2 | bunzip2 | mysql -u liferay -p xcolab 
    
  6. Make sure you are in the root directory of the repository: (cd XCOLAB_SRC)

  7. Build the whole project by running ./mvnw package (this downloads all dependencies, which may take a few minutes the first time).

  8. Start the servers: ./startAll.sh (this may take a few minutes, it will be much faster when you only restart some servers).

  9. You can follow all the logs with this utility script: ./tailAll.sh

  10. Once all servers are started (no more log output), you can access the site here: http://localhost:18082/

Clone this wiki locally