Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0
-
None
Description
The invoker-plugin doesn't take the -N flag into consideration.
This is in fact a missing feature further down in a other component, for which I didn't find the correct project to report the issue.
As far as I have seen:
org.apache.maven.shared.invoker.InvocationRequest
- is missing something like isNonRecursive(), setNonRecursive().
org.apache.maven.shared.invoker.DefaultInvocationRequest
- needs a new field (boolean nonRecursive). default value? probably false.
- has to implement the two methods above (simple getter/setter)
org.apache.maven.shared.invoker.MavenCommandLineBuilder.setFlags(InvocationRequest, Commandline)
- should set the -N flag if the given request returns true for isNonRecursive()
org.apache.maven.plugin.invoker.InvokerMojo
- needs a new field (boolean nonRecursive). default value? inherit from current invocation?
- should pass the value of nonRecursive to the request in runBuild()
Reasoning:
I am currently looking for a workaround for the more than buggy inheritance handling in the site-plugin. As a possible solution, I want to use the invoker-plugin on a project which contains all my projects as modules (but is not parent of them). the invoker-plugin is configured to run the "clean" and "site" goals of all modules in the project directory. Since the generated sites inherit from the wrong module (the containing module instead of the parent module) if not invoked with the -N flag, I hoped that the invoker-plugin could pass the -N flag to the invoked poms. Bad luck: it doesn't do so.
Further discussion is probably needed concerning the default value of the wished nonRecursive field described above. All four possible scenarios
should be taken into account. Maybe this single field is not enough to solve the problem.