You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A more convenient way would be to have an @IncrementalBuild annotation that has boolean properties runOnConfiguration, runOnBuild and runOnClean, specifying none of them, or all false, is then equivialent to ignore.
This can then be used to generate the xml automatic or even evaluated at runtime.
A more convenient way would be to have an @IncrementalBuild annotation that has boolean properties runOnConfiguration, runOnBuild and runOnClean, specifying none of them, or all false, is then equivialent to ignore.
As discussed elsewhere runOnBuild maybe should be more fine-grained and be instead runOnFullBuild and runOnIncrementalBuild. The latter could be used for mojos that are expensive to execute but need to be executed more often than only once on configuration.
On the other hand such a mojo should then probably be improved to detect by itself if a full execution is really necessary and return fast if nothing is really to do. Then it could just run on incremental builds and only execute 'completely' if necessary.
This can then be used to generate the xml automatic or even evaluated at runtime.
This is similar to eclipse-m2e/m2e-core#830. If a runtime retention-policy is used we could just check for and read the annotation at runtime and avoid the need to generate a metadata-file. The would simplify building mojos that use it. And because a plugin that uses the build-context has a dependency for this artifact anyways I don't see a real reason to not use that. At least the no-additional-dependency argument does not apply here.
The is actually no difference between "full" and "incremental", both are builds and a mojo should simply avoid unneeded changing of files if it detects them instead.
The point is where the dependency is evaluated, m2e must be able to read the metadata regardless of supported version and thus an XML is better suited here than a runtime annotation.
Currently m2e allows to specify a
lifecycleMappingMetadata
to control how the mojo should be handeled in an incremental build: https://www.eclipse.org/m2e/documentation/m2e-making-maven-plugins-compat.htmlA more convenient way would be to have an
@IncrementalBuild
annotation that has boolean propertiesrunOnConfiguration
,runOnBuild
andrunOnClean
, specifying none of them, or all false, is then equivialent toignore
.This can then be used to generate the xml automatic or even evaluated at runtime.
FYI @HannesWell
The text was updated successfully, but these errors were encountered: