WIP
authorKai Moritz <kai@juplo.de>
Sat, 26 Nov 2016 17:56:46 +0000 (18:56 +0100)
committerKai Moritz <kai@juplo.de>
Sat, 26 Nov 2016 17:56:46 +0000 (18:56 +0100)
src/main/java/de/juplo/plugins/hibernate/AbstractSchemaMojo.java
src/main/java/de/juplo/plugins/hibernate/CreateMojo.java
src/main/java/de/juplo/plugins/hibernate/DropMojo.java
src/main/java/de/juplo/plugins/hibernate/MD5ModificationTracker.java [new file with mode: 0644]
src/main/java/de/juplo/plugins/hibernate/ModificationTracker.java
src/main/java/de/juplo/plugins/hibernate/UpdateMojo.java
src/main/java/de/juplo/plugins/hibernate/ValidateMojo.java

index 71e1250..5f6b9bf 100644 (file)
@@ -4,13 +4,10 @@ package de.juplo.plugins.hibernate;
 import com.pyx4j.log4j.MavenLogAppender;
 import java.io.File;
 import java.io.FileInputStream;
 import com.pyx4j.log4j.MavenLogAppender;
 import java.io.File;
 import java.io.FileInputStream;
-import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.MalformedURLException;
 import java.net.URL;
-import java.security.NoSuchAlgorithmException;
-import java.time.ZonedDateTime;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -113,7 +110,7 @@ public abstract class AbstractSchemaMojo extends AbstractMojo
    * @required
    * @readonly
    */
    * @required
    * @readonly
    */
-  private String buildDirectory;
+  String buildDirectory;
 
 
   /** Parameters to configure the genaration of the SQL *********************/
 
 
   /** Parameters to configure the genaration of the SQL *********************/
@@ -428,7 +425,7 @@ public abstract class AbstractSchemaMojo extends AbstractMojo
 
 
 
 
 
 
-  public final void execute(String filename)
+  public final void execute(ModificationTracker tracker)
     throws
       MojoFailureException,
       MojoExecutionException
     throws
       MojoFailureException,
       MojoExecutionException
@@ -440,16 +437,6 @@ public abstract class AbstractSchemaMojo extends AbstractMojo
       return;
     }
 
       return;
     }
 
-    ModificationTracker tracker;
-    try
-    {
-      tracker = new ModificationTracker(buildDirectory, filename, getLog());
-    }
-    catch (NoSuchAlgorithmException e)
-    {
-      throw new MojoFailureException("Digest-Algorithm MD5 is missing!", e);
-    }
-
     final SimpleConnectionProvider connectionProvider =
         new SimpleConnectionProvider(getLog());
 
     final SimpleConnectionProvider connectionProvider =
         new SimpleConnectionProvider(getLog());
 
@@ -494,10 +481,18 @@ public abstract class AbstractSchemaMojo extends AbstractMojo
       else
         getLog().debug("Configuration unchanged.");
 
       else
         getLog().debug("Configuration unchanged.");
 
-      /** Check, that the outputfile is writable */
-      final File output = getOutputFile(filename);
       /** Check, if the outputfile is missing or was changed */
       /** Check, if the outputfile is missing or was changed */
-      checkOutputFile(output, tracker);
+      try
+      {
+        tracker.track();
+      }
+      catch (IOException e)
+      {
+        String error =
+            "Error while checking the generated script: " + e.getMessage();
+        getLog().error(error);
+        throw new MojoExecutionException(error);
+      }
 
       /** Configure Hibernate */
       final StandardServiceRegistry serviceRegistry =
 
       /** Configure Hibernate */
       final StandardServiceRegistry serviceRegistry =
