Issue
Can I execute a Maven phase (say: deploy) without implicitly calling the previous ones?
The reason: I would like to construct something like install site-deploy (only-deploy)
to make sure that the deployment of the artifact only happens if all other phases/goals were successful. I cannot replace (only-deploy)
with deploy:deploy
because some projects which use this configuration have additional goals in the deploy phase.
Solution
No, it is called lifecycle for a reason. When we start with the next major release of Maven, we'll work on advanced lifecycle handling, where https://issues.apache.org/jira/browse/MNG-5666 is part of the solution for your issue.
Both the install and deploy plugin have an experimental xxxAtEnd, maven-site-plugin deploy goal should require such option as well.
Answered By - Robert Scholte
Answer Checked By - Katrina (JavaFixing Volunteer)