Gradle && Maven: cheat sheet

Version

gradle -- version
=====================================================
mvn --version

Create jar/war

gradle assemble
=====================================================
mv package

Run Unit tests

gradle test
=====================================================
mvn test

Run Unit tests and create jar/war
https://docs.gradle.org/current/userguide/gradle_wrapper.html

./gradlew build
gradle build
=====================================================
mvn test package

Run particular test

gradle test --tests TestClass

Create shareable build

gradle build --scan

Leave a Reply

Your email address will not be published. Required fields are marked *