Skip to content

Setting up the development environment

Luo Chen edited this page Jan 30, 2017 · 16 revisions

Prerequisites:

  • Install IntelliJ IDEA or Eclipse

  • Install SBT

  • Install JDK 8. #Setup the Development Environment This section introduces how to setup cloudberry in IntelliJ IDEA or Eclipse. You can choose one of them as your development environment. ##Setup IntelliJ IDEA ###Setup JDK If you do not have JDK 8 installed, add the address of SDK bin to IntelliJ. File -> Project Structure -> Project Settings -> Project -> Project SDK. You could refer to official guideline for more details.

    screen shot 2017-01-22 at 10 58 30 am

Load Project:

  • Fork the repository to your own namespace repository.

  • Import the project from GitHub using your branch url.

  • Install Scala plugin on IntelliJ. Preference -> Plugins -> Install JetBrain Plugins -> Install -> Restart IntelliJ

    screen shot 2017-01-22 at 10 58 30 am

screen shot 2017-01-22 at 10 58 30 am

_please make sure the plugin version is on or above 2016.3.8_
  • If you do not have SBT toolwindow, click on build.sbt file. If SBT tool window does not appear automatically, check View -> Tool Windows -> SBT.

    screen shot 2017-01-22 at 10 58 30 am

  • Open SBT toolwindow (on the right side of IDE) and press refresh button (left-up corner) to force reload sbt.

    screen shot 2017-01-22 at 10 58 30 am

  • Run the project from command line by using sbt "project neo" "run".

##Setup Eclipse

  • Install Scala-IDE plugin (http://scala-ide.org/download/current.html). Make sure the version you download supports scala 2.11 (currently the latest version of the plugin is 4.5.0).

  • Generate eclipse project files by running command line sbt eclipse.

  • Go to eclipse and load projects. File->Import->Existing Projects into Workspace, and then set the root directory as the Cloudberry directory, and load the projects listed.

load projects

  • Now wait eclipse to finish the building process. If error happens, try to refresh the project and clean/rebuild.

Add Remote Repository:

  • Use the following lines to add remote repository:

  • If your remote rep and the origin rep are the same, use git remote set-url origin your_SSH

  • Update you local with ISG master branch or get changes from ISG master branch: git pull name_of_your_remote_rep master

  • More information is available Here

Commit changes and pull request on GitHub

  • Go to git command line

  • Check modified files: git status. Green files are ready to be committed.

  • Commit added files: git commit -m "your commit message".

  • Pull from ISG master to update your branch: git pull name_of_ISG_repo (step 2) master.

  • Push commit to your branch: git push origin branch_name.

  • Go to your repository and click on "New Pull Request" to ISG repository.