@@ -637,12 +632,12 @@ public abstract class AbstractSchemaMojo extends AbstractMojo
       /** Truncate output file */
       try
       {
       /** Truncate output file */
       try
       {
-        new FileOutputStream(output).getChannel().truncate(0).close();
+        tracker.turncat();
       }
       catch (IOException e)
       {
         String error =
       }
       catch (IOException e)
       {
         String error =
-            "Error while truncating " + output.getAbsolutePath() + ": "
+            "Error while truncating output file: " // TODO: Filename unknown here!
             + e.getMessage();
         getLog().warn(error);
         throw new MojoExecutionException(error);
             + e.getMessage();
         getLog().warn(error);
         throw new MojoExecutionException(error);
@@ -687,7 +682,7 @@ public abstract class AbstractSchemaMojo extends AbstractMojo
       {
         thread.setContextClassLoader(classLoader);
         ExceptionHandlerCollectingImpl handler =
       {
         thread.setContextClassLoader(classLoader);
         ExceptionHandlerCollectingImpl handler =
-            build((MetadataImplementor)metadataBuilder.build(), output);
+            build((MetadataImplementor)metadataBuilder.build());
         if (handler.getExceptions().size() > 0)
         {
           StringBuilder builder = new StringBuilder();
         if (handler.getExceptions().size() > 0)
         {
           StringBuilder builder = new StringBuilder();
@@ -706,7 +701,17 @@ public abstract class AbstractSchemaMojo extends AbstractMojo
       {
         thread.setContextClassLoader(contextClassLoader);
         /** Track, the content of the generated script */
       {
         thread.setContextClassLoader(contextClassLoader);
         /** Track, the content of the generated script */
-        checkOutputFile(output, tracker);
+        try
+        {
+          tracker.track();
+        }
+        catch (IOException e)
+        {
+          String error =
+              "Error while checking the generated script: " + e.getMessage();
+          getLog().error(error);
+          throw new MojoExecutionException(error);
+        }
       }
     }
     catch (MojoExecutionException e)
       }
     }
     catch (MojoExecutionException e)
@@ -738,10 +743,7 @@ public abstract class AbstractSchemaMojo extends AbstractMojo
   }
 
 
   }
 
 
-  abstract ExceptionHandlerCollectingImpl build(
-      MetadataImplementor metadata,
-      File file
-      )
+  abstract ExceptionHandlerCollectingImpl build(MetadataImplementor metadata)
     throws
       MojoFailureException,
       MojoExecutionException;
     throws
       MojoFailureException,
       MojoExecutionException;
@@ -1064,26 +1066,6 @@ public abstract class AbstractSchemaMojo extends AbstractMojo
     return output;
   }
 
     return output;
   }
 
-  private void checkOutputFile(File output, ModificationTracker tracker)
-      throws
-        MojoExecutionException
-  {
-    try
-    {
-      if (output.exists())
-        tracker.track(SCRIPT, new FileInputStream(output));
-      else
-        tracker.track(SCRIPT, ZonedDateTime.now().toString());
-    }
-    catch (IOException e)
-    {
-      String error =
-          "Error while checking the generated script: " + e.getMessage();
-      getLog().error(error);
-      throw new MojoExecutionException(error);
-    }
-  }
-
   private void addMappings(MetadataSources sources, ModificationTracker tracker)
       throws MojoFailureException
   {
   private void addMappings(MetadataSources sources, ModificationTracker tracker)
       throws MojoFailureException
   {
index a6c2ba4..9a959ec 100644 (file)
@@ -18,6 +18,7 @@ package de.juplo.plugins.hibernate;
 
 import static de.juplo.plugins.hibernate.AbstractSchemaMojo.EXECUTE;
 import java.io.File;
 
 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;
 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
   {
       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
   }
 
 
   @Override
-  ExceptionHandlerCollectingImpl build(
-      final MetadataImplementor metadata,
-      final File output
-      )
+  ExceptionHandlerCollectingImpl build(final MetadataImplementor metadata)
       throws
         MojoExecutionException,
         MojoFailureException
       throws
         MojoExecutionException,
         MojoFailureException
@@ -102,7 +107,7 @@ public class CreateMojo extends AbstractSchemaMojo
       {
         String charset =
             (String)settings.get(AvailableSettings.HBM2DDL_CHARSET_NAME);
       {
         String charset =
             (String)settings.get(AvailableSettings.HBM2DDL_CHARSET_NAME);
-        return new ScriptTargetOutputToFile(output, charset);
+        return new ScriptTargetOutputToFile(new File(outputFile), charset);
       }
     };
 
       }
     };
 
index 2f59272..88f6698 100644 (file)
@@ -17,6 +17,7 @@ package de.juplo.plugins.hibernate;
  */
 
 import java.io.File;
  */
 
 import java.io.File;
+import java.security.NoSuchAlgorithmException;
 import java.util.EnumSet;
 import java.util.Map;
 import org.apache.maven.plugin.MojoExecutionException;
 import java.util.EnumSet;
 import java.util.Map;
 import org.apache.maven.plugin.MojoExecutionException;
@@ -65,15 +66,19 @@ public class DropMojo extends AbstractSchemaMojo
       MojoFailureException,
       MojoExecutionException
   {
       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
   }
 
 
   @Override
-  ExceptionHandlerCollectingImpl build(
-      final MetadataImplementor metadata,
-      final File output
-      )
+  ExceptionHandlerCollectingImpl build(final MetadataImplementor metadata)
       throws
         MojoExecutionException,
         MojoFailureException
       throws
         MojoExecutionException,
         MojoFailureException
@@ -101,7 +106,7 @@ public class DropMojo extends AbstractSchemaMojo
       {
         String charset =
             (String)settings.get(AvailableSettings.HBM2DDL_CHARSET_NAME);
       {
         String charset =
             (String)settings.get(AvailableSettings.HBM2DDL_CHARSET_NAME);
-        return new ScriptTargetOutputToFile(output, charset);
+        return new ScriptTargetOutputToFile(new File(outputFile), charset);
       }
     };
 
       }
     };
 
diff --git a/src/main/java/de/juplo/plugins/hibernate/MD5ModificationTracker.java b/src/main/java/de/juplo/plugins/hibernate/MD5ModificationTracker.java
new file mode 100644 (file)
index 0000000..0349906
--- /dev/null
@@ -0,0 +1,239 @@
+package de.juplo.plugins.hibernate;
+
+
+import static de.juplo.plugins.hibernate.AbstractSchemaMojo.SCRIPT;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.math.BigInteger;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.time.ZonedDateTime;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import org.apache.maven.plugin.logging.Log;
+
+
+
+/**
+ *
+ * @author Kai Moritz
+ */
+public class MD5ModificationTracker implements ModificationTracker
+{
+  private Map<String,String> properties;
+  private Map<String,String> classes;
+
+  private final Set<String> propertyNames;
+  private final Set<String> classNames;
+
+  private boolean modified = false;
+  private boolean failed = false;
+
+  private final File output;
+  private final File saved;
+  private final MessageDigest digest;
+  private final Log log;
+
+
+  MD5ModificationTracker(String buildDirectory, String filename, Log log)
+      throws
+        NoSuchAlgorithmException
+  {
+    propertyNames = new HashSet<String>();
+    classNames = new HashSet<String>();
+    output = new File(filename);
+    File tmp = new File(filename + ".md5s");
+    if (tmp.isAbsolute())
+    {
+      saved = tmp;
+    }
+    else
+    {
+      // Interpret relative file path relative to build directory
+      saved = new File(buildDirectory, tmp.getPath());
+      log.debug("Adjusted relative path, resulting path is " + saved.getPath());
+    }
+    digest = java.security.MessageDigest.getInstance("MD5");
+    this.log = log;
+  }
+
+
+  private String calculate(InputStream is)
+      throws
+        IOException
+  {
+    byte[] buffer = new byte[1024*4]; // copy data in 4MB-chunks
+    int i;
+    while((i = is.read(buffer)) > -1)
+      digest.update(buffer, 0, i);
+    is.close();
+    byte[] bytes = digest.digest();
+    BigInteger bi = new BigInteger(1, bytes);
+    return String.format("%0" + (bytes.length << 1) + "x", bi);
+  }
+
+  private boolean check(Map<String,String> values, String name, String value)
+  {
+    if (!values.containsKey(name) || !values.get(name).equals(value))
+    {
+      values.put(name, value);
+      return true;
+    }
+    else
+      return false;
+  }
+
+
+  @Override
+  public boolean track(String name, InputStream is) throws IOException
+  {
+    boolean result = check(classes, name, calculate(is));
+    classNames.add(name);
+    modified |= result;
+    return result;
+  }
+
+  @Override
+  public boolean check(String name, String property)
+  {
+    propertyNames.add(name);
+    return check(properties, name, property);
+  }
+
+  @Override
+  public boolean track(String name, String property)
+  {
+    boolean result = check(name, property);
+    modified |= result;
+    return result;
+  }
+
+  @Override
+  public boolean track(Properties properties)
+  {
+    boolean result = false;
+    for (String name : properties.stringPropertyNames())
+      result |= track(name, properties.getProperty(name));
+    return result;
+  }
+
+  @Override
+  public void track() throws IOException
+  {
+    if (output.exists())
+      track(SCRIPT, new FileInputStream(output));
+    else
+      track(SCRIPT, ZonedDateTime.now().toString());
+  }
+
+
+  @Override
+  public void touch()
+  {
+    modified = true;
+  }
+
+  @Override
+  public boolean modified()
+  {
+    for (String property : new HashSet<String>(properties.keySet()))
+      if (!propertyNames.contains(property))
+      {
+        modified = true;
+        properties.remove(property);
+      }
+     for (String clazz : new HashSet<String>(classes.keySet()))
+      if (!classNames.contains(clazz))
+      {
+        modified = true;
+        classes.remove(clazz);
+      }
+    return modified;
+  }
+
+
+  @Override
+  public void failed()
+  {
+    failed = true;
+  }
+
+
+  @Override
+  public void load()
+  {
+    if (saved.isFile() && saved.length() > 0)
+    {
+      try
+      {
+        FileInputStream fis = new FileInputStream(saved);
+        ObjectInputStream ois = new ObjectInputStream(fis);
+        properties = (HashMap<String,String>)ois.readObject();
+        classes = (HashMap<String,String>)ois.readObject();
+        ois.close();
+      }
+      catch (Exception e)
+      {
+        properties = new HashMap<String,String>();
+        classes = new HashMap<String,String>();
+        log.warn("Cannot read md5s from saved: " + e);
+      }
+    }
+    else
+    {
+      properties = new HashMap<String,String>();
+      classes = new HashMap<String,String>();
+      try
+      {
+        saved.createNewFile();
+      }
+      catch (IOException e)
+      {
+        log.debug("Cannot create file \"" + saved.getPath() + "\" for md5s: " + e);
+      }
+    }
+  }
+
+  @Override
+  public void save()
+  {
+    if (failed)
+    {
+      saved.delete();
+      return;
+    }
+
+    if (!modified)
+      return;
+
+    /** Write md5-sums for annotated classes to file */
+    try
+    {
+      FileOutputStream fos = new FileOutputStream(saved);
+      ObjectOutputStream oos = new ObjectOutputStream(fos);
+      oos.writeObject(properties);
+      oos.writeObject(classes);
+      oos.close();
+      fos.close();
+    }
+    catch (Exception e)
+    {
+      log.error("Cannot write md5-sums to file: " + e);
+    }
+  }  
+
+
+  @Override
+  public void turncat() throws IOException
+  {
+    new FileOutputStream(output).getChannel().truncate(0).close();
+  }
+}
index 7b5791f..3bb3463 100644 (file)
@@ -1,22 +1,9 @@
 package de.juplo.plugins.hibernate;
 
 
 package de.juplo.plugins.hibernate;
 
 
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.math.BigInteger;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
 import java.util.Properties;
 import java.util.Properties;
