Search code examples
mavenmaven-pluginmaven-profiles

Maven - Running mvn without arguments


Does running mvn with no arguments in the directory of the project result in the default lifecylce being executed for that project?

What if a profile is specified with the -P flag? does it execute the default lifecycle and binds any plugins in the profile to the phases they declare?


Solution

  • On your pom you can use the tag defaultGoal to specify the goal that should be executed by maven if you do not specify nothing on the command line. See POM reference