From 618e42e778603443cd56c46517ea902b46caa24f Mon Sep 17 00:00:00 2001 From: nrainer Date: Sun, 2 Sep 2018 12:44:13 +0200 Subject: [PATCH] Fix module skipping --- src/main/java/org/pitest/maven/PmpMojo.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/pitest/maven/PmpMojo.java b/src/main/java/org/pitest/maven/PmpMojo.java index 3bb9568..3c0c0c2 100644 --- a/src/main/java/org/pitest/maven/PmpMojo.java +++ b/src/main/java/org/pitest/maven/PmpMojo.java @@ -105,6 +105,11 @@ public void setSkippedModules(ArrayList newClasses) } // ********** + public boolean isInSkippedModules(MavenProject module) + { + return isInSkippedModules(module.getArtifactId()); + } + public boolean isInSkippedModules(String name) { boolean result = false; @@ -170,7 +175,13 @@ public void updateTargetClasses() moduleList = PmpContext.getInstance().getDependingModules(getProject()); for (int i = 0; i < moduleList.size(); i++) { - classList = PmpContext.getClasses(moduleList.get(i)); + MavenProject module = moduleList.get(i); + + if (isInSkippedModules(module)) { + continue; + } + + classList = PmpContext.getClasses(module); if (! classList.isEmpty()) { PmpContext.addNewStrings(targetClasses, classList);