-import java.util.Set;
-import org.apache.maven.plugin.logging.Log;
 
 
 
 
 
 
@@ -24,188 +11,22 @@ import org.apache.maven.plugin.logging.Log;
  *
  * @author Kai Moritz
  */
  *
  * @author Kai Moritz
  */
-public class ModificationTracker
+public interface ModificationTracker
 {
 {
-  private Map<String,String> properties;
-  private Map<String,String> classes;
+  boolean track(String name, InputStream is) throws IOException;
+  boolean track(String name, String property);
+  boolean track(Properties properties);
+  void track() throws IOException;
 
 
-  private final Set<String> propertyNames;
-  private final Set<String> classNames;
+  boolean check(String name, String property);
 
 
-  private boolean modified = false;
-  private boolean failed = false;
+  void touch();
 
 
-  private final File saved;
-  private final MessageDigest digest;
-  private final Log log;
+  boolean modified();
+  void failed();
 
 
+  void load();
+  void save();
 
 
-  ModificationTracker(String buildDirectory, String filename, Log log)
-      throws
-        NoSuchAlgorithmException
-  {
-    propertyNames = new HashSet<String>();
-    classNames = new HashSet<String>();
-    File output = new File(filename + ".md5s");
-    if (output.isAbsolute())
-    {
-      saved = output;
-    }
-    else
-    {
-      // Interpret relative file path relative to build directory
-      saved = new File(buildDirectory, output.getPath());
-      log.debug("Adjusted relative path, resulting path is " + saved.getPath());
-    }
-    digest = java.security.MessageDigest.getInstance("MD5");
-    this.log = log;
-  }
-
-
-  private String calculate(InputStream is)
-      throws
-        IOException
-  {
-    byte[] buffer = new byte[1024*4]; // copy data in 4MB-chunks
-    int i;
-    while((i = is.read(buffer)) > -1)
-      digest.update(buffer, 0, i);
-    is.close();
-    byte[] bytes = digest.digest();
-    BigInteger bi = new BigInteger(1, bytes);
-    return String.format("%0" + (bytes.length << 1) + "x", bi);
-  }
-
-  private boolean check(Map<String,String> values, String name, String value)
-  {
-    if (!values.containsKey(name) || !values.get(name).equals(value))
-    {
-      values.put(name, value);
-      return true;
-    }
-    else
-      return false;
-  }
-
-
-  boolean track(String name, InputStream is) throws IOException
-  {
-    boolean result = check(classes, name, calculate(is));
-    classNames.add(name);
-    modified |= result;
-    return result;
-  }
-
-
-  boolean check(String name, String property)
-  {
-    propertyNames.add(name);
-    return check(properties, name, property);
-  }
-
-  boolean track(String name, String property)
-  {
-    boolean result = check(name, property);
-    modified |= result;
-    return result;
-  }
-
-  boolean track(Properties properties)
-  {
-    boolean result = false;
-    for (String name : properties.stringPropertyNames())
-      result |= track(name, properties.getProperty(name));
-    return result;
-  }
-
-
-  void touch()
-  {
-    modified = true;
-  }
-
-  boolean modified()
-  {
-    for (String property : new HashSet<String>(properties.keySet()))
-      if (!propertyNames.contains(property))
-      {
-        modified = true;
-        properties.remove(property);
-      }
-     for (String clazz : new HashSet<String>(classes.keySet()))
-      if (!classNames.contains(clazz))
-      {
-        modified = true;
-        classes.remove(clazz);
-      }
-    return modified;
-  }
-
-
-  void failed()
-  {
-    failed = true;
-  }
-
-
-  void load()
-  {
-    if (saved.isFile() && saved.length() > 0)
-    {
-      try
-      {
-        FileInputStream fis = new FileInputStream(saved);
-        ObjectInputStream ois = new ObjectInputStream(fis);
-        properties = (HashMap<String,String>)ois.readObject();
-        classes = (HashMap<String,String>)ois.readObject();
-        ois.close();
-      }
-      catch (Exception e)
-      {
-        properties = new HashMap<String,String>();
-        classes = new HashMap<String,String>();
-        log.warn("Cannot read md5s from saved: " + e);
-      }
-    }
-    else
-    {
-      properties = new HashMap<String,String>();
-      classes = new HashMap<String,String>();
-      try
-      {
-        saved.createNewFile();
-      }
-      catch (IOException e)
-      {
-        log.debug("Cannot create file \"" + saved.getPath() + "\" for md5s: " + e);
-      }
-    }
-  }
-
-  void save()
-  {
-    if (failed)
-    {
-      saved.delete();
-      return;
-    }
-
-    if (!modified)
-      return;
-
-    /** Write md5-sums for annotated classes to file */
-    try
-    {
-      FileOutputStream fos = new FileOutputStream(saved);
-      ObjectOutputStream oos = new ObjectOutputStream(fos);
-      oos.writeObject(properties);
-      oos.writeObject(classes);
-      oos.close();
-      fos.close();
-    }
-    catch (Exception e)
-    {
-      log.error("Cannot write md5-sums to file: " + e);
-    }
-  }  
+  void turncat() throws IOException;  
 }
 }
