Package org.sonatype.nexus.proxy

Examples of org.sonatype.nexus.proxy.LocalStorageException


    try {
      repository.getMetadataManager().deployArtifact(gavRequest);
    }
    catch (IOException e) {
      throw new LocalStorageException("Could not maintain metadata!", e);
    }
  }
View Full Code Here


      try {
        repository.getMetadataManager().deployArtifact(pomRequest);
      }
      catch (IOException ex) {
        throw new LocalStorageException("Could not maintain metadata!", ex);
      }

    }

    // reset path if anything changed it
View Full Code Here

      try {
        return doRetrieveMetadata(request);
      }
      catch (UnsupportedStorageOperationException e) {
        throw new LocalStorageException(e);
      }
    }

    return super.doRetrieveItem(request);
  }
View Full Code Here

      return item;

    }
    catch (IOException e) {
      throw new LocalStorageException("Got IOException during M2 metadata merging.", e);
    }
    catch (MetadataException e) {
      throw new LocalStorageException("Got MetadataException during M2 metadata merging.", e);
    }
  }
View Full Code Here

      try (InputStream is = item.getInputStream()) {
        FileUtils.copyInputStreamToFile(is, file);
        try (ZipFile z = new ZipFile(file)) {
          final ZipEntry ze = z.getEntry(jarPath);
          if (ze == null) {
            throw new LocalStorageException("Corrupted P2 metadata jar " + jarPath);
          }
          try (InputStream zis = z.getInputStream(ze)) {
            return Xpp3DomBuilder.build(new XmlStreamReader(zis));
          }
        }
View Full Code Here

    Xpp3Dom dom;
    try {
      dom = Xpp3DomBuilder.build(new XmlStreamReader(artifactMappingsItem.getInputStream()));
    }
    catch (final IOException e) {
      throw new LocalStorageException("Could not load artifact mappings", e);
    }
    catch (final XmlPullParserException e) {
      throw new LocalStorageException("Could not load artifact mappings", e);
    }
    final Xpp3Dom[] artifactRepositories = dom.getChildren("repository");
    for (final Xpp3Dom artifactRepositoryDom : artifactRepositories) {
      final String repositoryUri = artifactRepositoryDom.getAttribute("uri");
View Full Code Here

        deleteItemSilently(repository, new ResourceStoreRequest(fileItem.getPath()));
      }
      return cacheMetadataItems(fileItems, context, repository);
    }
    catch (final IOException e) {
      throw new LocalStorageException(e.getMessage(), e);
    }
  }
View Full Code Here

        deleteItemSilently(repository, new ResourceStoreRequest(fileItem.getPath()));
      }
      return cacheMetadataItems(fileItems, context, repository);
    }
    catch (final IOException e) {
      throw new LocalStorageException(e.getMessage(), e);
    }
  }
View Full Code Here

              new ResourceStoreRequest(
                  RepositoryItemUid.PATH_ROOT));
      return baseDir;
    }

    throw new LocalStorageException(String.format("Repository [%s] does not have an local storage",
        repository.getId()));
  }
View Full Code Here

        result = new StringContentLocator(body.replace("@rootUrl@", ""));
      }
      return result;
    }
    catch (IOException e) {
      throw new LocalStorageException(e);
    }
  }
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.proxy.LocalStorageException

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.