aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/RepositoryContent.java11
-rw-r--r--archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/mock/ManagedRepositoryContentMock.java6
-rw-r--r--archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/mock/RemoteRepositoryContentMock.java6
-rw-r--r--archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/mock/ManagedRepositoryContentMock.java24
-rw-r--r--archiva-modules/archiva-maven/archiva-maven-proxy/src/test/java/org/apache/archiva/repository/mock/ManagedRepositoryContentMock.java25
-rw-r--r--archiva-modules/archiva-maven/archiva-maven-proxy/src/test/java/org/apache/archiva/repository/mock/RemoteRepositoryContentMock.java6
-rw-r--r--archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven/content/AbstractDefaultRepositoryContent.java7
-rw-r--r--archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven/content/ManagedDefaultRepositoryContent.java30
-rw-r--r--archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven/content/RemoteDefaultRepositoryContent.java19
9 files changed, 0 insertions, 134 deletions
diff --git a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/RepositoryContent.java b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/RepositoryContent.java
index fd92be1a2..c30550eb3 100644
--- a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/RepositoryContent.java
+++ b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/RepositoryContent.java
@@ -31,17 +31,6 @@ public interface RepositoryContent
/**
- * Given a repository relative path to a filename, return the {@link ArtifactReference} object suitable for the path.
- *
- * @param path the path relative to the repository base dir for the artifact.
- * @return the {@link ArtifactReference} representing the path. (or null if path cannot be converted to
- * a {@link ArtifactReference})
- * @throws LayoutException if there was a problem converting the path to an artifact.
- */
- ArtifactReference toArtifactReference( String path )
- throws LayoutException;
-
- /**
* Given an {@link ArtifactReference}, return the relative path to the artifact.
*
* @param reference the artifact reference to use.
diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/mock/ManagedRepositoryContentMock.java b/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/mock/ManagedRepositoryContentMock.java
index bab83734d..2a2bf398d 100644
--- a/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/mock/ManagedRepositoryContentMock.java
+++ b/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/mock/ManagedRepositoryContentMock.java
@@ -322,12 +322,6 @@ public class ManagedRepositoryContentMock implements BaseRepositoryContentLayout
}
@Override
- public ArtifactReference toArtifactReference( String path ) throws LayoutException
- {
- return null;
- }
-
- @Override
public String toPath( ArtifactReference reference )
{
return null;
diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/mock/RemoteRepositoryContentMock.java b/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/mock/RemoteRepositoryContentMock.java
index bdf951f49..1b9a85732 100644
--- a/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/mock/RemoteRepositoryContentMock.java
+++ b/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/mock/RemoteRepositoryContentMock.java
@@ -60,12 +60,6 @@ public class RemoteRepositoryContentMock implements RemoteRepositoryContent
}
@Override
- public ArtifactReference toArtifactReference( String path ) throws LayoutException
- {
- return null;
- }
-
- @Override
public String toPath( ArtifactReference reference )
{
return null;
diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/mock/ManagedRepositoryContentMock.java b/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/mock/ManagedRepositoryContentMock.java
index 5deb975e7..054d09561 100644
--- a/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/mock/ManagedRepositoryContentMock.java
+++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/mock/ManagedRepositoryContentMock.java
@@ -336,30 +336,6 @@ public class ManagedRepositoryContentMock implements BaseRepositoryContentLayout
private Map<ArtifactReference, String> refs = new HashMap<>();
- @Override
- public ArtifactReference toArtifactReference( String path ) throws LayoutException
- {
- if ( StringUtils.isBlank( path ) )
- {
- throw new LayoutException( "Unable to convert blank path." );
- }
-
- ArtifactMetadata metadata = getArtifactForPath("test-repository", path);
-
- ArtifactReference artifact = new ArtifactReference();
- artifact.setGroupId( metadata.getNamespace() );
- artifact.setArtifactId( metadata.getProject() );
- artifact.setVersion( metadata.getVersion() );
- MavenArtifactFacet facet = (MavenArtifactFacet) metadata.getFacet( MavenArtifactFacet.FACET_ID );
- if ( facet != null )
- {
- artifact.setClassifier( facet.getClassifier() );
- artifact.setType( facet.getType() );
- }
- refs.put(artifact, path);
- return artifact;
- }
-
public ArtifactMetadata getArtifactForPath( String repoId, String relativePath )
{
String[] parts = relativePath.replace( '\\', '/' ).split( "/" );
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 7048470d8..3730c20d6 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
@@ -369,31 +369,6 @@ public class ManagedRepositoryContentMock implements BaseRepositoryContentLayout
private Map<ArtifactReference, String> refs = new HashMap<>();
- @Override
- public ArtifactReference toArtifactReference( String path ) throws LayoutException
- {
- if ( StringUtils.isBlank( path ) )
- {
- throw new LayoutException( "Unable to convert blank path." );
- }
-
- ArtifactMetadata metadata = getArtifactForPath("test-repository", path);
-
- ArtifactReference artifact = new ArtifactReference();
- artifact.setGroupId( metadata.getNamespace() );
- artifact.setArtifactId( metadata.getProject() );
- artifact.setVersion( metadata.getVersion() );
- artifact.setProjectVersion( metadata.getProjectVersion( ) );
- MavenArtifactFacet facet = (MavenArtifactFacet) metadata.getFacet( MavenArtifactFacet.FACET_ID );
- if ( facet != null )
- {
- artifact.setClassifier( facet.getClassifier() );
- artifact.setType( facet.getType() );
- }
- refs.put(artifact, path);
- return artifact;
- }
-
public ArtifactMetadata getArtifactForPath( String repoId, String relativePath )
{
String[] parts = relativePath.replace( '\\', '/' ).split( "/" );
diff --git a/archiva-modules/archiva-maven/archiva-maven-proxy/src/test/java/org/apache/archiva/repository/mock/RemoteRepositoryContentMock.java b/archiva-modules/archiva-maven/archiva-maven-proxy/src/test/java/org/apache/archiva/repository/mock/RemoteRepositoryContentMock.java
index 057d09a93..168ed3dbc 100644
--- a/archiva-modules/archiva-maven/archiva-maven-proxy/src/test/java/org/apache/archiva/repository/mock/RemoteRepositoryContentMock.java
+++ b/archiva-modules/archiva-maven/archiva-maven-proxy/src/test/java/org/apache/archiva/repository/mock/RemoteRepositoryContentMock.java
@@ -66,12 +66,6 @@ public class RemoteRepositoryContentMock implements RemoteRepositoryContent
}
@Override
- public ArtifactReference toArtifactReference( String path ) throws LayoutException
- {
- return null;
- }
-
- @Override
public String toPath( ArtifactReference reference )
{
String baseVersion;
diff --git a/archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven/content/AbstractDefaultRepositoryContent.java b/archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven/content/AbstractDefaultRepositoryContent.java
index c43d401d8..2f2b2f749 100644
--- a/archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven/content/AbstractDefaultRepositoryContent.java
+++ b/archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven/content/AbstractDefaultRepositoryContent.java
@@ -78,13 +78,6 @@ public abstract class AbstractDefaultRepositoryContent implements RepositoryCont
}
@Override
- public ArtifactReference toArtifactReference( String path )
- throws LayoutException
- {
- return defaultPathParser.toArtifactReference( path );
- }
-
- @Override
public ItemSelector toItemSelector( String path ) throws LayoutException
{
return defaultPathParser.toItemSelector( path );
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 eedd3663f..734174732 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
@@ -1597,36 +1597,6 @@ public class ManagedDefaultRepositoryContent
return repository.getRoot().getStorage( );
}
- /**
- * Convert a path to an artifact reference.
- *
- * @param path the path to convert. (relative or full location path)
- * @throws LayoutException if the path cannot be converted to an artifact reference.
- */
- @Override
- public ArtifactReference toArtifactReference( String path )
- throws LayoutException
- {
- String repoPath = convertUriToPath( repository.getLocation( ) );
- if ( ( path != null ) && path.startsWith( repoPath ) && repoPath.length( ) > 0 )
- {
- return super.toArtifactReference( path.substring( repoPath.length( ) + 1 ) );
- }
- else
- {
- repoPath = path;
- if ( repoPath != null )
- {
- while ( repoPath.startsWith( "/" ) )
- {
- repoPath = repoPath.substring( 1 );
- }
- }
- return super.toArtifactReference( repoPath );
- }
- }
-
-
public void setFiletypes( FileTypes filetypes )
{
this.filetypes = filetypes;
diff --git a/archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven/content/RemoteDefaultRepositoryContent.java b/archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven/content/RemoteDefaultRepositoryContent.java
index 0e7ce7309..abdefbf50 100644
--- a/archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven/content/RemoteDefaultRepositoryContent.java
+++ b/archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven/content/RemoteDefaultRepositoryContent.java
@@ -73,25 +73,6 @@ public class RemoteDefaultRepositoryContent
this.repository = repository;
}
- /**
- * Convert a path to an artifact reference.
- *
- * @param path the path to convert. (relative or full url path)
- * @throws LayoutException if the path cannot be converted to an artifact reference.
- */
- @Override
- public ArtifactReference toArtifactReference( String path )
- throws LayoutException
- {
-
- if ( ( path != null ) && repository.getLocation()!=null && path.startsWith( repository.getLocation().toString() ) )
- {
- return super.toArtifactReference( path.substring( repository.getLocation().toString().length( ) ) );
- }
-
- return super.toArtifactReference( path );
- }
-
@Override
public RepositoryURL toURL( ArtifactReference reference )
{