[
https://issues.apache.org/jira/browse/ARCHETYPE-658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17874306#comment-17874306
]
ASF GitHub Bot commented on ARCHETYPE-658:
------------------------------------------
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
> Upgrade Groovy to 4.0.21
> ------------------------
>
> Key: ARCHETYPE-658
> URL: https://issues.apache.org/jira/browse/ARCHETYPE-658
> Project: Maven Archetype
> Issue Type: Dependency upgrade
> Reporter: Sylwester Lachiewicz
> Assignee: Sylwester Lachiewicz
> Priority: Minor
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)