mirror of https://github.com/apache/maven.git
[MNG-4618] maven-javadoc-plugin aggregate-jar fails with maven3 and multiple modules
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@931086 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bf506287ed
commit
37a0e64aa0
|
@ -124,11 +124,23 @@ public class MavenSession
|
|||
|
||||
public void setProjects( List<MavenProject> projects )
|
||||
{
|
||||
//TODO: Current for testing classes creating the session
|
||||
if ( projects.size() > 0 )
|
||||
if ( !projects.isEmpty() )
|
||||
{
|
||||
this.currentProject = projects.get( 0 );
|
||||
this.topLevelProject = projects.get( 0 );
|
||||
this.topLevelProject = currentProject;
|
||||
for ( MavenProject project : projects )
|
||||
{
|
||||
if ( project.isExecutionRoot() )
|
||||
{
|
||||
topLevelProject = project;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.currentProject = null;
|
||||
this.topLevelProject = null;
|
||||
}
|
||||
this.projects = projects;
|
||||
}
|
||||
|
|
|
@ -451,18 +451,16 @@ public class DefaultProjectBuilder
|
|||
MavenProject project = interimResult.listener.getProject();
|
||||
initProject( project, result );
|
||||
|
||||
projects.add( project );
|
||||
|
||||
results.add( new DefaultProjectBuildingResult( project, result.getProblems(), null ) );
|
||||
|
||||
project.setExecutionRoot( interimResult.root );
|
||||
|
||||
List<MavenProject> modules = new ArrayList<MavenProject>();
|
||||
noErrors = build( results, modules, interimResult.modules, config ) && noErrors;
|
||||
|
||||
projects.addAll( modules );
|
||||
projects.add( project );
|
||||
|
||||
project.setExecutionRoot( interimResult.root );
|
||||
project.setCollectedProjects( modules );
|
||||
|
||||
results.add( new DefaultProjectBuildingResult( project, result.getProblems(), null ) );
|
||||
}
|
||||
catch ( ModelBuildingException e )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue