if ( moduleSets != null && !moduleSets.isEmpty() )
{
for ( final ModuleSet set : moduleSets )
{
final ModuleBinaries binaries = set.getBinaries();
if ( binaries != null )
{
Set<MavenProject> projects;
try
{
projects = ModuleSetAssemblyPhase.getModuleProjects( set, configSource, getLogger() );
}
catch ( final ArchiveCreationException e )
{
throw new DependencyResolutionException(
"Error determining project-set for moduleSet with binaries.",
e );
}
if ( projects != null && !projects.isEmpty() )
{
for ( final MavenProject p : projects )
{
requirements.enableProjectResolution( p );
if ( p.getArtifact() == null )
{
// TODO: such a call in MavenMetadataSource too - packaging not really the intention of
// type
final Artifact artifact =
factory.createBuildArtifact( p.getGroupId(), p.getArtifactId(), p.getVersion(),
p.getPackaging() );
p.setArtifact( artifact );
}
}
}
if ( binaries.isIncludeDependencies() )
{
getDependencySetResolutionRequirements( assembly,
ModuleSetAssemblyPhase.getDependencySets( binaries ),
requirements, projects.toArray( new MavenProject[] {} ) );
}