mirror of https://github.com/apache/maven.git
[MNG-6981] Include the child projects (modules) of the selected projects with --pl in the reactor.
This closes #374.
This commit is contained in:
parent
87670ddc08
commit
42af8ba5a2
|
@ -180,7 +180,7 @@ public class DefaultGraphBuilder
|
|||
{
|
||||
File reactorDirectory = getReactorDirectory( request );
|
||||
|
||||
Collection<MavenProject> selectedProjects = new LinkedHashSet<>( request.getSelectedProjects().size(), 1 );
|
||||
Collection<MavenProject> selectedProjects = new LinkedHashSet<>();
|
||||
|
||||
for ( String selector : request.getSelectedProjects() )
|
||||
{
|
||||
|
@ -190,6 +190,12 @@ public class DefaultGraphBuilder
|
|||
.orElseThrow( () -> new MavenExecutionException(
|
||||
"Could not find the selected project in the reactor: " + selector, request.getPom() ) );
|
||||
selectedProjects.add( selectedProject );
|
||||
|
||||
List<MavenProject> children = selectedProject.getCollectedProjects();
|
||||
if ( children != null )
|
||||
{
|
||||
selectedProjects.addAll( children );
|
||||
}
|
||||
}
|
||||
|
||||
result = new ArrayList<>( selectedProjects );
|
||||
|
|
Loading…
Reference in New Issue