X-Git-Url: http://juplo.de/gitweb/?p=hibernate4-maven-plugin;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fde%2Fjuplo%2Fplugins%2Fhibernate%2FUpdateMojo.java;h=a97982ebc76d19e35e9f7a1adf61dfe715bb138e;hp=6d9e62ef1544a56fc24c91c441255d0a206464ed;hb=bec99c73fea6edf073dcf885ef07defee1ed8608;hpb=b0a9136540aab84ac78db6a9ada9d5da35074e16 diff --git a/src/main/java/de/juplo/plugins/hibernate/UpdateMojo.java b/src/main/java/de/juplo/plugins/hibernate/UpdateMojo.java index 6d9e62ef..a97982eb 100644 --- a/src/main/java/de/juplo/plugins/hibernate/UpdateMojo.java +++ b/src/main/java/de/juplo/plugins/hibernate/UpdateMojo.java @@ -17,6 +17,7 @@ package de.juplo.plugins.hibernate; */ import java.io.File; +import java.security.NoSuchAlgorithmException; import java.util.EnumSet; import java.util.Map; import org.apache.maven.plugin.MojoExecutionException; @@ -65,15 +66,19 @@ public class UpdateMojo extends AbstractSchemaMojo MojoFailureException, MojoExecutionException { - super.execute(outputFile); + try + { + super.execute(new MD5ModificationTracker(buildDirectory, outputFile, getLog())); + } + catch (NoSuchAlgorithmException e) + { + throw new MojoFailureException("Digest-Algorithm MD5 is missing!", e); + } } @Override - ExceptionHandlerCollectingImpl build( - final MetadataImplementor metadata, - final File output - ) + ExceptionHandlerCollectingImpl build(final MetadataImplementor metadata) throws MojoExecutionException, MojoFailureException @@ -101,7 +106,7 @@ public class UpdateMojo extends AbstractSchemaMojo { String charset = (String)settings.get(AvailableSettings.HBM2DDL_CHARSET_NAME); - return new ScriptTargetOutputToFile(output, charset); + return new ScriptTargetOutputToFile(new File(outputFile), charset); } };