-
-
Notifications
You must be signed in to change notification settings - Fork 12
Environment Setup
This page covers installing necessary software packages for building FlagWar from source, either for testing or development. While you can use self-compiled binaries in production, we highly caution against that practice.
This page also covers some additional tools to make development a little easier, but ultimately they are optional.
-
- Using SDKMAN! (Recommended)
- Traditonal Package Managers
- Manual Setup
The following software is required to clone and build FlagWar. An active internet connection is also required for grabbing build dependencies and fetching changes from version control.
- Apache Maven 3, for building and managing dependencies.
- A Java Development Kit for Java 17*
- (Eclipse Temurin (Adoptium), Oracle JDK&tm;, Oracle OpenJDK builds, or Microsoft's OpenJDK builds are all good options.
- Git, for contributing and fetching updates.
See Aditional Tools for more recommendations.
* Java 16 is viable. Compilation testing against both Java 16 and Java 17 are performed when pushed to GitHub.
One tool to help manage development tools that we recommend using is SDKMAN!, a 3rd-party package manager. It runs on most Unix-like environments, such as Linux, FreeBSD, Solaris, and macOS. It even runs on Cygwin, and WSL2.
It can be used to manage both your Java and Maven installations, as well as several other development tools. See SDKMAN! Installation for installing it on your system.
For convenience's sake, the following shell commands should be all you need for a usable environment after SKDMAN!'s
installation. You will still need to download git
manually or through a traditional package manager.
# Show available Java distributions, and denote installed versions
sdk list java
# Install a specific Java distribution (examples, may be out of date)
sdk install java ## Installs the SDKMAN! selected default. (_Eclipse Temurin_)
sdk install java 17-open ## Installs OpenJDK 17 from Java.net
sdk install java 17.0.0-oracle ## Installs Oracle's Java Standard Edition JDK
# You can install multiple java distributions. To switch to a specific one for your environment, use...
sdk java use [version]
# Installs Apache Maven
sdk install maven 3.8.1
Note! Do not use the
alternatives
maven profile if using any SDKMAN! retrieved distributions. It's not necessary, and can break thejavadoc
profile.
Don't want to use SDKMAN!? The traditional package managers work just as well.
Traditional package managers are great for grabbing things, and keeping them up-to-date (usually).
They are also somewhat of a newer concept for Windows, and macOS doesn't have a native package manager aside from the AppStore. (As far as I know, anyways.)
-
Snapcraft (Snap Packages)
- OpenJDK: https://snapcraft.io/openjdk
- Maven: Unavailable, find different source
-
Arch
- Use
sudo pacman -S {package}
, or build from the Arch User Repository (AUR) - Java: See the Arch Wiki Java page
- Maven:
maven
- Use
-
Debian (Sid), Ubuntu 20.04 / 21.04, or derivative of either
- Use
sudo apt install {package}
- Java:
openjdk-16-jdk
oropenjdk-16-headless
- Maven:
maven
- Use
-
Fedora, Fedora EPEL (RedHat, CentOS)
- Use
sudo dnf install {package}
- Java:
java-latest-openjdk-devel
- maven:
maven
- Use
-
OpenSUSE Tumbleweed
- Use
sudo zypper install {package}
- Java:
java-16-openjdk
(Not available on OpenSUSE Leap 15.3) - maven:
maven
- Use
-
Windows Package Manager (winget) - Official package manager for Windows 10
- Use
winget install {package}
(as administrator?) - Java:
Microsoft.OpenJDK.16
- Maven: N/A - Install manually or with Chocolatey
- Use
-
Chocolatey - An unofficial community-made package manager for Windows
- Use
choco install {package}
- Java:
openjdk
,adoptopenjdk16
,zulu16
- maven:
maven
- Use
- Homebrew - Unofficial community-made package manager for macOS and Linux.
- Use
brew install {package}@{ver}
- Java:
openjdk@16
- Maven:
[email protected]
- Use
Sometimes, you can't find the package you were looking for. Or you may not have access to a package repository. In these cases, installing manually may be required. Please remember to consult the documentation when installing manually.
See the official Maven Installation Guide.
Due to the different vendors available, we recommend consulting vendor-specific documentation.
Vendors may provide archives (.zip
/.tar
/etc), installer files, or both.
- Eclipse Adoptium (formerly AdoptOpenJDK)
- Amazon Corretto 16
- Microsoft OpenJDK
- Oracle OpenJDK (Java.net)
The following tools are not strictly necessary, but they do provide good workflow improvements, or may help you spot mistakes early on.
-
An Integrated Development Environment (IDE) such as Eclipse or IntelliJ IDEA
-
A Markdown-capable editor, such as GitHub's Atom Editor or Microsoft's Visual Studio Code for writing documentation.
- All markdown should adhere to the GitHub Flavored Markdown (GFM) Specification.
-
A Checkstyle plugin for your IDE
- Bad checkstyle compliance results in failed builds.
-
An EditorConfig plugin for your IDE
-
SpotBugs (or FindBugs), standalone or plugin.
- A static code analysis platform for finding bugs, dodgy code, and breaks in standard code conventions.
- IntelliJ Plugin
- Eclipse Plugin
- Standalone GUI
-
SonarLint; Static code analysis tool focused on code smells.
This documentation is Copyright © 2021 TownyAdvanced and licensed under a Creative Commons Attribution 4.0 International License.