Hi,

that's indeed quite a huge difference, but does this mean that the 55 seconds is only for compilation? The background about incremental builds is described/discussed in MCOMPILER-205[1] and Stack Overflow[2].

TLDR; If you change a method signature, you must also compile all classes that call this method (and throw a compilation error if you forgot to change this class). Basically there are 2 options: analyze every class and decide if it must be recompiled OR simply recompile everything. The maven-compiler-plugin does the latter by default because the java compiler should be quite efficient.
Hence I'm kind of surprised by your numbers.

We're always interested in improvements, of course.

thanks,
Robert

[1] https://issues.apache.org/jira/projects/MCOMPILER/issues/MCOMPILER-205
[2] https://stackoverflow.com/questions/16963012/maven-compiler-recompile-all-files-instead-modified/49700942#49700942

On Fri, 30 Nov 2018 16:34:24 +0100, Francesco Caliumi - Diennea <francesco.cali...@diennea.com> wrote:

Hi everyone,
I'm wondering why, modifying just a single file, a "without clean" build takes a time very close to a "clean" build.

Some numbers about my build times:
1) mvn clean install: 01:13 min
2) mvn install (without file changes): 10.541 s
3) mvn install (with a single source file changed, among 2680 others left unchanged): 01:06 min

In case 3 I'm expecting a time closer to case 2, not to case 1. Both case 1 and 3 reports "Compiling 2680 source files".

Are there some options to make maven-compiler-plugin skip compiling sources where the xxx.class file has a more recent update time than the relative xxx.java file?

Many thanks in advance,
Francesco


--

Francesco Caliumi
Developer @ Diennea - MagNews
Tel.: (+39) 0546 066100 - Int. 266
Viale G.Marconi 30/14 - 48018 Faenza (RA)

[Magnews.it]<http://www.magnews.it/it>

[Linkedin]<http://www.linkedin.com/company/diennea---magnews> [Twitter] <http://twitter.com/DienneaMagNews> [Facebook] <http://www.facebook.com/pages/MagNews/197617841797> [Newsletter] <http://www.magnews.it/it/iscriviti-alla-newsletter>

________________________________

CONFIDENTIALITY & PRIVACY NOTICE
This e-mail (including any attachments) is strictly confidential and may also contain privileged information. If you are not the intended recipient you are not authorised to read, print, save, process or disclose this message. If you have received this message by mistake, please inform the sender immediately and destroy this e-mail, its attachments and any copies. Any use, distribution, reproduction or disclosure by any person other than the intended recipient is strictly prohibited and the person responsible may incur in penalties. The use of this e-mail is only for professional purposes; there is no guarantee that the correspondence towards this e-mail will be read only by the recipient, because, under certain circumstances, there may be a need to access this email by third subjects belonging to the Company.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to