exec-maven-plugin
exec-maven-plugin copied to clipboard
Skip if output is younger than input
Just like the compiler plugin works, the exec plugin should skip execution in case the output is younger than the input.
As the exec plugin per se is unaware what the input and output to the execution is, a smart solution could be to configure it with feasible default:
-
holds patterns for input files, and defaults to ${project.build.sourceDirectory}. -
holds patterns for output files, and defaults to ${project.build.outputDirectory}.
As a result:
- When working with a plain Java project, no configuration is needed; the performance optization is granted for free.
- When backwards compatibility is wanted, deactivate the optimization using empty
and . - In all other case, provide feasible regex patters for
and to safely detect only those files that play a role.