-2

What's the difference between mvn package and mvn compile war:war?

When I run both of these commands, they both seem to do the same thing.

NB: I'm developing a spring boot app

Thank you in advance

Ousama
  • 2,176
  • 3
  • 21
  • 26
  • Does this answer your question? [What are Maven goals and phases and what is their difference?](https://stackoverflow.com/questions/16205778/what-are-maven-goals-and-phases-and-what-is-their-difference) – Joe Apr 30 '21 at 13:55
  • Thank you but It doesn't answer my question – Ousama Apr 30 '21 at 13:59

1 Answers1

1

The second command does the most essential things (but no tests, no resources ...).

Always use the lifecycle, call mvn clean package

J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142