/** * List the dependencies needed for compilation, those dependencies are used * to get the include paths needed for * compilation and to get the libraries paths and names needed for linking. */ @Override protected ScopeFilter getArtifactScopeFilter() { return new ScopeFilter(Artifact.SCOPE_COMPILE, null); }
/** * List the dependencies needed for compilation, those dependencies are used * to get the include paths needed for * compilation and to get the libraries paths and names needed for linking. */ @Override protected ScopeFilter getArtifactScopeFilter() { return new ScopeFilter( Artifact.SCOPE_COMPILE, null ); }
/** * List the dependencies needed for integration tests executions, those * dependencies are used to declare the paths * of shared and jni libraries in java.library.path */ @Override protected ScopeFilter getArtifactScopeFilter() { return new ScopeFilter( Artifact.SCOPE_TEST, null ); }
/** * List the dependencies we want to assemble */ @Override protected ScopeFilter getArtifactScopeFilter() { // Was Artifact.SCOPE_RUNTIME + provided? // Think Provided isn't appropriate in Assembly - otherwise it isn't provided. return new ScopeFilter( Artifact.SCOPE_RUNTIME, null ); }
/** * List the dependencies needed for tests executions and for executables * executions, those dependencies are used * to declare the paths of shared libraries for execution. */ @Override protected ScopeFilter getArtifactScopeFilter() { return new ScopeFilter( Artifact.SCOPE_TEST, null ); }
/** * List the dependencies needed for tests compilations and executions. */ @Override protected ScopeFilter getArtifactScopeFilter() { return new ScopeFilter( Artifact.SCOPE_TEST, null ); }
/** * List the dependencies needed for tests compilations, those dependencies are * used to get the include paths needed * for compilation and to get the libraries paths and names needed for * linking. */ @Override protected ScopeFilter getArtifactScopeFilter() { // Was Artifact.SCOPE_TEST - runtime?? return new ScopeFilter( Artifact.SCOPE_TEST, null ); }
/** * List the dependencies needed for compilation. */ @Override protected ScopeFilter getArtifactScopeFilter() { return new ScopeFilter( Artifact.SCOPE_COMPILE, null ); }
/** * List all the dependencies which are needed by the project (for compilation, * tests, and execution). */ @Override protected ScopeFilter getArtifactScopeFilter() { return new ScopeFilter( Artifact.SCOPE_TEST, null ); }
/** * List all the dependencies of the project. */ @Override protected ScopeFilter getArtifactScopeFilter() { return new ScopeFilter( Artifact.SCOPE_TEST, null ); }
private ArtifactsFilter[] getAdditionalFilters() { List<ArtifactsFilter> filters = new ArrayList<>(); if (this.excludeDevtools) { Exclude exclude = new Exclude(); exclude.setGroupId("org.springframework.boot"); exclude.setArtifactId("spring-boot-devtools"); ExcludeFilter filter = new ExcludeFilter(exclude); filters.add(filter); } if (!this.includeSystemScope) { filters.add(new ScopeFilter(null, Artifact.SCOPE_SYSTEM)); } return filters.toArray(new ArtifactsFilter[0]); }
@SuppressWarnings("unchecked") public void execute() throws MojoExecutionException, MojoFailureException { FilterArtifacts filter = new FilterArtifacts(); filter.addFilter(new ScopeFilter(Artifact.SCOPE_TEST, null)); filter.addFilter(new TypeFilter("jar", null)); Set<Artifact> artifacts; try { artifacts = filter.filter(projectArtifacts); } catch (ArtifactFilterException ex) { throw new MojoExecutionException(ex.getMessage(), ex); } // create output directory with link files outputDirectory.mkdirs(); for (Artifact artifact : artifacts) { Manifest manifest = getManifest(artifact); if (manifest != null) { createLinkFile(artifact, manifest); } } // add output directory as test resource directory Resource resource = new Resource(); resource.setDirectory(outputDirectory.toString()); build.addTestResource(resource); }
filter.addFilter( new org.apache.maven.shared.artifact.filter.collection.ScopeFilter( DependencyUtil.cleanToBeTokenizedString( this.includeScope ), DependencyUtil.cleanToBeTokenizedString( this.excludeScope ) ) );
/** * This method uses a Filtering technique as showed by the maven-dependency-plugin. It allows for * including/excluding artifacts in a number of ways. * * @throws MojoExecutionException */ @SuppressWarnings("unchecked") private void doDependencyResolution() throws ArtifactFilterException { FilterArtifacts filter = new FilterArtifacts(); filter.addFilter(new TransitivityFilter(project.getDependencyArtifacts(), this.excludeTransitive)); filter.addFilter(new ScopeFilter(this.includeScope, this.excludeScope)); filter.addFilter(new TypeFilter(this.includeTypes, this.excludeTypes)); filter.addFilter(new ClassifierFilter(this.includeClassifiers, this.excludeClassifiers)); filter.addFilter(new GroupIdFilter(this.includeGroupIds, this.excludeGroupIds)); filter.addFilter(new ArtifactIdFilter(this.includeArtifactIds, this.excludeArtifactIds)); // start with all artifacts. Set<Artifact> artifacts = project.getArtifacts(); if (includeSelf) { artifacts.add(project.getArtifact()); } // perform filtering dependenciesToList = filter.filter(artifacts); }
filter.addFilter(new ScopeFilter(getScope(), null)); if (includeModules && includeServices) { filter.addFilter(new TypeFilter("aar,mar", null)); try { FilterArtifacts filter = new FilterArtifacts(); filter.addFilter(new ScopeFilter(getScope(), null)); filter.addFilter(new TypeFilter("jar", null)); List<URL> urls = new ArrayList<URL>();
this.excludeTransitive ) ); filter.addFilter( new ScopeFilter( DependencyUtil.cleanToBeTokenizedString( this.includeScope ), DependencyUtil.cleanToBeTokenizedString( this.excludeScope ) ) );