Use isDirectory() instead of exists()
This commit is contained in:
parent
124f5eb30d
commit
9be06f92e7
|
@ -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());
|
log.info("No ANTLR 4 grammars to compile in " + sourceDirectory.getAbsolutePath());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -273,7 +273,7 @@ public class Antlr4Mojo extends AbstractMojo {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Where do we want ANTLR to look for .tokens and import grammars?
|
// 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("-lib");
|
||||||
args.add(libDirectory.getAbsolutePath());
|
args.add(libDirectory.getAbsolutePath());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue