From 331f60c71f2e10fdf36deb784757065cc57b1f0e Mon Sep 17 00:00:00 2001 From: Florian Hotze Date: Fri, 26 Jun 2026 13:39:56 +0200 Subject: [PATCH] [jsscripting] Fix build failure due to missing webpack dependency by cloning openhab-js & installing its dev dependencies (#21060) Supersedes #21059. Signed-off-by: Florian Hotze --- .../pom.xml | 68 +++++++++++++++---- 1 file changed, 54 insertions(+), 14 deletions(-) diff --git a/bundles/org.openhab.automation.jsscripting/pom.xml b/bundles/org.openhab.automation.jsscripting/pom.xml index 78ab4e9b4e..237c3a3bbb 100644 --- a/bundles/org.openhab.automation.jsscripting/pom.xml +++ b/bundles/org.openhab.automation.jsscripting/pom.xml @@ -15,9 +15,8 @@ openHAB Add-ons :: Bundles :: Automation :: JavaScript Scripting - v22.17.1 - openhab@5.18.2 + v5.18.2 @@ -41,17 +40,52 @@ - + + + org.apache.maven.plugins + maven-scm-plugin + 2.2.1 + + + jgit + + + + + org.apache.maven.scm + maven-scm-provider-jgit + 2.2.1 + + + + + checkout-openhab-js + + checkout + + initialize + + scm:git:https://github.com/openhab/openhab-js.git + ${project.build.directory}/js/openhab-js + ${ohjs.version} + tag + true + + + + + com.github.eirslett frontend-maven-plugin 2.0.1 - target/js + ${project.build.directory}/js ${node.version} - target/js + ${project.build.directory}/js/openhab-js + Install node and npm @@ -59,17 +93,18 @@ generate-sources + npm install npm + generate-sources - - install ${ohjs.version} webpack@^5.105.0 webpack-cli@^6.0.1 --prefix . - + ci + npx webpack (openhab-js globals injection) @@ -77,8 +112,7 @@ - webpack -c ./node_modules/openhab/build/@globals-webpack.config.js --entry-reset --entry - ./node_modules/openhab/build/@openhab-globals.js -o ./dist + webpack -c ./build/@globals-webpack.config.js --entry-reset --entry ./build/@openhab-globals.js -o ../dist @@ -87,9 +121,7 @@ npx - - webpack -c ./node_modules/openhab/build/webpack.config.js --entry-reset --entry - ./node_modules/openhab/ -o ./dist + webpack -c ./build/webpack.config.js --entry-reset --entry ./ -o ../dist @@ -100,6 +132,7 @@ build-helper-maven-plugin + add-js-resource add-resource @@ -107,7 +140,7 @@ - target/js/dist + ${project.build.directory}/js/dist node_modules @@ -123,6 +156,13 @@ ${project.basedir}/suppressions.properties + + + maven-clean-plugin + + true + +