Maven package phase equivalent in Gradle

Dmitry Senkovich :

I'm building a Spring Boot project with Gradle migrating it from Maven. I wonder what Gradle task is doing the same thing as the package phase in Maven.

Thank you!

miskender :

Maven build is based on build cycle phases, Gradle build is based on tasks and tasks dependencies.

Maven package phase can execute multiple plugin goals that is configured up to the package phase in the lifecycle. The same thing can be achieve with gradle using tasks(and maybe creating task dependencies to integrate them in to default build)

If you only care about running unit tests and creating jar file; gradle way would be gradle build. If other actions are also concern in the maven package phase, additional gradle tasks should be added.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=474396&siteId=1