Skip to content

Commit

Permalink
Align provisioning
Browse files Browse the repository at this point in the history
  • Loading branch information
cstamas committed Feb 8, 2024
1 parent 99f552b commit 03453ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ else if (getArtifactType(artifact.getExtension()) == null) {
//
// Add an exclude filter if necessary
//
DependencyFilter systemScopeFilter = new ScopeDependencyFilter(JavaScopes.SYSTEM);
DependencyFilter systemScopeFilter = new ScopeDependencyFilter(JavaScopes.SYSTEM, JavaScopes.PROVIDED, JavaScopes.TEST);
DependencyRequest dependencyRequest = new DependencyRequest(request, null);
if (excludes != null) {
List<String> exclusions = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import org.eclipse.aether.resolution.ArtifactResult;
import org.eclipse.aether.resolution.DependencyRequest;
import org.eclipse.aether.resolution.DependencyResolutionException;
import org.eclipse.aether.util.artifact.JavaScopes;
import org.eclipse.aether.util.filter.ScopeDependencyFilter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -124,7 +125,7 @@ protected ArtifactSet getRuntimeClasspathAsArtifactSet() {
* <a href="https://issues.apache.org/jira/browse/MNG-8041">MNG-8041</a>
*/
private List<Artifact> resolveRuntimeScopeTransitively() {
DependencyFilter runtimeFilter = new ScopeDependencyFilter("system", "provided", "test");
DependencyFilter runtimeFilter = new ScopeDependencyFilter(JavaScopes.SYSTEM, JavaScopes.PROVIDED, JavaScopes.TEST);
List<org.eclipse.aether.graph.Dependency> dependencies = project.getDependencies().stream()
.map(d -> RepositoryUtils.toDependency(d, repositorySystemSession.getArtifactTypeRegistry()))
.filter(d -> runtimeFilter.accept(new DefaultDependencyNode(d), Collections.emptyList()))
Expand Down

0 comments on commit 03453ad

Please sign in to comment.