X-Git-Url: http://juplo.de/gitweb/?p=hibernate4-maven-plugin;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fde%2Fjuplo%2Fplugins%2Fhibernate%2FCreateMojo.java;fp=src%2Fmain%2Fjava%2Fde%2Fjuplo%2Fplugins%2Fhibernate%2FCreateMojo.java;h=9a959ec3214a7c2b3446d889261111f0fc098bcd;hp=a6c2ba42b4b9140125d685085fd6b8649cd55348;hb=bec99c73fea6edf073dcf885ef07defee1ed8608;hpb=b0a9136540aab84ac78db6a9ada9d5da35074e16 diff --git a/src/main/java/de/juplo/plugins/hibernate/CreateMojo.java b/src/main/java/de/juplo/plugins/hibernate/CreateMojo.java index a6c2ba42..9a959ec3 100644 --- a/src/main/java/de/juplo/plugins/hibernate/CreateMojo.java +++ b/src/main/java/de/juplo/plugins/hibernate/CreateMojo.java @@ -18,6 +18,7 @@ package de.juplo.plugins.hibernate; import static de.juplo.plugins.hibernate.AbstractSchemaMojo.EXECUTE; import java.io.File; +import java.security.NoSuchAlgorithmException; import java.util.EnumSet; import java.util.Map; import org.apache.maven.plugin.MojoExecutionException; @@ -66,15 +67,19 @@ public class CreateMojo 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 @@ -102,7 +107,7 @@ public class CreateMojo extends AbstractSchemaMojo { String charset = (String)settings.get(AvailableSettings.HBM2DDL_CHARSET_NAME); - return new ScriptTargetOutputToFile(output, charset); + return new ScriptTargetOutputToFile(new File(outputFile), charset); } };