Setting up Build Environment
Download and install the following tools. These tools are open source and can be searched via Google to find the download sites. Other options include package managers like Choco for Windows and Homebrew for MacOS. These will be able to install, upgrade, remove, and set environment variables for these tools.
Name | Version | Comments |
---|---|---|
Java | J2SE 8 SDK | Make sure that your JAVA_HOME environment variable is set and add %JAVA_HOME%\bin (windows) or $JAVA_HOME/bin (*nix) to your PATH |
Maven | 3.5.0 (or later) | Follow Maven Checklist |
Latest | Follow IntelliJ Checklist | |
Git | 2.16.2 | Install Git, the Git Immersion tutorial can guide you through whole process. The Atlassian Git tutorial is helpful too. Make sure to add Git/bin to PATH |
Ruby | 2.4 | Needed for documentation generation. |
Latest Latest Latest Latest | Windows text editor Windows/Mac/Linux text editor Windows/Mac/Linux text editor Mac text editor | |
node | 8.6.0 | Optional for UI development: https://nodejs.org/en/download/package-manager/ |
yarn | 1.5.1 | Optional for UI development: https://yarnpkg.com/lang/en/docs/install/ |
Setting Up Environment Variables
Here are sample values of relevant environment variables.
Variable | Value |
---|---|
KARAF_DEBUG | true |
KARAF_DEBUG is used by Karaf (the runtime container for DDF) to decide if it should expose a debug port to enable runtime debugging of your container.
Configuring Git
Place a .gitconfig file in your user home dir if it is not already there.
[user] name = <Your Name> email = <Your email> [core] editor = vi autocrlf = false [merge] tool = meld [alias] st = status ci = commit br = branch co = checkout df = diff lg = log --date=iso --pretty=format:'%ad%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%aN %s' unstage = reset HEAD- last = log -1 HEAD
If you want to be able to fetch the Pull Request branches, you can also add:
[remote "origin"] fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
If using a proxy, add:
[http] proxy = <PROXY_URL> [https] proxy = <PROXY_URL>
Static Analysis Plugins for Intellij
Setting up static analysis plugins for Intellij will enable the developer to more quickly find and fix/suppress static analysis findings.
SonarLint
- Install SonarLint plugin to Intellij
- Configure SonarLint
- `Enable binding to remote SonarQube server`
- `Configure servers...`
- `+`
- Name configuration (codice is a good name)
- `Connect to the online service` - this will open your browser
- if you are not already logged in, log in
- If you are are not already logged in, you'll be presented with the https://about.sonarcloud.io page; login using github credentials. Once logged in, jump back to IJ.
- `Next`
- `Create token`
- Add a unique name for the token and press `Generate`
- `Copy` copies the token to your clipboard
- Paste the token back in the IJ dialog
- Type `codice`. Hit the down arrow until you find the `codice` organization. That name specifically.
- `Update binding`
- `Bind to server`
- Select your newly configured server
- Pick the appropriate project.
Creating a SonarQube Account
- Go to https://sonarcloud.io
- Select on "Just sign up"
- Select "Log in with Github"