From 9be06f92e7592466c4f499559dc6527394c4d022 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Sat, 1 Dec 2012 14:08:05 -0600 Subject: [PATCH] Use isDirectory() instead of exists() --- .../src/main/java/org/antlr/mojo/antlr4/Antlr4Mojo.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/Antlr4Mojo.java b/antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/Antlr4Mojo.java index 65e69634d..887ddf0f1 100644 --- a/antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/Antlr4Mojo.java +++ b/antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/Antlr4Mojo.java @@ -211,7 +211,7 @@ public class Antlr4Mojo extends AbstractMojo { // } - if (!sourceDirectory.exists()) { + if (!sourceDirectory.isDirectory()) { log.info("No ANTLR 4 grammars to compile in " + sourceDirectory.getAbsolutePath()); return; } @@ -273,7 +273,7 @@ public class Antlr4Mojo extends AbstractMojo { } // Where do we want ANTLR to look for .tokens and import grammars? - if (getLibDirectory() != null && getLibDirectory().exists()) { + if (getLibDirectory() != null && getLibDirectory().isDirectory()) { args.add("-lib"); args.add(libDirectory.getAbsolutePath()); }