PlexusConfiguration[] components = c.getChild( "components" ).getChildren( "component" );
for ( int i = 0; i < components.length; i++ )
{
PlexusConfiguration component = components[i];
csd.addComponentDescriptor( buildComponentDescriptor( component, realm ) );
}
// ----------------------------------------------------------------------
// Dependencies
// ----------------------------------------------------------------------
PlexusConfiguration[] dependencies = c.getChild( "dependencies" ).getChildren( "dependency" );
for ( int i = 0; i < dependencies.length; i++ )
{
PlexusConfiguration d = dependencies[i];
ComponentDependency cd = new ComponentDependency();
cd.setArtifactId( d.getChild( "artifact-id" ).getValue() );
cd.setGroupId( d.getChild( "group-id" ).getValue() );
String type = d.getChild( "type" ).getValue();
if(type != null)
{
cd.setType( type );
}
cd.setVersion( d.getChild( "version" ).getValue() );
csd.addDependency( cd );
}
return csd;