URI getLocation();
- /**
- * 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
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;
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();
return location;
}
- @Override
- public StorageAsset getLocalPath() {
- return storage.getRoot( );
- }
-
@Override
public StorageAsset getRoot( )
{
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" );
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" );
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" );
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();
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() );
}
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 )
{
* create the collections themselves.
*/
- StorageAsset rootDirectory = managedRepositoryContent.getRepository( ).getLocalPath();
+ StorageAsset rootDirectory = managedRepositoryContent.getRepository( ).getRoot();
StorageAsset destDir = rootDirectory.resolve( logicalResource.getPath() ).getParent();
if ( !destDir.exists() )