I’ve seen Gradle becoming more popular in recent years, but it wasn’t too long ago that Maven was the tool for managing dependencies and building/packaging apps.
From my own experience with both, here’s the commonly used equivalent commands:
Maven | Gradle |
mvn compile | No equivalent as gradle build compiles and packages? |
mvn package | gradle build |
mvn install (see note below) | gradle build |
mvn test | gradle test |
There is no direct equivalent to ‘mvn install’ in gradle, but if you depend on a local Maven repo, there is a Gradle plugin to publish packaged artifacts to a Maven repo – see here.