in src/main/java/org/apache/maven/resolver/internal/ant/tasks/Resolve.java [176:200]
public void setScopes(String scopes) {
if (filter != null) {
throw new BuildException("You must not specify both 'scopes' and 'classpath'");
}
Collection<String> included = new HashSet<>();
Collection<String> excluded = new HashSet<>();
String[] split = scopes.split("[, ]");
for (String scope : split) {
scope = scope.trim();
Collection<String> dst;
if (scope.startsWith("-") || scope.startsWith("!")) {
dst = excluded;
scope = scope.substring(1);
} else {
dst = included;
}
if (!scope.isEmpty()) {
dst.add(scope);
}
}
filter = new ScopeDependencyFilter(included, excluded);
}