Package org.eclipse.aether.artifact

Examples of org.eclipse.aether.artifact.Artifact


    public void testResolveSeparateInstalledClassifiedNonUniqueVersionedArtifacts()
        throws Exception
    {
        VersionRequest requestB = new VersionRequest();
        requestB.addRepository( newTestRepository() );
        Artifact artifactB =
            new DefaultArtifact( "org.apache.maven.its", "dep-mng5324", "classifierB", "jar", "07.20.3-SNAPSHOT" );
        requestB.setArtifact( artifactB );

        VersionResult resultB = versionResolver.resolveVersion( session, requestB );
        assertEquals( "07.20.3-20120809.112920-97", resultB.getVersion() );

        VersionRequest requestA = new VersionRequest();
        requestA.addRepository( newTestRepository() );

        Artifact artifactA =
            new DefaultArtifact( "org.apache.maven.its", "dep-mng5324", "classifierA", "jar", "07.20.3-SNAPSHOT" );
        requestA.setArtifact( artifactA );

        VersionResult resultA = versionResolver.resolveVersion( session, requestA );
        assertEquals( "07.20.3-20120809.112124-88", resultA.getVersion() );
View Full Code Here


        if ( artifact == null )
        {
            return null;
        }

        Artifact result = toArtifact( artifact );

        List<Exclusion> excl = null;
        if ( exclusions != null )
        {
            excl = new ArrayList<Exclusion>( exclusions.size() );
View Full Code Here

        throws Exception
    {
        VersionRequest requestA = new VersionRequest();
        requestA.addRepository( newTestRepository() );
        String versionA = "07.20.3-20120809.112124-88";
        Artifact artifactA =
            new DefaultArtifact( "org.apache.maven.its", "dep-mng5324", "classifierA", "jar", versionA );
        requestA.setArtifact( artifactA );

        VersionResult resultA = versionResolver.resolveVersion( session, requestA );
        assertEquals( versionA, resultA.getVersion() );

        VersionRequest requestB = new VersionRequest();
        requestB.addRepository( newTestRepository() );
        String versionB = "07.20.3-20120809.112920-97";
        Artifact artifactB =
            new DefaultArtifact( "org.apache.maven.its", "dep-mng5324", "classifierB", "jar", versionB );
        requestB.setArtifact( artifactB );

        VersionResult resultB = versionResolver.resolveVersion( session, requestB );
        assertEquals( versionB, resultB.getVersion() );
View Full Code Here

        if ( system )
        {
            props = Collections.singletonMap( ArtifactProperties.LOCAL_PATH, dependency.getSystemPath() );
        }

        Artifact artifact =
            new DefaultArtifact( dependency.getGroupId(), dependency.getArtifactId(), dependency.getClassifier(), null,
                                 dependency.getVersion(), props, stereotype );

        List<Exclusion> exclusions = new ArrayList<Exclusion>( dependency.getExclusions().size() );
        for ( org.apache.maven.model.Exclusion exclusion : dependency.getExclusions() )
View Full Code Here

  public void execute() throws MojoExecutionException, MojoFailureException {

    super.execute();
    super.printStartParameter( "listPhase" , "failOnError = " +this.getFailOnError() );

    Artifact artifact;
    try {
      this.getLog().info("");
      this.getLog().info( "Starting goal :listPhase with parameters: " super.getStartParameter());
      this.getLog().info("");
View Full Code Here

  public void execute() throws MojoExecutionException, MojoFailureException {

    super.execute();
       super.printStartParameter( "list" );

    Artifact artifact;
    try {

      artifact = new DefaultArtifact( this.getProject().getArtifact().toString() );

View Full Code Here

    super.execute();
    super.printStartParameter( "tree" );

    try {

      Artifact artifact = new DefaultArtifact( this.getProject().getArtifact().toString() );

      DependencyService dependencyService = new DependencyService();
      Visualizer consoleVisualizer = new ConsoleVisualizer();

      ClashCollectResultWrapper clashCollectResultWrapper = new ClashCollectResultWrapper( dependencyService.getDependencyTree( artifact, this.getRepoSession(), this.getRepoSystem(), this.getIncludedScopesList(), this.getExcludedScopesList(), this.isIncludeOptional() ) );
View Full Code Here

        {
            String localPath = ( artifact.getFile() != null ) ? artifact.getFile().getPath() : "";
            props = Collections.singletonMap( ArtifactProperties.LOCAL_PATH, localPath );
        }

        Artifact result =
            new DefaultArtifact( artifact.getGroupId(), artifact.getArtifactId(), artifact.getClassifier(),
                                 artifact.getArtifactHandler().getExtension(), version, props,
                                 newArtifactType( artifact.getType(), artifact.getArtifactHandler() ) );
        result = result.setFile( artifact.getFile() );

        return result;
    }
View Full Code Here

        if ( artifact == null )
        {
            return null;
        }

        Artifact result = toArtifact( artifact );

        List<Exclusion> excl = null;
        if ( exclusions != null )
        {
            excl = new ArrayList<Exclusion>( exclusions.size() );
View Full Code Here

        if ( system )
        {
            props = Collections.singletonMap( ArtifactProperties.LOCAL_PATH, dependency.getSystemPath() );
        }

        Artifact artifact =
            new DefaultArtifact( dependency.getGroupId(), dependency.getArtifactId(), dependency.getClassifier(), null,
                                 dependency.getVersion(), props, stereotype );

        List<Exclusion> exclusions = new ArrayList<Exclusion>( dependency.getExclusions().size() );
        for ( org.apache.maven.model.Exclusion exclusion : dependency.getExclusions() )
View Full Code Here

TOP

Related Classes of org.eclipse.aether.artifact.Artifact

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.