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 8983c88fd..ecbf402ed 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
@@ -75,33 +75,6 @@ def addBundleToBom(bundleAfter, newBundle) {
println 'Added bundle to bom pom'
}
-/**
- * Add the new bundle to the feature.xml
- */
-def addBundleToFeature(bundleAfter, newBundle, bundleName) {
- def feature = '''
-
- openhab-runtime-base
- mvn:org.openhab.addons.bundles/##3/${project.version}
-
-'''.replace('##1', newBundle.replace('org.', '').replace('.', '-')).replace('##2', bundleName).replace('##3', newBundle)
- def bomFile = new File(outputDirectory, '../features/openhab-addons/src/main/feature/feature.xml')
- def newContent = ''
- def insertIndex = 0;
- def lines = bomFile.eachLine { line, index ->
- newContent += line + nl
- if (line.contains(bundleAfter) && line.contains(' 0 && index == insertIndex) {
- newContent += feature
- insertIndex = 0
- }
- }
- bomFile.write(newContent)
- println 'Added bundle to feature.xml'
-}
-
//
/**
* Fix the bundle parent pom. The maven archytype adds the bundle, but add the end of the module list.
@@ -139,7 +112,6 @@ if (codeownersFile.exists()) {
println 'Add new bundle after: ' + bundleAfter
addUserToCodewoners(githubUser, codeownersFile, bundleAfter, newBundle)
addBundleToBom(bundleAfter, newBundle)
- addBundleToFeature(bundleAfter, newBundle, bundleName)
fixBundlePom(bundleAfter, newBundle)
println ''
diff --git a/tools/archetype/binding/src/main/resources/META-INF/maven/archetype-metadata.xml b/tools/archetype/binding/src/main/resources/META-INF/maven/archetype-metadata.xml
index bbee5f973..89163230d 100644
--- a/tools/archetype/binding/src/main/resources/META-INF/maven/archetype-metadata.xml
+++ b/tools/archetype/binding/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -34,6 +34,12 @@
README.md
+
+ src/main/feature
+
+ feature.xml
+
+
src/main/resources/ESH-INF
diff --git a/tools/archetype/binding/src/main/resources/archetype-resources/src/main/feature/feature.xml b/tools/archetype/binding/src/main/resources/archetype-resources/src/main/feature/feature.xml
new file mode 100644
index 000000000..cba4b5e19
--- /dev/null
+++ b/tools/archetype/binding/src/main/resources/archetype-resources/src/main/feature/feature.xml
@@ -0,0 +1,9 @@
+
+
+ mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${project.version}/xml/features
+
+
+ openhab-runtime-base
+ mvn:org.openhab.addons.bundles/${rootArtifactId}/${project.version}
+
+