Thursday, 7 March 2013

maven - only build what you need

Building a specific project

// syntax: mvn clean package -pl <groupId>:<artifactId>
mvn clean package -pl com.mycompany:myproduct

// build to succeed **You need to have dependencies installed (you must have run mvn install first)**

Building a specific project and its dependencies

mvn clean package -pl com.mycompany:myproduct -am

// The -am option means also-make and will build dependent projects

No comments: