Added a warning, if a directory, that should be scanned, does not exist
authorKai Moritz <kai@juplo.de>
Tue, 7 Feb 2017 12:00:16 +0000 (13:00 +0100)
committerKai Moritz <kai@juplo.de>
Tue, 7 Feb 2017 12:09:44 +0000 (13:09 +0100)
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.

src/main/java/de/juplo/plugins/hibernate/AbstractSchemaMojo.java

index 6f3ff97..28260f0 100644 (file)
@@ -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)
     {