'How to exclude one of Maven's lifecycle phase

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 1:[1]

you can (now) skip phases by directly calling the goal via

mvn <plugin>:<goal>

e.g.

mvn compiler:compile

see this answer for details

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Andreas Covidiot