verbose.setConfigProperty( DependencyManagerUtils.CONFIG_PROP_VERBOSE, Boolean.TRUE );
session = verbose;
}
DependencyFilter filter = request.getResolutionFilter();
ArtifactTypeRegistry stereotypes = session.getArtifactTypeRegistry();
CollectRequest collect = new CollectRequest();
collect.setRootArtifact( RepositoryUtils.toArtifact( project.getArtifact() ) );
collect.setRequestContext( "project" );
collect.setRepositories( project.getRemoteProjectRepositories() );
if ( project.getDependencyArtifacts() == null )
{
for ( Dependency dependency : project.getDependencies() )
{
if ( StringUtils.isEmpty( dependency.getGroupId() ) || StringUtils.isEmpty( dependency.getArtifactId() )
|| StringUtils.isEmpty( dependency.getVersion() ) )
{
// guard against case where best-effort resolution for invalid models is requested
continue;
}
collect.addDependency( RepositoryUtils.toDependency( dependency, stereotypes ) );
}
}
else
{
Map<String, Dependency> dependencies = new HashMap<String, Dependency>();
for ( Dependency dependency : project.getDependencies() )
{
String classifier = dependency.getClassifier();
if ( classifier == null )
{
ArtifactType type = stereotypes.get( dependency.getType() );
if ( type != null )
{
classifier = type.getClassifier();
}
}