Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.8.1, 3.9.0, 3.10.0, 3.10.1
-
None
Description
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.
Attachments
Issue Links
- fixes
-
MCOMPILER-433 mvn clean compile test compiles the source files twice
- Closed
- links to