You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "slawekjaranowski (via GitHub)" <gi...@apache.org> on 2024/08/16 16:10:08 UTC
Re: [PR] [ARCHETYPE-658] Upgrade Groovy from 2.x to 4.0.21 [maven-archetype]
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-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org