Ignite follows standard guidelines for multi-module maven projects, so it can be easily built using the following command from the project root directory (you can disable the tests when building using -DskipTests
):
mvn clean package [-DskipTests]
Upon build completion, CLI tool can be found be under modules/cli/target
directory. Use ignite
on Linux and MacOS, or ignite.exe
on Windows.
Code style is checked with Apache Maven Checkstyle Plugin.
It is enabled by default and is bound to compile
phase.
Build project without code style check:
mvn clean <compile|package|install|deploy> -Dcheckstyle.skip
Run code style checks only:
mvn clean validate -Pcheckstyle -Dmaven.all-checks.skip
Run javadoc style checks for public api only:
mvn clean checkstyle:checkstyle-aggregate -P javadoc-public-api
ℹ
javadoc-public-api
profile is required for enabling checkstyle rules for public API javadoc.
Code style check results are generated at:
target/site/checkstyle-aggregate.html
target/checkstyle.xml
The project is checked for legacy APIs with Modernizer Maven Plugin.
Plugin is enabled by default and is bound to test-compile
phase (due to requirement to run on already compiled classes)
Build project without legacy API check:
mvn clean <compile|package|install|deploy> -Dmodernizer.skip
Run legacy API checks only:
mvn clean test-compile -Pmodernizer -Dmaven.all-checks.skip
or
mvn clean test-compile -Dmaven.all-checks.skip && mvn modernizer:modernizer
Project files license headers match with required template is checked with Apache Rat Maven Plugin.
mvn clean apache-rat:check -pl :apache-ignite
License headers check result is generated at target/rat.txt
Static code analyzer is run with Apache Maven PMD Plugin. Precompilation is required 'cause PMD shoud be run on compiled code.
mvn clean compile pmd:check
PMD check result (only if there are any violations) is generated at target/pmd.xml
.
Project is supplied with number of custom scripts for Maven sanity check. To run checks, execute:
bash check-rules/maven-check-scripts/run.sh
from root of the project.
Linux, MacOS, WSL (Windows Subsystem on Linux) or alike environment is required. xpath
should be present in PATH
Run unit tests only:
mvn test
Run unit + integration tests:
mvn integration-test
Run integration tests only:
mvn integration-test -Dskip.surefire.tests
Javadoc is generated and checked for correctness with Maven Javadoc Plugin. (Javadoc style check is described above in Code style section)
Check Javadoc is correct (precompilation is required for resolving internal dependencies):
mvn compile javadoc:javadoc
Build Javadoc jars (found in target
directory of module):
mvn package -P javadoc -Dmaven.test.skip
Build Javadoc site (found in target/site/apidocs/index.html
):
mvn compile javadoc:aggregate -P javadoc
ℹ
javadoc
profile is required for excluding internal classes
You can quickly import Ignite project to your IDE using the root pom.xml
file. In IntelliJ, choose Open Project
from the Quick Start
box or choose Open...
from the File
menu and select the root pom.xml
file.
After opening the project in IntelliJ, double check that the Java SDK is properly configured for the project:
File
menu and select Project Structure...
Project
section, make sure the project language level is set to 11.0 as Ignite makes use of several Java 11 language featuresIgnite uses machine code generation for some of it's modules. To generate necessary production code, build the project using maven (see Building Ignite).
Configure Idea code style (for IntelliJ Idea >= 2019):
If you want to make use of Idea build action and incremental compilation, you have to alter the build process manually as Idea Maven integration doesn't support all the Maven plugins out of the box.
Show Basic Phases Only
ignite-sql-engine
moduleLifecycle
-> process-resources
Before Build
High-level modules structure and detailed modules description can be found in the modules readme.
mvn clean package
modules/cli/target
directory which now contains the packaged CLI toolcd modules/cli/target
./ignite
./ignite init --repo=<path to Maven staging repository>
./ignite module add mvn:com.google.guava:guava:23.0
./ignite module list
./ignite node start myFirstNode
./ignite node list
./ignite node stop myFirstNode