Examples of ScopeArtifactFilter


Examples of org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter

    {
        getLog().info( "Deploying dependency wars" );
        // Let's add other modules
        List<Context> contexts = new ArrayList<Context>();

        ScopeArtifactFilter filter = new ScopeArtifactFilter( "tomcat" );
        @SuppressWarnings( "unchecked" ) Set<Artifact> artifacts = project.getArtifacts();
        for ( Artifact artifact : artifacts )
        {

            // Artifact is not yet registered and it has neither test, nor a
            // provided scope, not is it optional
            if ( "war".equals( artifact.getType() ) && !artifact.isOptional() && filter.include( artifact ) )
            {
                addContextFromArtifact( container, contexts, artifact, "/" + artifact.getArtifactId(), null, false );
            }
        }
View Full Code Here

Examples of org.apache.maven.shared.artifact.filter.ScopeArtifactFilter

    try
    {
            ArtifactResolutionResult result =
                this.artifactCollector.collect( project.getArtifacts(), project.getArtifact(), this.getLocal(),
                                                this.remoteRepos, this.artifactMetadataSource,
                                                new ScopeArtifactFilter( Artifact.SCOPE_TEST ), new ArrayList() );
      Set repos = new HashSet();
      Set<ResolutionNode> nodes = result.getArtifactResolutionNodes();
            for ( ResolutionNode node : nodes )
      {
                repos.addAll( node.getRemoteRepositories() );
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.