slachiewicz commented on code in PR #190:
URL: https://github.com/apache/maven-archetype/pull/190#discussion_r1564977112


##########
maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/IntegrationTestMojo.java:
##########
@@ -698,7 +691,7 @@ private FileLogger setupLogger(File basedir) throws 
IOException {
             File outputLog = new File(basedir, "build.log");
 
             if (streamLogs) {
-                logger = new FileLogger(outputLog, getLog());
+                logger = new FileLogger(outputLog, 
LoggerFactory.getLogger(getClass()));

Review Comment:
   not sure here



##########
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:
   not sure here



-- 
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

Reply via email to