slawekjaranowski commented on code in PR #190: URL: https://github.com/apache/maven-archetype/pull/190#discussion_r1720043598
########## maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/IntegrationTestMojo.java: ########## @@ -671,22 +672,14 @@ private void invokePostArchetypeGenerationGoals(String goals, File basedir, File getLog().info("No post-archetype-generation goals to invoke."); } // verify result - ScriptRunner scriptRunner = new ScriptRunner(getLog()); - scriptRunner.setScriptEncoding(encoding); + try (ScriptRunner scriptRunner = new ScriptRunner()) { + scriptRunner.setScriptEncoding(encoding); - Map<String, Object> context = new LinkedHashMap<>(); - context.put("projectDir", basedir); + Map<String, Object> context = new LinkedHashMap<>(); + context.put("projectDir", basedir); - try { - scriptRunner.run( - "post-build script", - goalFile.getParentFile(), - postBuildHookScript, - context, - logger, - "failure post script", - true); - } catch (RunFailureException e) { + scriptRunner.run("post-build script", goalFile.getParentFile(), postBuildHookScript, context, logger); Review Comment: looks ok -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org