Skip to content

Commit

Permalink
[highsource#560] make sure xercesImpl and xml-apis doesnt come into f…
Browse files Browse the repository at this point in the history
…inal classpath of maven-plugin
  • Loading branch information
laurentschoelens committed Aug 28, 2024
1 parent 1078f1f commit 6f31e2d
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.apache.maven.artifact.resolver.ArtifactResolutionException;
import org.apache.maven.artifact.resolver.ArtifactResolutionRequest;
import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
import org.apache.maven.artifact.resolver.filter.ExclusionSetFilter;
import org.apache.maven.model.Dependency;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.artifact.InvalidDependencyVersionException;
Expand Down Expand Up @@ -49,6 +50,8 @@ public static Collection<Artifact> resolveTransitively(
request.setResolveRoot(false);
request.setArtifact(project.getArtifact());
request.setArtifactDependencies(artifacts);
// remove xercesImpl and xml-apis dependencies since they conflict with classloader (issue #560)
request.setCollectionFilter(new ExclusionSetFilter(Set.of("xercesImpl", "xml-apis")));
request.setRemoteRepositories(project.getRemoteArtifactRepositories());
request.setLocalRepository(localRepository);

Expand Down

0 comments on commit 6f31e2d

Please sign in to comment.