Hi,

I've noticed that maven always recompiles all the files.
Even if you run mvn install multiple times in a row, mvn will
recompile java code as follows:
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 884 source files to
/Users/vladimirsitnikov/Documents/code/incubator-optiq/core/target/classes

That bothers me, so I went and found that it is a known
maven-compiler-plugin problem (see [1] and [2])

The suggested solution is adding
<useIncrementalCompilation>false</useIncrementalCompilation> to the
configuration of maven-compiler-plugin. It looks like the setting is
inverse :)

Here's my comparison of adding the option: rebuild time is reduced
from 28 sec to 18 sec (see [3])
Any objections if I add useIncrementalCompilation=false in the pom?

I guess the rest of the build time is taken by recreating of the jars
(due to resource properties being recreated with new value of
"build.timestamp")

[1]: 
http://stackoverflow.com/questions/17944108/maven-compiler-plugin-always-detecting-a-set-of-sources-as-stale
[2]: https://jira.codehaus.org/browse/MCOMPILER-209
[3]: https://gist.github.com/vlsi/3d490836ff6ebaf193db

-- 
Regards,
Vladimir Sitnikov

Reply via email to