diff --git a/tools/maven/plugin/src/main/java/org/teavm/maven/BuildJavascriptTestMojo.java b/tools/maven/plugin/src/main/java/org/teavm/maven/BuildJavascriptTestMojo.java index 7b8618570..7d41f0ba8 100644 --- a/tools/maven/plugin/src/main/java/org/teavm/maven/BuildJavascriptTestMojo.java +++ b/tools/maven/plugin/src/main/java/org/teavm/maven/BuildJavascriptTestMojo.java @@ -93,6 +93,9 @@ public class BuildJavascriptTestMojo extends AbstractJavascriptMojo { setupTool(tool); try { + if (!testFiles.isDirectory()) { + throw new MojoFailureException("Directory with tests doesn't exist: " + testFiles); + } getLog().info("Searching for tests in the directory `" + testFiles.getAbsolutePath() + "'"); tool.setAdapter(createAdapter(classLoader)); findTestClasses(classLoader, testFiles, "");