[ https://issues.apache.org/jira/browse/MCOMPILER-525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jorge Solórzano updated MCOMPILER-525: -------------------------------------- Affects Version/s: 3.10.0 3.9.0 3.8.1 > Incremental recompile incorrect detection of dependency change > -------------------------------------------------------------- > > Key: MCOMPILER-525 > URL: https://issues.apache.org/jira/browse/MCOMPILER-525 > Project: Maven Compiler Plugin > Issue Type: Bug > Affects Versions: 3.8.1, 3.9.0, 3.10.0, 3.10.1 > Reporter: Jorge Solórzano > Assignee: Guillaume Nodet > Priority: Major > Fix For: 3.11.0 > > > I have just hit an issue running the ITs of maven-jar-plugin, specifically > the *MJAR-70-no-recreation* test on Maven 3.9.0-SNAPSHOT. > Trying to debug the issue I just found out that the issue is not related to > Maven 3.9.0-SNAPSHOT but the real issue seems related to the > maven-compiler-plugin used by default on that version. > maven-compiler-plugins tries to detect changes on incremental compilation > running *isDependencyChanged()* which in turn executes *hasNewFile()* but > during the same run of maven, if the compile phase is run twice it would not > detect correctly that nothing has changed since is just evaluating the file > time of the class but the class ends up being newer than the buildStartTime, > so this causes the recompilation. > My proposal is to add a step to set the last modification time if the > incremental compilation is enabled and that way it will use the exact same > time than the buildStartTime() from maven. -- This message was sent by Atlassian Jira (v8.20.10#820010)