Examples of pathToGav()


Examples of org.apache.maven.index.artifact.M2GavCalculator.pathToGav()

        ArtifactInfo artifactInfo = new ArtifactInfo( "test", "aopalliance", "aopalliance", "1.0-SNAPSHOT", null );

        M2GavCalculator gavCalc = new M2GavCalculator();

        Gav jarGav = gavCalc.pathToGav( "aopalliance/aopalliance/1.0/aopalliance-1.0.jar" );
        Gav pomGav = gavCalc.pathToGav( "aopalliance/aopalliance/1.0/aopalliance-1.0.pom" );

        ArtifactContext artifactContext = new ArtifactContext( pom, artifact, null, artifactInfo, jarGav );

        indexer.addArtifactToIndex( artifactContext, context );
View Full Code Here

Examples of org.apache.maven.index.artifact.M2GavCalculator.pathToGav()

        ArtifactInfo artifactInfo = new ArtifactInfo( "test", "aopalliance", "aopalliance", "1.0-SNAPSHOT", null );

        M2GavCalculator gavCalc = new M2GavCalculator();

        Gav jarGav = gavCalc.pathToGav( "aopalliance/aopalliance/1.0/aopalliance-1.0.jar" );
        Gav pomGav = gavCalc.pathToGav( "aopalliance/aopalliance/1.0/aopalliance-1.0.pom" );

        ArtifactContext artifactContext = new ArtifactContext( pom, artifact, null, artifactInfo, jarGav );

        indexer.addArtifactToIndex( artifactContext, context );
View Full Code Here

Examples of org.apache.maven.index.artifact.M2GavCalculator.pathToGav()

        final File pomFile =
            getTestFile( "src/test/repo/ch/marcus-schulte/maven/hivedoc-plugin/1.0.0/hivedoc-plugin-1.0.0.pom" );

        final Gav gav =
            gavCalculator.pathToGav( "/ch/marcus-schulte/maven/hivedoc-plugin/1.0.0/hivedoc-plugin-1.0.0.pom" );

        File artifactFile = al.locate( pomFile, gavCalculator, gav );

        assertTrue( "Artifact file was not located!", artifactFile != null );
        assertTrue( "Artifact file was not located!", artifactFile.exists() );
View Full Code Here

Examples of org.sonatype.nexus.proxy.maven.gav.M2GavCalculator.pathToGav()

    M2GavCalculator calc = new M2GavCalculator();

    List<Gav> gavs = new ArrayList<Gav>();
    Collections.sort((ArrayList<String>) items);
    for (String item : items) {
      final Gav gav = calc.pathToGav(path + item);
      if (gav != null) {
        gavs.add(gav);
      }
    }
View Full Code Here

Examples of org.sonatype.nexus.proxy.maven.gav.M2GavCalculator.pathToGav()

    String path = "org/sonatype/nexus/nexus-api/1.2.0-SNAPSHOT/";
    M2GavCalculator calc = new M2GavCalculator();

    List<Gav> gavs = new ArrayList<Gav>();
    for (String item : items) {
      gavs.add(calc.pathToGav(path + item));
    }

    return gavs;
  }
View Full Code Here

Examples of org.sonatype.nexus.proxy.maven.gav.M2GavCalculator.pathToGav()

    when(mavenRepository.getMetadataManager()).thenReturn(metadataManager);
    when(mavenRepository.retrieveItem(any(Boolean.class), any(ResourceStoreRequest.class)))
        .thenThrow(ItemNotFoundException.class);
    final ArtifactStoreHelper artifactStoreHelper = new ArtifactStoreHelper(mavenRepository);

    final Gav gav = gavCalculator.pathToGav("/org/test/artifact/1.0/artifact-1.0-classifier.jar");
    assertThat(gav.getClassifier(), equalTo("classifier"));

    final ArtifactStoreRequest request = new ArtifactStoreRequest(mavenRepository, gav, false);
    artifactStoreHelper.storeArtifactWithGeneratedPom(
        request, "pom", new ByteArrayInputStream("Content".getBytes(Charsets.UTF_8)), null);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.