Check that md5 path is file and has content
[hibernate4-maven-plugin] / src / main / java / de / juplo / plugins / hibernate4 / Hbm2DdlMojo.java
index f09cbd6..9790181 100644 (file)
@@ -88,7 +88,7 @@ public class Hbm2DdlMojo extends AbstractMojo
   public final static String NAMING_STRATEGY="hibernate.ejb.naming_strategy";
   public final static String ENVERS = "hibernate.export.envers";
 
-  public final static String MD5S = "schema.md5s";
+  public final static String MD5S = "hibernate4-generatedschema.md5s";
 
   private final static Pattern split = Pattern.compile("[^,\\s]+");
 
@@ -178,7 +178,7 @@ public class Hbm2DdlMojo extends AbstractMojo
    * The excecution is skipped automatically, if no modified or newly added
    * annotated classes are found and the dialect was not changed.
    *
-   * @parameter property="maven.test.skip" default-value="false"
+   * @parameter property="hibernate.skip" default-value="${maven.test.skip}"
    * @since 1.0
    */
   private boolean skip;
@@ -344,7 +344,7 @@ public class Hbm2DdlMojo extends AbstractMojo
     boolean modified = false;
     File saved = new File(buildDirectory + File.separator + MD5S);
 
-    if (saved.exists())
+    if (saved.isFile() && saved.length() > 0)
     {
       try
       {