ref.setGroupId( groupId );
ref.setVersion( version );
ManagedRepositoryContent repository = repositoryFactory.getManagedRepositoryContent( repositoryId );
String path = repository.toMetadataPath( ref );
int index = path.lastIndexOf( '/' );
File targetPath = new File( repoConfig.getLocation(), path.substring( 0, index ) );
if ( !targetPath.exists() )
{