How to configure maven for no purpose for the mvn command?

I am trying to configure a Maven project to be based on getting the mvn command on the command line without any purpose like install or package .

This may seem like a strange goal, but I guess this is the easiest way to fit a new project into existing architecture.

I looked at old pom.xml files, trying to find how this is determined, with no luck. (And too much for me to just simply copy the old pom .)

+4
source share
1 answer

I believe you are looking for a <defaultGoal> element. This is part of the BaseBuild Element Set .

The value of the <defaultGoal> element can be either a goal or a life cycle phase. For example, if I add this to my pom:

 <build> <defaultGoal>package</defaultGoal> </build> 

Then I can call the mvn command without arguments and the life cycle if the package phase is started (as if I were calling mvn package ).

+5
source

All Articles