git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@736283 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Britton Isbell 2009-01-21 10:56:31 +00:00
parent 68d8ce9d34
commit 4247360de9
1 changed files with 8 additions and 3 deletions

View File

@ -109,7 +109,7 @@ public final class MavenDependencyProcessor
List<DomainModel> parentModels = getParentsOfDomainModel( domainModel, mdReader );
if( parentModels == null )
throw new DependencyProcessorException( "cannor read parent for " + bmd.getGAV() );
throw new DependencyProcessorException( "cannot read parent for " + bmd.getGAV() );
domainModels.addAll( parentModels );
}
@ -136,13 +136,18 @@ public final class MavenDependencyProcessor
}
private static List<DomainModel> getParentsOfDomainModel( MavenDomainModel domainModel, MetadataReader mdReader )
throws IOException, MetadataReaderException
throws IOException, MetadataReaderException, DependencyProcessorException
{
List<DomainModel> domainModels = new ArrayList<DomainModel>();
if ( domainModel.hasParent() )
{
byte[] b = mdReader.readMetadata( domainModel.getParentMetadata() );
if ( b == null || b.length < 1 )
throw new DependencyProcessorException( "cannot read metadata for " + domainModel.getParentMetadata() );
MavenDomainModel parentDomainModel =
new MavenDomainModel( mdReader.readMetadata( domainModel.getParentMetadata() ) );
new MavenDomainModel( b );
domainModels.add( parentDomainModel );
domainModels.addAll( getParentsOfDomainModel( parentDomainModel, mdReader ) );
}