From: Kai Moritz Date: Tue, 7 Feb 2017 12:00:16 +0000 (+0100) Subject: Added a warning, if a directory, that should be scanned, does not exist X-Git-Tag: hibernate-maven-plugin-2.1.0~7 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=2af1ce0850ce7d29966072b750c53c144fb8f295;p=hibernate4-maven-plugin 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. --- 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) {