Issue
I have .war file and I need to do "deploy script". Is it possible to do this with maven? Can I execute only deploy phase of lifecycle? Or it will be better to use some other instruments for deployment like ant, gant etc.
Solution
No, you can't skip phases. The mvn phase-x
command always means "run all phases until phase-x, inclusive". Some plugins, however can detect if there have been changes since their last execution and decide (on their own) not to run — the subsequent build is faster.
I'm not sure what exactly you want to achieve — perhaps you could take a look at Maven assembly plugin?
Answered By - MaDa
Answer Checked By - Clifford M. (JavaFixing Volunteer)