Skip to content

Setting up development environment

Szymon Chojnacki edited this page Feb 10, 2016 · 9 revisions

The developers of this project can get IntelliJ IDEA license for free. Please send a message to Szymon to request your license key.


Prerequisites:

  • Install JDK 8
  • Install Gradle 2.10+

Download sources

  1. Fork piLINCS GitHub repository from https://github.com/uc-bd2k/Pilincs

  2. My forked repository is in https://github.com/sajmmon/Pilincs

  3. Clone your repository with e.g.

git clone https://github.com/sajmmon/Pilincs.git

Enter Pilincs folder and run gradle plugin for Intellij IDEA

cd Pilincs; gradle idea;

Run from IDE

  1. Install IntelliJ IDEA Ultimate Edition

  2. Start IDEA and select to import project by pointing at its build.gradle file

  3. Update project settings in a pop-up. Here you may update the path to gradle/bin or decide to use auto-import

  4. If project SDK is not defined click on "Setup SDK". Please point to your location of Java and select language level 8

  5. Go to "Run" in top menu and add new configuration as Spring Boot, with main class and program arguments as below

  6. Run the application. It took for me 483 seconds to populate H2 and start Tomcat. Now the application is available in localhost:8080/pilincs


TIPS

Let's hot swap one of HTML files, they are kept in src/main/resources/static. You can modify any file and use my favorite key combination: CTRL+SHIFT+F9. Now you should be able to see your modification after refreshing your browser.

In order to commit your changes to GitHub just go to top menu "VCS" and select "commit changes". Review the files that you wish to commit and click "Commit and Push". After that you should be asked for a GitHub username and password. I am using GitIgnore plugin for IDEA to avoid commiting irrelevant files.