For gradle simply execute the clean
and build
tasks.
./gradlew clean build
To skip existing tests if any:
./gradlew clean build -x test
For maven simply execute the clean
and package
goals.
mvn clean package
To skip existing tests if any:
mvn clean package -DskipTests=true
Below listing shows files after a succesfull gradle build.
target/dist-0.1.0.jar