mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-10 21:31:53 +01:00
[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 <hilbrand@h72.nl>
This commit is contained in:
parent
657d63f4f9
commit
5b73b98ded
@ -82,7 +82,7 @@ def addBundleToBom(bundleAfter, newBundle) {
|
||||
*/
|
||||
def fixBundlePom(bundleAfter, newBundle) {
|
||||
def bomFile = new File(outputDirectory, 'pom.xml')
|
||||
def module = ' <module>' + newBundle + '</module>'
|
||||
def module = '<module>' + newBundle + '</module>'
|
||||
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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user