Adam Bien's Weblog

Monday Apr 08, 2013

Configuring Default Goal In Maven 3

The default goal doesn't have to be repeatedly specified from the CLI and can be configured directly in the pom.xml:


<build>
	<defaultGoal>clean install</defaultGoal>
</build>

After the extension, you can perform the build with a simple: mvn

See you at Java EE Workshops at MUC Airport!


Special Event: Java 8 with Java EE 7: "More Power with Less Code", 13th October, 2014

A book about rethinking Java EE Patterns

Comments:

Now if only we could have custom keyboard shortcuts bound to Maven goals in Netbeans... (see URL) :-)

Posted by ReinoutS on April 09, 2013 at 07:51 PM CEST #

... or define aliases like

alias mci="mvn clean install -Pjetty"
alias mee="mvn eclipse:eclipse -Pjetty"

Posted by Daniel on April 11, 2013 at 11:47 AM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed
realworldpatterns.com
...the last 150 posts
...the last 10 comments
Links
License