void updateModuleSetResolutionRequirements( AssemblyId assemblyId, ModuleSet set, DependencySet dependencySet,
final ResolutionManagementInfo requirements,
final AssemblerConfigurationSource configSource )
throws DependencyResolutionException
{
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.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() )
{
updateDependencySetResolutionRequirements( dependencySet,
requirements, assemblyId,
projects.toArray( new MavenProject[projects.size()] ) );
}