From 5b73b98ded697a35bbd31f3a27354093526dae0f Mon Sep 17 00:00:00 2001 From: Hilbrand Bouwkamp Date: Mon, 22 Jul 2019 13:18:42 +0200 Subject: [PATCH] [archetype] Fix for double modules in bundle pom (#936) Due to changes in the archetype maven it generated multi module name with tabs prefixed. This caused the module name to be inserted twice because the added module by maven plugin was not removed when the module is moved by the groovy script. Signed-off-by: Hilbrand Bouwkamp --- .../main/resources/META-INF/archetype-post-generate.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/archetype/binding/src/main/resources/META-INF/archetype-post-generate.groovy b/tools/archetype/binding/src/main/resources/META-INF/archetype-post-generate.groovy index ecbf402ed..893af96d3 100644 --- a/tools/archetype/binding/src/main/resources/META-INF/archetype-post-generate.groovy +++ b/tools/archetype/binding/src/main/resources/META-INF/archetype-post-generate.groovy @@ -82,7 +82,7 @@ def addBundleToBom(bundleAfter, newBundle) { */ def fixBundlePom(bundleAfter, newBundle) { def bomFile = new File(outputDirectory, 'pom.xml') - def module = ' ' + newBundle + '' + def module = '' + newBundle + '' def newContent = '' def insertIndex = 0; def lines = bomFile.eachLine { line, index -> @@ -94,7 +94,7 @@ def fixBundlePom(bundleAfter, newBundle) { insertIndex = index } if (insertIndex > 0 && index == insertIndex) { - newContent += module + nl + newContent += ' ' + module + nl insertIndex = 0 } }