From 451f5aad9dc5b6ca3ee5eb24d0a70e0fab8fe916 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Wed, 24 Dec 2025 01:44:41 -0800 Subject: [PATCH] GUACAMOLE-2139: Automatically set Guacamole.API_VERSION. --- guacamole-common-js/pom.xml | 52 ++++++++++++++++++- .../modules/Version.js | 2 +- guacamole-common-js/static.xml | 2 +- 3 files changed, 53 insertions(+), 3 deletions(-) rename guacamole-common-js/src/main/{webapp => webapp-templates}/modules/Version.js (96%) diff --git a/guacamole-common-js/pom.xml b/guacamole-common-js/pom.xml index d1e265746..f57834fc5 100644 --- a/guacamole-common-js/pom.xml +++ b/guacamole-common-js/pom.xml @@ -39,6 +39,11 @@ + + ${project.build.directory}/generated-resources/webapp-templates + + + filter-webapp-resources + generate-resources + + copy-resources + + + ${generated.webapp.dir} + + + src/main/webapp-templates + true + + + + + + + + copy-webapp-resources + generate-resources + + copy-resources + + + ${generated.webapp.dir} + + + src/main/webapp + false + + + + + + + + maven-assembly-plugin @@ -111,6 +159,8 @@ UTF-8 CLOSURE + ${generated.webapp.dir} + / / all.js diff --git a/guacamole-common-js/src/main/webapp/modules/Version.js b/guacamole-common-js/src/main/webapp-templates/modules/Version.js similarity index 96% rename from guacamole-common-js/src/main/webapp/modules/Version.js rename to guacamole-common-js/src/main/webapp-templates/modules/Version.js index 3dfb5378b..b0e1ea839 100644 --- a/guacamole-common-js/src/main/webapp/modules/Version.js +++ b/guacamole-common-js/src/main/webapp-templates/modules/Version.js @@ -27,4 +27,4 @@ var Guacamole = Guacamole || {}; * * @type {!string} */ -Guacamole.API_VERSION = "1.6.0"; +Guacamole.API_VERSION = "${project.version}"; diff --git a/guacamole-common-js/static.xml b/guacamole-common-js/static.xml index ec8c17754..d17fe115c 100644 --- a/guacamole-common-js/static.xml +++ b/guacamole-common-js/static.xml @@ -25,7 +25,7 @@ - src/main/webapp/modules/ + ${generated.webapp.dir}/modules/ *.js