Package org.sonatype.nexus.proxy.maven.gav

Examples of org.sonatype.nexus.proxy.maven.gav.Gav


      if (item instanceof StorageFileItem
          && !item.getRepositoryItemUid().getPath().endsWith(".pom")) {
        return;
      }
      try {
        Gav gav = this.gavCalculator.pathToGav(item.getPath());
 
        // make sure we've really got a POM file
        if (gav != null && !gav.isHash() && !gav.isSignature()
            && gav.getExtension().equals("pom")) {
          // and then calculate the artifact usage
          calculateArtifactUsage((StorageFileItem) item);
        }
      }
      catch (Exception e) {
View Full Code Here


  @Override
  public Metadata retrieveGAVMetadata(ArtifactStoreRequest request)
      throws IOException
  {
    try {
      Gav gav = getGavForRequest(request);

      return readOrCreateGAVMetadata(request, gav);
    }
    catch (Exception e) {
      throw createIOExceptionWithCause(e.getMessage(), e);
View Full Code Here

  @Override
  public Metadata retrieveGAMetadata(ArtifactStoreRequest request)
      throws IOException
  {
    try {
      Gav gav = getGavForRequest(request);

      return readOrCreateGAMetadata(request, gav);
    }
    catch (Exception e) {
      throw createIOExceptionWithCause(e.getMessage(), e);
View Full Code Here

  @Override
  public Metadata retrieveGMetadata(ArtifactStoreRequest request)
      throws IOException
  {
    try {
      Gav gav = getGavForRequest(request);

      return readOrCreateGMetadata(request, gav);
    }
    catch (Exception e) {
      throw createIOExceptionWithCause(e.getMessage(), e);
View Full Code Here

  @Override
  public void storeGAVMetadata(ArtifactStoreRequest request, Metadata metadata)
      throws IOException
  {
    try {
      Gav gav = getGavForRequest(request);

      writeGAVMetadata(request, gav, metadata);
    }
    catch (Exception e) {
      throw createIOExceptionWithCause(e.getMessage(), e);
View Full Code Here

  @Override
  public void storeGAMetadata(ArtifactStoreRequest request, Metadata metadata)
      throws IOException
  {
    try {
      Gav gav = getGavForRequest(request);

      writeGAMetadata(request, gav, metadata);
    }
    catch (Exception e) {
      throw createIOExceptionWithCause(e.getMessage(), e);
View Full Code Here

  @Override
  public void storeGMetadata(ArtifactStoreRequest request, Metadata metadata)
      throws IOException
  {
    try {
      Gav gav = getGavForRequest(request);

      writeGMetadata(request, gav, metadata);
    }
    catch (Exception e) {
      throw createIOExceptionWithCause(e.getMessage(), e);
View Full Code Here

    return subject.getRepository().getRepositoryKind().isFacetAvailable(MavenRepository.class)
        && pathIsValidGav(subject.getRepository().adaptToFacet(MavenRepository.class), subject.getPath());
  }

  protected boolean pathIsValidGav(MavenRepository repository, String path) {
    final Gav gav = repository.getGavCalculator().pathToGav(path);

    return gav != null && !gav.isHash() && gav.isSignature();
  }
View Full Code Here

    return subject.getRepository().getRepositoryKind().isFacetAvailable(MavenRepository.class)
        && pathIsValidGav(subject.getRepository().adaptToFacet(MavenRepository.class), subject.getPath());
  }

  protected boolean pathIsValidGav(MavenRepository repository, String path) {
    final Gav gav = repository.getGavCalculator().pathToGav(path);

    return gav != null && !gav.isHash() && !gav.isSignature();
  }
View Full Code Here

  /**
   * Transforms a full artifact path from M1 layout to M2 layout.
   */
  protected List<String> transformM1toM2(final String path) {
    final Gav gav = getM1GavCalculator().pathToGav(path);

    // Unsupported path
    if (gav == null) {
      return null;
    }
    // m2 repo is layouted as:
    // g/i/d
    // aid
    // version
    // files

    StringBuilder sb = new StringBuilder(RepositoryItemUid.PATH_ROOT);
    sb.append(gav.getGroupId().replaceAll("\\.", "/"));
    sb.append(RepositoryItemUid.PATH_SEPARATOR);
    sb.append(gav.getArtifactId());
    sb.append(RepositoryItemUid.PATH_SEPARATOR);
    sb.append(gav.getVersion());
    sb.append(RepositoryItemUid.PATH_SEPARATOR);
    sb.append(gav.getName());
    return Collections.singletonList(sb.toString());
  }
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.proxy.maven.gav.Gav

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.