diff --git a/astra-maven-plugin/src/main/java/org/alfasoftware/astra/RefactorMojo.java b/astra-maven-plugin/src/main/java/org/alfasoftware/astra/RefactorMojo.java index 0261868..9023e62 100644 --- a/astra-maven-plugin/src/main/java/org/alfasoftware/astra/RefactorMojo.java +++ b/astra-maven-plugin/src/main/java/org/alfasoftware/astra/RefactorMojo.java @@ -59,18 +59,16 @@ public class RefactorMojo extends AbstractMojo { @Override public void execute() throws MojoExecutionException { - List testClasspathElements; - try { + List testClasspathElements; + try { testClasspathElements = project.getTestClasspathElements(); } catch (DependencyResolutionRequiredException e) { throw new MojoExecutionException("Unable to resolve test class path for the project", e); } - // remove anything within this projects target directory as it has been + // remove anything within this projects target directory as this will invalidate it testClasspathElements.removeIf(s -> s.startsWith(targetDirectory)); - // might need to add source from other projects if running multi-module?? - UseCase useCaseInstance = getUseCaseInstance(); AstraCore.run(sourceDirectory.getAbsolutePath(), new UseCase() { @@ -86,9 +84,7 @@ public Predicate getPrefilteringPredicate() { @Override public Set getAdditionalClassPathEntries() { - HashSet additionalClassPath = new HashSet<>(useCaseInstance.getAdditionalClassPathEntries()); - additionalClassPath.addAll(testClasspathElements); - return additionalClassPath; + return Set.of(); } });