incubator-cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rohit Yadav <>
Subject Re: [TIPS]You don't have to rebuild whole CloudStack again and again
Date Wed, 13 Feb 2013 06:26:01 GMT
On Wed, Feb 13, 2013 at 4:14 AM, Frank Zhang <> wrote:
> Just for people who may not have known this.
> As CloudStack switched to maven, the build time for the whole project increases significantly.
Back to the old golden day with ant, developers of CloudStack usually do:
> ant clean-all build-all
> I know lots of them still do this in maven version by "mvn clean install -Dnoss". So
if you only change some code of a component, you don't have to rebuild whole project, just
> go to sub-folder of that component, for example, for my baremetal I go to incubator-cloudstack/plugins/hypervisors/baremetal
and do "mvn clean install -Dnoss". It will only
> build/install that component(module in maven noun) which reduces a lot of build time.
 Thanks guys making CloudStack into small plugins.

Another way I use is to select the project I want to rebuild using -pl
or --projects and use file system paths instead of artifact names. And
I've four cores so I build them in parallel as well.
mvn -T 4 (-T and specify number of threads, ol' school hackers can
relate this to make's -j (job) argument/syntax).

With skipping tests and awsapi, my record fastest build time is 39s on
my computer.


> one thing to note is if you changed a CONSTANT in one module and this CONSTANT is referred
in other modules, you have to rebuild referring modules as well(I suggest rebuilding
> whole project in this case), because javac will resolve CONSTANT in compiling time not
linking time for optimization.
> Still, if you encounter some weird issue, rebuilding whole project is always safe.

View raw message