if ( StringUtils.isBlank( groupId ) )
{
String emsg = "Error generating dependency tree [" + Keys.toKey( groupId, artifactId, modelVersion )
+ "]: groupId is blank.";
getLogger().error( emsg );
throw new ArchivaException( emsg );
}
if ( StringUtils.isBlank( artifactId ) )
{
String emsg = "Error generating dependency tree [" + Keys.toKey( groupId, artifactId, modelVersion )
+ "]: artifactId is blank.";
getLogger().error( emsg );
throw new ArchivaException( emsg );
}
if ( StringUtils.isBlank( modelVersion ) )
{
String emsg = "Error generating dependency tree [" + Keys.toKey( groupId, artifactId, modelVersion )
+ "]: version is blank.";
getLogger().error( emsg );
throw new ArchivaException( emsg );
}
DependencyGraph graph = fetchGraph( groupId, artifactId, modelVersion );
if ( graph == null )
{
throw new ArchivaException( "Graph is unexpectedly null." );
}
TreeListVisitor treeListVisitor = new TreeListVisitor();
DependencyGraphWalker walker = new WalkDepthFirstSearch();
walker.visit( graph, treeListVisitor );