aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2020-06-04 20:15:38 +0200
committerMartin Stockhammer <martin_s@apache.org>2020-06-04 20:15:38 +0200
commit6c519af1f01f19e0fc55e1a4bd3c775f20f591dc (patch)
tree388248fce9c324d1921cf1e2205513ef1ae3ea89
parentde76d28cabf469eefba38a8c533c7d0b7f7e76dc (diff)
downloadarchiva-6c519af1f01f19e0fc55e1a4bd3c775f20f591dc.tar.gz
archiva-6c519af1f01f19e0fc55e1a4bd3c775f20f591dc.zip
Removing redundant method for root dir
-rw-r--r--archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/Repository.java9
-rw-r--r--archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/AbstractRemoteRepository.java10
-rw-r--r--archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/AbstractRepository.java5
-rw-r--r--archiva-modules/archiva-maven/archiva-maven-scheduler/src/test/java/org/apache/archiva/scheduler/indexing/maven/ArchivaIndexingTaskExecutorTest.java8
-rw-r--r--archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java6
5 files changed, 7 insertions, 31 deletions
diff --git a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/Repository.java b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/Repository.java
index f497efcec..e8c26f9f2 100644
--- a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/Repository.java
+++ b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/Repository.java
@@ -90,15 +90,6 @@ public interface Repository extends EventSource, RepositoryStorage {
/**
- * Returns a storage representation to the local data stored for this repository.
- * The repository implementation may not store the real artifacts in this path. The directory structure
- * is completely implementation dependant.
- *
- */
- StorageAsset getLocalPath();
-
-
- /**
* A repository may allow additional locations that can be used, if the primary location is not available.
* @return
*/
diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/AbstractRemoteRepository.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/AbstractRemoteRepository.java
index b53997eb0..51d7a98da 100644
--- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/AbstractRemoteRepository.java
+++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/AbstractRemoteRepository.java
@@ -25,7 +25,6 @@ import org.apache.archiva.repository.RemoteRepositoryContent;
import org.apache.archiva.repository.RepositoryCredentials;
import org.apache.archiva.repository.RepositoryType;
import org.apache.archiva.repository.storage.RepositoryStorage;
-import org.apache.archiva.repository.storage.StorageAsset;
import java.net.URI;
import java.time.Duration;
@@ -146,15 +145,6 @@ public abstract class AbstractRemoteRepository extends AbstractRepository implem
return timeout;
}
- /**
- * Remote repositories resolve always relative to the base directory.
- * @return
- */
- @Override
- public StorageAsset getLocalPath() {
- return getStorage().getRoot();
- }
-
@Override
public String toString() {
StringBuilder str = new StringBuilder();
diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/AbstractRepository.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/AbstractRepository.java
index 6fb6a2f90..843045071 100644
--- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/AbstractRepository.java
+++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/base/AbstractRepository.java
@@ -161,11 +161,6 @@ public abstract class AbstractRepository implements EditableRepository, EventHan
}
@Override
- public StorageAsset getLocalPath() {
- return storage.getRoot( );
- }
-
- @Override
public StorageAsset getRoot( )
{
return storage.getRoot( );
diff --git a/archiva-modules/archiva-maven/archiva-maven-scheduler/src/test/java/org/apache/archiva/scheduler/indexing/maven/ArchivaIndexingTaskExecutorTest.java b/archiva-modules/archiva-maven/archiva-maven-scheduler/src/test/java/org/apache/archiva/scheduler/indexing/maven/ArchivaIndexingTaskExecutorTest.java
index 3f44b5f8a..450ebd3ef 100644
--- a/archiva-modules/archiva-maven/archiva-maven-scheduler/src/test/java/org/apache/archiva/scheduler/indexing/maven/ArchivaIndexingTaskExecutorTest.java
+++ b/archiva-modules/archiva-maven/archiva-maven-scheduler/src/test/java/org/apache/archiva/scheduler/indexing/maven/ArchivaIndexingTaskExecutorTest.java
@@ -132,7 +132,7 @@ public class ArchivaIndexingTaskExecutorTest
public void testAddArtifactToIndex()
throws Exception
{
- Path basePath = repo.getLocalPath().getFilePath();
+ Path basePath = repo.getRoot().getFilePath();
Path artifactFile = basePath.resolve(
"org/apache/archiva/archiva-index-methods-jar-test/1.0/archiva-index-methods-jar-test-1.0.jar" );
@@ -174,7 +174,7 @@ public class ArchivaIndexingTaskExecutorTest
public void testUpdateArtifactInIndex()
throws Exception
{
- Path basePath = repo.getLocalPath().getFilePath();
+ Path basePath = repo.getRoot().getFilePath();
Path artifactFile = basePath.resolve(
"org/apache/archiva/archiva-index-methods-jar-test/1.0/archiva-index-methods-jar-test-1.0.jar" );
@@ -211,7 +211,7 @@ public class ArchivaIndexingTaskExecutorTest
public void testRemoveArtifactFromIndex()
throws Exception
{
- Path basePath = repo.getLocalPath().getFilePath();
+ Path basePath = repo.getRoot().getFilePath();
Path artifactFile = basePath.resolve(
"org/apache/archiva/archiva-index-methods-jar-test/1.0/archiva-index-methods-jar-test-1.0.jar" );
@@ -274,7 +274,7 @@ public class ArchivaIndexingTaskExecutorTest
throws Exception
{
- Path basePath = repo.getLocalPath().getFilePath();
+ Path basePath = repo.getRoot().getFilePath();
IndexCreationFeature icf = repo.getFeature( IndexCreationFeature.class ).get();
StorageAsset packedIndexDirectory = icf.getLocalPackedIndexPath();
StorageAsset indexerDirectory = icf.getLocalIndexPath();
diff --git a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java
index 5978409f6..093830bc5 100644
--- a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java
+++ b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java
@@ -284,7 +284,7 @@ public class ArchivaDavResourceFactory
repositoryRequestInfo = repo.getRequestInfo();
String logicalResource = getLogicalResource( archivaLocator, null, false );
resourcesInAbsolutePath.add(
- managedRepositoryContent.getRepository().getLocalPath().getFilePath().resolve(logicalResource ).toAbsolutePath().toString() );
+ managedRepositoryContent.getRepository().getRoot().getFilePath().resolve(logicalResource ).toAbsolutePath().toString() );
}
@@ -469,7 +469,7 @@ public class ArchivaDavResourceFactory
logicalResource = logicalResource.substring( 1 );
}
resourcesInAbsolutePath.add(
- managedRepositoryContent.getRepository().getLocalPath().resolve( logicalResource ).getFilePath().toAbsolutePath().toString() );
+ managedRepositoryContent.getRepository().getRoot().resolve( logicalResource ).getFilePath().toAbsolutePath().toString() );
}
catch ( DavException e )
{
@@ -686,7 +686,7 @@ public class ArchivaDavResourceFactory
* create the collections themselves.
*/
- StorageAsset rootDirectory = managedRepositoryContent.getRepository( ).getLocalPath();
+ StorageAsset rootDirectory = managedRepositoryContent.getRepository( ).getRoot();
StorageAsset destDir = rootDirectory.resolve( logicalResource.getPath() ).getParent();
if ( !destDir.exists() )