Examples of ScopeArtifactFilter


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

        @SuppressWarnings( "unchecked" ) Set<Artifact> classpathArtifacts = getProject().getArtifacts();

        if ( getClasspathDependencyScopeExclude() != null && !getClasspathDependencyScopeExclude().equals( "" ) )
        {
            ArtifactFilter dependencyFilter = new ScopeArtifactFilter( getClasspathDependencyScopeExclude() );
            classpathArtifacts = this.filterArtifacts( classpathArtifacts, dependencyFilter );
        }

        if ( getClasspathDependencyExcludes() != null )
        {
View Full Code Here

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

     *
     * @return the overlays as artifacts objects
     */
    private List getOverlaysAsArtifacts()
    {
        ScopeArtifactFilter filter = new ScopeArtifactFilter( Artifact.SCOPE_RUNTIME );
        final Set artifacts = project.getArtifacts();
        final Iterator it = artifacts.iterator();

        final List result = new ArrayList();
        while ( it.hasNext() )
        {
            Artifact artifact = (Artifact) it.next();
            if ( !artifact.isOptional() && filter.include( artifact ) && ( "war".equals( artifact.getType() ) ) )
            {
                result.add( artifact );
            }
        }
        return result;
View Full Code Here

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

    Set artifacts = project.getArtifacts();
    for (Iterator iter = artifacts.iterator(); iter.hasNext();) {
      Artifact artifact = (Artifact) iter.next();

      // TODO: utilise appropriate methods from project builder
      ScopeArtifactFilter filter = new ScopeArtifactFilter(
          Artifact.SCOPE_RUNTIME);
      if (!artifact.isOptional() && filter.include(artifact)
          && (artifact.getDependencyTrail().size() == 2)) {
        MavenProject project = null;
        try {
          project = projectBuilder.buildFromRepository(artifact, remoteRepos,
              localRepo);
View Full Code Here

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

    Set artifacts = project.getArtifacts();
    for (Iterator iter = artifacts.iterator(); iter.hasNext();) {
      Artifact artifact = (Artifact) iter.next();

      // TODO: utilise appropriate methods from project builder
      ScopeArtifactFilter filter = new ScopeArtifactFilter(
          Artifact.SCOPE_RUNTIME);
      if (!artifact.isOptional() && filter.include(artifact)
          && (artifact.getDependencyTrail().size() == 2)) {
        MavenProject project = null;
        try {
          project = projectBuilder.buildFromRepository(artifact,
              remoteRepos, localRepo);
View Full Code Here

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

    info.setVersion(project.getVersion());
    info.setName(project.getArtifactId());
    info.setType("jar");
    uris.add(info);

    ScopeArtifactFilter filter = new ScopeArtifactFilter(
        Artifact.SCOPE_RUNTIME);

    JbiResolutionListener listener = resolveProject();
    // print(listener.getRootNode(), "");

    Set includes = new HashSet();
    for (Iterator iter = project.getArtifacts().iterator(); iter.hasNext();) {
      Artifact artifact = (Artifact) iter.next();
      if (!artifact.isOptional() && filter.include(artifact)) {
        MavenProject project = null;
        try {
          project = projectBuilder.buildFromRepository(artifact,
              remoteRepos, localRepo);
        } catch (ProjectBuildingException e) {
View Full Code Here

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

    } catch (IOException e) {
      throw new JbiPluginException("Unable to copy directory "
          + serviceUnitLocation, e);
    }

    ScopeArtifactFilter filter = new ScopeArtifactFilter(
        Artifact.SCOPE_RUNTIME);

    JbiResolutionListener listener = resolveProject();
    // print(listener.getRootNode(), "");
   
    Set includes = new HashSet();
    for (Iterator iter = project.getArtifacts().iterator(); iter.hasNext();) {
      Artifact artifact = (Artifact) iter.next();
      if (!artifact.isOptional() && filter.include(artifact)) {
        MavenProject project = null;
        getLog().info("Resolving "+artifact);
        try {
          project = projectBuilder.buildFromRepository(artifact,
              remoteRepos, localRepo);
View Full Code Here

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

    } catch (IOException e) {
      throw new JbiPluginException("Unable to copy file "
          + projectArtifact, e);
    }

    ScopeArtifactFilter filter = new ScopeArtifactFilter(
        Artifact.SCOPE_RUNTIME);   

    JbiResolutionListener listener = resolveProject();
    // print(listener.getRootNode(), "");

    Set includes = new HashSet();
    for (Iterator iter = project.getArtifacts().iterator(); iter.hasNext();) {
      Artifact artifact = (Artifact) iter.next();
      if (!artifact.isOptional() && filter.include(artifact)) {
        MavenProject project = null;
        try {
          project = projectBuilder.buildFromRepository(artifact,
              remoteRepos, localRepo);
        } catch (ProjectBuildingException e) {
View Full Code Here

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

        // filter scope
        if ( scope != null )
        {
            getLog().debug( "+ Resolving dependency tree for scope '" + scope + "'" );

            filter = new ScopeArtifactFilter( scope );
        }
        else
        {
            filter = null;
        }
View Full Code Here

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 );
            }
        }
View Full Code Here

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

                    continue;
                }

                // Artifact is not yet registered and it has neither test, nor a
                // provided scope, not is it optional
                ScopeArtifactFilter filter = new ScopeArtifactFilter( Artifact.SCOPE_RUNTIME );
                if ( !isArtifactRegistered( artifact, allModules ) && !artifact.isOptional()
                    && filter.include( artifact ) )
                {
                    EarModule module =
                        EarModuleFactory.newEarModule( artifact, javaEEVersion, defaultLibBundleDir,
                                                       includeLibInApplicationXml, typeMappingService );
                    module.setEarExecutionContext( earExecutionContext );
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.