Package org.sonatype.nexus.proxy.storage.local.fs

Examples of org.sonatype.nexus.proxy.storage.local.fs.DefaultFSLocalRepositoryStorage


        StorageFileItem artifactFile = mavenRepository.getArtifactStoreHelper().retrieveArtifact(gavRequest);

        // this will work with local FS storage only, since Aether wants java.io.File
        if (artifactFile.getRepositoryItemUid().getRepository()
            .getLocalStorage() instanceof DefaultFSLocalRepositoryStorage) {
          DefaultFSLocalRepositoryStorage ls =
              (DefaultFSLocalRepositoryStorage) artifactFile.getRepositoryItemUid().getRepository().getLocalStorage();

          return ls.getFileFromBase(artifactFile.getRepositoryItemUid().getRepository(), gavRequest);
        }
      }
      catch (Exception e) {
        // Something wrong happen for this repository, let's process the next one
      }
View Full Code Here


  @Test
  public void Test_NEXUS_5995() throws IOException, NoSuchRepositoryException {
    P2MetadataGeneratorConfiguration config = mock(P2MetadataGeneratorConfiguration.class);
    when(config.repositoryId()).thenReturn("mockId");
    Repository repo = mock(Repository.class);
    DefaultFSLocalRepositoryStorage local = mock(DefaultFSLocalRepositoryStorage.class);
    when(local.getFileFromBase(any(Repository.class), any(ResourceStoreRequest.class))).thenReturn(tempFile);
    when(repo.getLocalStorage()).thenReturn(local);
    when(repo.getId()).thenReturn("mockId");
    when(repositories.getRepository("mockId")).thenReturn(repo);

    StorageItem item = mock(StorageItem.class);
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.proxy.storage.local.fs.DefaultFSLocalRepositoryStorage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.