# rip off from https://zeroturnaround.com/rebellabs/your-maven-build-is-slow-speed-it-up/ # in .bashrc set MAVEN_OPTS="-XX:+TieredCompilation -XX:TieredStopAtLevel=1" # add -DdependencyLocationsEnabled=false to retain fewer outgoing connections. # compile all modules mvn -T 1C install -offline # compile specific module mvn -T 1C install -pl $moduleName -am -offline # -T 1C: one thread per cpu core. # -offline: offline mode, does not checks for newer snapshots. # -pl $moduleName: build only specified module. # -am: build depended modules (use with -pl). # PS: mvn clean is not used, helps speedup as it's an incremental build.