throw new ContentNotFoundException( "Unable to get related artifacts using a non-existant directory: " + repoDir.getAbsolutePath() ); throw new ContentNotFoundException( "Unable to get related artifacts using a non-directory: " + repoDir.getAbsolutePath() );
public void deleteVersion( VersionedReference reference ) throws ContentNotFoundException { File groupDir = new File( repository.getLocation(), reference.getGroupId() ); if ( !groupDir.exists() ) { throw new ContentNotFoundException( "Unable to get versions using a non-existant groupId directory: " + groupDir.getAbsolutePath() ); } if ( !groupDir.isDirectory() ) { throw new ContentNotFoundException( "Unable to get versions using a non-directory: " + groupDir.getAbsolutePath() ); } // First gather up the versions found as artifacts in the managed repository. File typeDirs[] = groupDir.listFiles(); for ( File typeDir : typeDirs ) { if ( !typeDir.isDirectory() ) { // Skip it, we only care about directories. continue; } if ( !typeDir.getName().endsWith( "s" ) ) { // Skip it, we only care about directories that end in "s". } deleteVersions( typeDir, reference ); } }
throw new ContentNotFoundException( "Unable to get versions using a non-existant groupId directory: " + groupDir.getAbsolutePath() ); throw new ContentNotFoundException( "Unable to get versions using a non-directory: " + groupDir.getAbsolutePath() );
throw new ContentNotFoundException( "Unable to get versions using a non-existant groupId directory: " + groupDir.getAbsolutePath() ); throw new ContentNotFoundException( "Unable to get versions using a non-directory: " + groupDir.getAbsolutePath() );
throw new ContentNotFoundException( "Unable to get versions on a non-existant directory: " + repoDir.getAbsolutePath() ); throw new ContentNotFoundException( "Unable to get versions on a non-directory: " + repoDir.getAbsolutePath() );
throw new ContentNotFoundException( "Unable to get Versions on a non-existant directory: " + repoDir.getAbsolutePath() ); throw new ContentNotFoundException( "Unable to get Versions on a non-directory: " + repoDir.getAbsolutePath() );
throw new ContentNotFoundException( "Unable to get related artifacts using a non-existant directory: " + repoDir.getAbsolutePath() ); throw new ContentNotFoundException( "Unable to get related artifacts using a non-directory: " + repoDir.getAbsolutePath() );