diff --git a/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/Plugin.java b/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/Plugin.java index b8f8733385..bc29fb3436 100644 --- a/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/Plugin.java +++ b/jOOQ-codegen-maven/src/main/java/org/jooq/util/maven/Plugin.java @@ -46,6 +46,7 @@ import static org.jooq.Constants.XSD_CODEGEN; import java.io.File; import java.io.FileInputStream; +import java.io.IOException; import java.io.StringWriter; import java.net.URL; import java.net.URLClassLoader; @@ -139,6 +140,14 @@ public class Plugin extends AbstractMojo { catch (Exception e) { throw new RuntimeException(e); } + finally { + if (in != null) { + try { + in.close(); + } + catch (IOException ignore) {} + } + } } // [#5286] There are a variety of reasons why the generator isn't set up