diff --git a/js/apps/account-ui/pom.xml b/js/apps/account-ui/pom.xml
index f4e6756b058..82379674225 100644
--- a/js/apps/account-ui/pom.xml
+++ b/js/apps/account-ui/pom.xml
@@ -91,8 +91,10 @@
- com.github.eirslett
- frontend-maven-plugin
+ maven-clean-plugin
+
+ true
+
diff --git a/js/apps/admin-ui/pom.xml b/js/apps/admin-ui/pom.xml
index e32f32b9c68..e2f209d4615 100644
--- a/js/apps/admin-ui/pom.xml
+++ b/js/apps/admin-ui/pom.xml
@@ -91,8 +91,10 @@
- com.github.eirslett
- frontend-maven-plugin
+ maven-clean-plugin
+
+ true
+
diff --git a/js/libs/keycloak-js/pom.xml b/js/libs/keycloak-js/pom.xml
index b45f039eb38..68906bf6a46 100644
--- a/js/libs/keycloak-js/pom.xml
+++ b/js/libs/keycloak-js/pom.xml
@@ -42,11 +42,6 @@
com.github.eirslett
frontend-maven-plugin
-
-
- pnpm-build
-
-
pnpm-pack
package
diff --git a/js/package.json b/js/package.json
index 1c4df57d9a7..14233303354 100644
--- a/js/package.json
+++ b/js/package.json
@@ -4,7 +4,19 @@
"type": "module",
"packageManager": "pnpm@9.14.4+sha512.c8180b3fbe4e4bca02c94234717896b5529740a6cbadf19fa78254270403ea2f27d4e1d46a08a0f56c89b63dc8ebfd3ee53326da720273794e6200fcf0d184ab",
"scripts": {
- "prepare": "cd .. && husky js/.husky"
+ "prepare": "cd .. && husky js/.husky",
+ "build": "wireit"
+ },
+ "wireit": {
+ "build": {
+ "dependencies": [
+ "./apps/account-ui:build",
+ "./apps/admin-ui:build",
+ "./libs/keycloak-admin-client:build",
+ "./libs/ui-shared:build",
+ "./themes-vendor:build"
+ ]
+ }
},
"devDependencies": {
"@eslint/compat": "^1.2.3",
diff --git a/js/pom.xml b/js/pom.xml
index 5d3f48400e8..759478d51c5 100644
--- a/js/pom.xml
+++ b/js/pom.xml
@@ -38,32 +38,6 @@
com.github.eirslett
frontend-maven-plugin
${frontend.plugin.version}
-
-
-
- install-node-and-pnpm
-
-
-
- pnpm-install
-
- pnpm
-
-
- install --prefer-offline --frozen-lockfile --ignore-scripts
- ${maven.multiModuleProjectDirectory}/js
-
-
-
- pnpm-build
-
- pnpm
-
-
- build
-
-
-
${node.version}
${pnpm.version}
@@ -73,5 +47,56 @@
+
+
+
+
+ maven-clean-plugin
+
+
+
+ apps/account-ui/target
+
+
+ apps/admin-ui/target
+
+
+ themes-vendor/target
+
+
+
+
+
+ com.github.eirslett
+ frontend-maven-plugin
+ ${frontend.plugin.version}
+ false
+
+
+
+ install-node-and-pnpm
+
+
+
+ pnpm-install
+
+ pnpm
+
+
+ install --prefer-offline --frozen-lockfile --ignore-scripts
+
+
+
+ pnpm-build
+
+ pnpm
+
+
+ build
+
+
+
+
+
diff --git a/js/themes-vendor/package.json b/js/themes-vendor/package.json
index 08158e36353..ebfe18b80ab 100644
--- a/js/themes-vendor/package.json
+++ b/js/themes-vendor/package.json
@@ -3,9 +3,22 @@
"private": true,
"type": "module",
"scripts": {
- "build": "rollup --config && pnpm build:rewrite-import",
+ "build": "wireit",
"build:rewrite-import": "node scripts/rewrite-imports.js"
},
+ "wireit": {
+ "build": {
+ "command": "rollup --config && pnpm build:rewrite-import",
+ "files": [
+ "rollup.config.js"
+ ],
+ "output": [
+ "target/classes/theme/keycloak/common/resources/vendor/react",
+ "target/classes/theme/keycloak/common/resources/vendor/react-dom",
+ "target/classes/theme/keycloak/common/resources/vendor/web-crypto-shim"
+ ]
+ }
+ },
"dependencies": {
"@noble/hashes": "^1.6.1",
"@patternfly-v5/patternfly": "npm:@patternfly/patternfly@^5.4.2",
diff --git a/js/themes-vendor/pom.xml b/js/themes-vendor/pom.xml
index 94a22c9c24a..98e72f13ae1 100755
--- a/js/themes-vendor/pom.xml
+++ b/js/themes-vendor/pom.xml
@@ -20,8 +20,10 @@
- com.github.eirslett
- frontend-maven-plugin
+ maven-clean-plugin
+
+ true
+
maven-resources-plugin