catch ( final Exception eee )
{
getLogger().error( "Error interpolating componentDescriptor: " + location, eee );
}
final Location resolvedLocation = locator.resolve( location );
if ( resolvedLocation == null )
{
throw new AssemblyReadException( "Failed to locate component descriptor: " + location );
}
Component component = null;
Reader reader = null;
try
{
reader = new InputStreamReader( resolvedLocation.getInputStream() );
component = new ComponentXpp3Reader().read( reader );
}
catch ( final IOException e )
{
throw new AssemblyReadException( "Error reading component descriptor: " + location + " (resolved to: "
+ resolvedLocation.getSpecification() + ")", e );
}
catch ( final XmlPullParserException e )
{
throw new AssemblyReadException( "Error reading component descriptor: " + location + " (resolved to: "
+ resolvedLocation.getSpecification() + ")", e );
}
finally
{
IOUtil.close( reader );
}