Hello again

This is a side-effect of the work on maven-compiler-plugin. The "incremental build" mechanism is reviewed as a side-effect, for fixing MCOMPILER-209 [1] among others. When the compiler has detected that no source file, no dependency and no compiler option has changed, is there away to notify other plugins (in particular maven-surefire-plugin) so that they can skip e.g. tests if configured to do so?

If there is no existing mechanism, could the org.apache.maven.api.plugin.Mojo interface be modified for returning an enumeration value instead of void? Maybe something like:

   public interface Mojo {
        enum Status {
            EXECUTED,

            UNCHANGED,

            SKIPPED
        }

        Status execute();
   }

Together with some API, maybe in Session, telling what the previous plugins returned? For example, Surefire could skip the tests if all previous plugins (in particular the compiler plugin) returned Status.UNCHANGED. This behavior would be optional, through some configuration option.

    Martin

[1]https://issues.apache.org/jira/browse/MCOMPILER-209

Reply via email to