From 2af1ce0850ce7d29966072b750c53c144fb8f295 Mon Sep 17 00:00:00 2001
From: Kai Moritz <kai@juplo.de>
Date: Tue, 7 Feb 2017 13:00:16 +0100
Subject: [PATCH] Added a warning, if a directory, that should be scanned, does
 not exist

To abort with an option would not be wise, because there might be
configurations, that do not need to scan any directories. For example, if
the plugin is configured to create the database schema for classes, that
are contained in a dependency.
---
 .../java/de/juplo/plugins/hibernate/AbstractSchemaMojo.java | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/main/java/de/juplo/plugins/hibernate/AbstractSchemaMojo.java b/src/main/java/de/juplo/plugins/hibernate/AbstractSchemaMojo.java
index 6f3ff976..28260f06 100644
--- a/src/main/java/de/juplo/plugins/hibernate/AbstractSchemaMojo.java
+++ b/src/main/java/de/juplo/plugins/hibernate/AbstractSchemaMojo.java
@@ -1185,6 +1185,12 @@ public abstract class AbstractSchemaMojo extends AbstractMojo
         getLog().info("Adding " + dir.getAbsolutePath() + " to the list of roots to scan...");
         urls.add(dir.toURI().toURL());
       }
+      else
+        getLog().warn(
+            "the directory cannot be scanned for annotated classes, " +
+            "because it does not exist: " +
+            dir.getAbsolutePath()
+            );
     }
     catch (MalformedURLException e)
     {
-- 
2.20.1