Install required tools
Before you start, make sure you have the following tools installed:
- Git，please refer to Install Git
- JDK 1.8，please refer to Install JDK
- Maven 3.x，please refer to Install Maven
- Docker，please refer to Install Docker
- Service Center, please refer to Install Service Center
- IntelliJ Idea IDE(optional, you can use any IDE you like, e.g. eclipse), please refer toInstall IntelliJ
Get a Github account. The ServiceComb projects is hosted on Github, so you will need a Github account. You can goto https://github.com/join?source=header-home for signup. Skip this if you already own an Github account. You can login on https://github.com/login?return_to=%2Fjoin%3Fsource%3Dheader-home after you finished the signup.
Configure Git. Configure personal information and setup git for push without username/password. Configure personal information:
git config --global user.name <your-user-name> git config --global user.email <your-email-address>
Substitute <your-user-name>和<your-email-address> with your name and email. ReferGit push without username and passwordto setup pushing without username/password.
Get the source code. For example, to get ServiceComb-Java-Chassis, execute the following command:
git clone https://github.com/apache/servicecomb-java-chassis.git
There are many Java IDEs around, like Eclipse, IntelliJ IDEA and STS, etc. We suggest to use IntelliJ IDEA, it’s community edition is good enough for daily usage. After you installed IntelliJ IDEA, follow Initial Setup for basic configuration. For frequently used shortcuts, Cannot Miss Shortcuts
The Java Chassis and Saga project uses Google Code Style. You can find the settings file under
etc directory which can be imported to IDEA. There is also a settings file for Eclipse under the same directory.
IntelliJ IDEA Configuration
Configure IntelliJ IDEA
Open IntelliJ Settings page
Import the coding style settings file
Open a modified but uncommited file, then Choose [Code] > [Show Reformat File Dialog]
Choose [Only VCS changed text], then click [Run]
Just run [Reformat code] (Ctrl+Alt+L) afterwards to format the code.
For more IntelliJ usages, please check IntelliJ tutorial。