@@ -878,20 +878,22 @@ public void execute() throws MojoExecutionException, CompilationFailureException
878
878
879
879
DirectoryScanResult dsr = computeInputFileTreeChanges (incrementalBuildHelper , sources );
880
880
881
- boolean idk = compiler .getCompilerOutputStyle ()
881
+ boolean immutableOutputFile = compiler .getCompilerOutputStyle ()
882
882
.equals (CompilerOutputStyle .ONE_OUTPUT_FILE_FOR_ALL_INPUT_FILES )
883
883
&& !canUpdateTarget ;
884
884
boolean dependencyChanged = isDependencyChanged ();
885
885
boolean sourceChanged = isSourceChanged (compilerConfiguration , compiler );
886
886
boolean inputFileTreeChanged = hasInputFileTreeChanged (dsr );
887
887
// CHECKSTYLE_OFF: LineLength
888
- if (idk || dependencyChanged || sourceChanged || inputFileTreeChanged )
888
+ if (immutableOutputFile || dependencyChanged || sourceChanged || inputFileTreeChanged )
889
889
// CHECKSTYLE_ON: LineLength
890
890
{
891
- String cause = idk
892
- ? "idk"
893
- : (dependencyChanged ? "dependency" : (sourceChanged ? "source" : "input tree" ));
894
- getLog ().info ("Changes detected - recompiling the module! :" + cause );
891
+ String cause = immutableOutputFile
892
+ ? "immutable single output file"
893
+ : (dependencyChanged
894
+ ? "changed dependency"
895
+ : (sourceChanged ? "changed source code" : "added or removed source files" ));
896
+ getLog ().info ("Recompiling the module because of " + cause + "." );
895
897
if (showCompilationChanges ) {
896
898
for (String fileAdded : dsr .getFilesAdded ()) {
897
899
getLog ().info ("\t + " + fileAdded );
@@ -903,7 +905,7 @@ public void execute() throws MojoExecutionException, CompilationFailureException
903
905
904
906
compilerConfiguration .setSourceFiles (sources );
905
907
} else {
906
- getLog ().info ("Nothing to compile - all classes are up to date" );
908
+ getLog ().info ("Nothing to compile - all classes are up to date. " );
907
909
908
910
return ;
909
911
}
0 commit comments