Package org.apache.maven.artifact.resolver.filter

Examples of org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter.include()


                // 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 );
                    allModules.add( module );
View Full Code Here


                // exclude optional and snapshot dependencies
                if (artifact.isOptional()) {
                    continue;
                }
                // exclude all artifacts that are not in the runtime scope
                if (!filter.include(artifact)) {
                    continue;
                }
                // keep only snapshot artifacts
                if (!artifact.isSnapshot()) {
                    continue;
View Full Code Here

                // remove optional artifacts
                if(eachArtifact.isOptional()) {
                    continue;
                }
                // remove artifacts that are not in runtime scope
                if(!filter.include(eachArtifact)) {
                    continue;
                }
                // skip explicit excludes
                if(excludeLibProps.contains(eachArtifact.getGroupId() + ":" + eachArtifact.getArtifactId())) {
                    continue;
View Full Code Here

    getLog().info("Adding JAR dependencies");
    Set<Artifact> artifacts = project.getArtifacts();
    for (Iterator<Artifact> iter = artifacts.iterator(); iter.hasNext(); ) {
      Artifact artifact = (Artifact) iter.next();
      ScopeArtifactFilter filter = new ScopeArtifactFilter(Artifact.SCOPE_RUNTIME);
      if (!artifact.isOptional() && filter.include(artifact) && "jar".equals(artifact.getType())) {
        zipArchiver.addFile(artifact.getFile(), "lib/" + artifact.getFile().getName());
      }
    }

    File ampFile = new File(targetDirectory, project.getBuild().getFinalName() + ".amp");
View Full Code Here

        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

                targetFileName = artifact.getGroupId() + "-" + targetFileName;
                context.getLog().debug( "Renamed to: " + targetFileName );
            }
            context.getWebappStructure().registerTargetFileName( artifact, targetFileName );

            if ( !artifact.isOptional() && filter.include( artifact ) )
            {
                try
                {
                    String type = artifact.getType();
                    if ( "tld".equals( type ) )
View Full Code Here

    getLog().info("Adding JAR dependencies");
    Set<Artifact> artifacts = project.getArtifacts();
    for (Iterator<Artifact> iter = artifacts.iterator(); iter.hasNext();) {
      Artifact artifact = (Artifact) iter.next();
      ScopeArtifactFilter filter = new ScopeArtifactFilter(Artifact.SCOPE_RUNTIME);
      if (!artifact.isOptional() && filter.include(artifact) && "jar".equals(artifact.getType())) {
        zipArchiver.addFile(artifact.getFile(), "lib/" + artifact.getFile().getName());
      }
    }

    zipArchiver.setDestFile(new File(targetDirectory, project.getBuild().getFinalName() + ".amp"));
View Full Code Here

                    }

                    // TODO: utilise appropriate methods from project builder
                    ScopeArtifactFilter filter = new ScopeArtifactFilter(
                            Artifact.SCOPE_RUNTIME);
                    if (filter.include(artifact)) {
                        String type = artifact.getType();
                        if ("jar".equals(type)) {
                            copyFileIfModified(artifact.getFile(), new File(
                                    libDir, targetFileName));
                        }
View Full Code Here

                    getLog().debug( "Renamed to: " + targetFileName );
                  }
   
                  // TODO: utilise appropriate methods from project builder
                  ScopeArtifactFilter filter = new ScopeArtifactFilter( Artifact.SCOPE_RUNTIME );
                  if (filter.include( artifact ) )
                  {
                    String type = artifact.getType();
                    if ( "jar".equals( type ) )
                    {
                      copyFileIfModified( artifact.getFile(), new File( libDir, targetFileName ) );
View Full Code Here

                targetFileName = artifact.getGroupId() + "-" + targetFileName;
                context.getLog().debug( "Renamed to: " + targetFileName );
            }
            context.getWebappStructure().registerTargetFileName( artifact, targetFileName );

            if ( !artifact.isOptional() && filter.include( artifact ) )
            {
                try
                {
                    String type = artifact.getType();
                    if ( "tld".equals( type ) )
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.