Maven phases vs. goals: the key differences

preview_player
Показать описание
Maven lets you pass both goals and phases to the mvn command, but they're actually completely different concepts. Learning these important differences will help you understand how your Maven build is working, and configure and interact with it more effectively.

▶️Maven's core purpose 0:00
▶️The goals powering your build 0:38
▶️A plugin system for sharing goals 1:29
▶️Relationship between phases and goals 2:49
▶️Maven's 3 build lifecycles 3:28
▶️Install goal vs. phase in action 5:21
▶️Why some phases don't have a goal 6:11

Interested in switching to a more modern build tool? Check out the content below on the awesome Gradle build tool.

Рекомендации по теме
Комментарии
Автор

OMG, every Maven user should watch this.

SirWolf
Автор

I watched multiple videos about plugins and goals in maven but this video is different and actually amazing! thank you so much for this awesome video.

mehdis
Автор

Best explanation so far. I searched all around the internet about goals phases plugins but never got such crisp and to the point explanation. my search came to an end today. thanks a lot.

heyarshrajput
Автор

Best explanation of how the goals, plugins and phases work that i've seen. You should create a video on how to move from Maven to Gradle.

ReasoningBean
Автор

The most enlightening realization in my life about Maven was that 'clean' is the name of the lifecycle as well as the plugin as well as the goal in that plugin...

To your question: for me running goals directly was often useful for running various ad-hoc tasks against my dev environment i.e. things like DB scripts (Sql Maven plugin, Flyway Maven plugin). It goes against the Maven's philosophy of build automation, however, it was convenient to define such automation tasks in pom.xml, and keep them in one place with the rest of the build logic. And yes, I know that perfect people don't do that.

Thanks for the tutorial. Now I'm convinced about Maven and will start writing pom.xml's right away!

jozeftokarski
Автор

Best explanation I found so far, thx!

mgysmt
Автор

Very good and clear explanation of goals and phases. Thanks.

acuffaro
Автор

What a beautiful video!

This has so much more info!

Liked and subscribed :)

CloudVirtualizationEnthusiast
join shbcf.ru