Thanks for you feedback, here is an updated one:
mvn -pl `git status --porcelain |sed -n '/\/src/p'| awk '{print $2}' |sed
's/\/src/$/'|cut -d $ -f 1|uniq |tr "\n" "," |sed 's/,$/,client/'` clean install
Which will be more actuate in detecting changes in maven java projects.
> -----Original Message-----
> From: Prachi Damle [mailto:[email protected]]
> Sent: Thursday, April 04, 2013 2:32 PM
> To: [email protected]
> Subject: RE: How to dramatically reduce the build time:)
>
> This is amazing!!! Reduced build time for me, from 6:45.917s to 1:28.435s
>
> Thanks Edison!
>
> On Thu, Apr 4, 2013 at 6:48 AM, Edison Su <[email protected]> wrote:
>
> > As a poor man, don't have luxury build machine as Alex has, I find a
> > way may help you a little bit to build cloudstack as quick as possible:
> > mvn -pl `git status --porcelain |sed '/^?/d'| awk '{print $2}' |sed
> > 's/\/src/$/'|cut -d $ -f 1|uniq |tr "\n" "," |sed 's/,$/,client/'`
> > clean install It tries to find out what has been changed in your local
> > workspace through git, then tell mvn to build corresponding modified
> > maven projects. Not perfect though, maybe work for some:)
> >
> >