diff options
Diffstat (limited to 'archiva-modules/archiva-maven')
2 files changed, 0 insertions, 53 deletions
diff --git a/archiva-modules/archiva-maven/archiva-maven-proxy/src/test/java/org/apache/archiva/repository/mock/ManagedRepositoryContentMock.java b/archiva-modules/archiva-maven/archiva-maven-proxy/src/test/java/org/apache/archiva/repository/mock/ManagedRepositoryContentMock.java index 623bf8c67..e49c913c7 100644 --- a/archiva-modules/archiva-maven/archiva-maven-proxy/src/test/java/org/apache/archiva/repository/mock/ManagedRepositoryContentMock.java +++ b/archiva-modules/archiva-maven/archiva-maven-proxy/src/test/java/org/apache/archiva/repository/mock/ManagedRepositoryContentMock.java @@ -23,7 +23,6 @@ import org.apache.archiva.common.filelock.DefaultFileLockManager; import org.apache.archiva.common.utils.VersionUtil; import org.apache.archiva.metadata.model.ArtifactMetadata; import org.apache.archiva.metadata.maven.model.MavenArtifactFacet; -import org.apache.archiva.model.ArchivaArtifact; import org.apache.archiva.model.ArtifactReference; import org.apache.archiva.model.ProjectReference; import org.apache.archiva.model.VersionedReference; @@ -398,18 +397,6 @@ public class ManagedRepositoryContentMock implements BaseRepositoryContentLayout } @Override - public boolean hasContent( ArtifactReference reference ) throws ContentAccessException - { - return false; - } - - @Override - public boolean hasContent( VersionedReference reference ) throws ContentAccessException - { - return false; - } - - @Override public void setRepository( ManagedRepository repo ) { this.repository = repo; @@ -616,12 +603,6 @@ public class ManagedRepositoryContentMock implements BaseRepositoryContentLayout return getRepoRootAsset().resolve( refs.get(reference)); } - @Override - public StorageAsset toFile( ArchivaArtifact reference ) - { - return null; - } - private String formatAsDirectory( String directory ) { return directory.replace( GROUP_SEPARATOR, PATH_SEPARATOR ); diff --git a/archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven/content/ManagedDefaultRepositoryContent.java b/archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven/content/ManagedDefaultRepositoryContent.java index 91657ce09..032c531d7 100644 --- a/archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven/content/ManagedDefaultRepositoryContent.java +++ b/archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven/content/ManagedDefaultRepositoryContent.java @@ -20,11 +20,9 @@ package org.apache.archiva.repository.maven.content; import org.apache.archiva.common.filelock.FileLockManager; import org.apache.archiva.common.utils.FileUtils; -import org.apache.archiva.common.utils.VersionUtil; import org.apache.archiva.configuration.FileTypes; import org.apache.archiva.metadata.maven.MavenMetadataReader; import org.apache.archiva.metadata.repository.storage.RepositoryPathTranslator; -import org.apache.archiva.model.ArchivaArtifact; import org.apache.archiva.model.ArtifactReference; import org.apache.archiva.model.ProjectReference; import org.apache.archiva.model.VersionedReference; @@ -1625,32 +1623,6 @@ public class ManagedDefaultRepositoryContent } @Override - public boolean hasContent( ArtifactReference reference ) throws ContentAccessException - { - StorageAsset artifactFile = toFile( reference ); - return artifactFile.exists( ) && !artifactFile.isContainer( ); - } - - @Override - public boolean hasContent( VersionedReference reference ) throws ContentAccessException - { - try - { - return ( getFirstArtifact( reference ) != null ); - } - catch ( LayoutException | ContentNotFoundException e ) - { - return false; - } - catch ( IOException e ) - { - String path = toPath( reference ); - log.error( "Could not read directory from repository {} - {}: ", getId( ), path, e.getMessage( ), e ); - throw new ContentAccessException( "Could not read path from repository " + getId( ) + ": " + path, e ); - } - } - - @Override public void setRepository( final ManagedRepository repo ) { this.repository = repo; @@ -1724,12 +1696,6 @@ public class ManagedDefaultRepositoryContent } @Override - public StorageAsset toFile( ArchivaArtifact reference ) - { - return repository.getAsset( toPath( reference ) ); - } - - @Override public StorageAsset toFile( VersionedReference reference ) { return repository.getAsset( toPath( reference ) ); |