index 6d9e62e..a97982e 100644 (file)
@@ -17,6 +17,7 @@ package de.juplo.plugins.hibernate;
  */
 
 import java.io.File;
  */
 
 import java.io.File;
+import java.security.NoSuchAlgorithmException;
 import java.util.EnumSet;
 import java.util.Map;
 import org.apache.maven.plugin.MojoExecutionException;
 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
   {
       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
   }
 
 
   @Override
-  ExceptionHandlerCollectingImpl build(
-      final MetadataImplementor metadata,
-      final File output
-      )
+  ExceptionHandlerCollectingImpl build(final MetadataImplementor metadata)
       throws
         MojoExecutionException,
         MojoFailureException
       throws
         MojoExecutionException,
         MojoFailureException
@@ -101,7 +106,7 @@ public class UpdateMojo extends AbstractSchemaMojo
       {
         String charset =
             (String)settings.get(AvailableSettings.HBM2DDL_CHARSET_NAME);
       {
         String charset =
             (String)settings.get(AvailableSettings.HBM2DDL_CHARSET_NAME);
-        return new ScriptTargetOutputToFile(output, charset);
+        return new ScriptTargetOutputToFile(new File(outputFile), charset);
       }
     };
 
       }
     };
 
index 8c8f3e7..2e51cf6 100644 (file)
@@ -50,10 +50,7 @@ public class ValidateMojo extends AbstractSchemaMojo
 
 
   @Override
 
 
   @Override
-  ExceptionHandlerCollectingImpl build(
-      MetadataImplementor metadata,
-      File output
-      )
+  ExceptionHandlerCollectingImpl build(final MetadataImplementor metadata)
       throws
         MojoExecutionException,
         MojoFailureException
       throws
         MojoExecutionException,
         MojoFailureException