diff --git a/.gitignore b/.gitignore
index bcc52fede..097e7c592 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
*~
target/
+.flattened-pom.xml
diff --git a/doc/guacamole-example/pom.xml b/doc/guacamole-example/pom.xml
index e4a4f1c12..a27e53cf7 100644
--- a/doc/guacamole-example/pom.xml
+++ b/doc/guacamole-example/pom.xml
@@ -26,7 +26,7 @@
org.apache.guacamole
guacamole-example
war
- 1.6.0
+ 1.6.1
guacamole-example
http://guacamole.apache.org/
@@ -106,7 +106,7 @@
org.apache.guacamole
guacamole-common
- 1.6.0
+ 1.6.1
compile
@@ -114,7 +114,7 @@
org.apache.guacamole
guacamole-common-js
- 1.6.0
+ 1.6.1
zip
runtime
diff --git a/doc/guacamole-playback-example/pom.xml b/doc/guacamole-playback-example/pom.xml
index 8563e078c..a61ed1664 100644
--- a/doc/guacamole-playback-example/pom.xml
+++ b/doc/guacamole-playback-example/pom.xml
@@ -26,7 +26,7 @@
org.apache.guacamole
guacamole-playback-example
war
- 1.6.0
+ 1.6.1
guacamole-playback-example
http://guacamole.apache.org/
@@ -88,7 +88,7 @@
org.apache.guacamole
guacamole-common-js
- 1.6.0
+ 1.6.1
zip
runtime
diff --git a/extensions/guacamole-auth-ban/pom.xml b/extensions/guacamole-auth-ban/pom.xml
index a9e8dfe3d..31836ef85 100644
--- a/extensions/guacamole-auth-ban/pom.xml
+++ b/extensions/guacamole-auth-ban/pom.xml
@@ -26,15 +26,13 @@
org.apache.guacamole
guacamole-auth-ban
jar
- 1.6.0
guacamole-auth-ban
http://guacamole.apache.org/
org.apache.guacamole
extensions
- 1.6.0
- ../
+ ${revision}
@@ -51,8 +49,6 @@
org.apache.guacamole
guacamole-ext
- 1.6.0
- provided
diff --git a/extensions/guacamole-auth-ban/src/main/resources/guac-manifest.json b/extensions/guacamole-auth-ban/src/main/resource-templates/guac-manifest.json
similarity index 87%
rename from extensions/guacamole-auth-ban/src/main/resources/guac-manifest.json
rename to extensions/guacamole-auth-ban/src/main/resource-templates/guac-manifest.json
index a66ac51ed..bd800e0bd 100644
--- a/extensions/guacamole-auth-ban/src/main/resources/guac-manifest.json
+++ b/extensions/guacamole-auth-ban/src/main/resource-templates/guac-manifest.json
@@ -1,6 +1,6 @@
{
- "guacamoleVersion" : "1.6.0",
+ "guacamoleVersion" : "${project.version}",
"name" : "Brute-force Authentication Detection/Prevention",
"namespace" : "ban",
diff --git a/extensions/guacamole-auth-duo/pom.xml b/extensions/guacamole-auth-duo/pom.xml
index 36cd7de9c..2a79804d5 100644
--- a/extensions/guacamole-auth-duo/pom.xml
+++ b/extensions/guacamole-auth-duo/pom.xml
@@ -26,15 +26,13 @@
org.apache.guacamole
guacamole-auth-duo
jar
- 1.6.0
guacamole-auth-duo
http://guacamole.apache.org/
org.apache.guacamole
extensions
- 1.6.0
- ../
+ ${revision}
@@ -49,8 +47,6 @@
org.apache.guacamole
guacamole-ext
- 1.6.0
- provided
diff --git a/extensions/guacamole-auth-duo/src/main/resources/guac-manifest.json b/extensions/guacamole-auth-duo/src/main/resource-templates/guac-manifest.json
similarity index 92%
rename from extensions/guacamole-auth-duo/src/main/resources/guac-manifest.json
rename to extensions/guacamole-auth-duo/src/main/resource-templates/guac-manifest.json
index 0e0dae758..1b8fc424b 100644
--- a/extensions/guacamole-auth-duo/src/main/resources/guac-manifest.json
+++ b/extensions/guacamole-auth-duo/src/main/resource-templates/guac-manifest.json
@@ -1,6 +1,6 @@
{
- "guacamoleVersion" : "1.6.0",
+ "guacamoleVersion" : "${project.version}",
"name" : "Duo TFA Authentication Backend",
"namespace" : "duo",
diff --git a/extensions/guacamole-auth-header/pom.xml b/extensions/guacamole-auth-header/pom.xml
index 017ea64a5..acf0d8616 100644
--- a/extensions/guacamole-auth-header/pom.xml
+++ b/extensions/guacamole-auth-header/pom.xml
@@ -26,15 +26,13 @@
org.apache.guacamole
guacamole-auth-header
jar
- 1.6.0
guacamole-auth-header
http://guacamole.apache.org/
org.apache.guacamole
extensions
- 1.6.0
- ../
+ ${revision}
@@ -43,8 +41,6 @@
org.apache.guacamole
guacamole-ext
- 1.6.0
- provided
diff --git a/extensions/guacamole-auth-header/src/main/resources/guac-manifest.json b/extensions/guacamole-auth-header/src/main/resource-templates/guac-manifest.json
similarity index 80%
rename from extensions/guacamole-auth-header/src/main/resources/guac-manifest.json
rename to extensions/guacamole-auth-header/src/main/resource-templates/guac-manifest.json
index 49015dec9..3ee1ae948 100644
--- a/extensions/guacamole-auth-header/src/main/resources/guac-manifest.json
+++ b/extensions/guacamole-auth-header/src/main/resource-templates/guac-manifest.json
@@ -1,6 +1,6 @@
{
- "guacamoleVersion" : "1.6.0",
+ "guacamoleVersion" : "${project.version}",
"name" : "HTTP Header Authentication Extension",
"namespace" : "header",
diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/pom.xml b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/pom.xml
index 93dc92823..d5704af46 100644
--- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/pom.xml
+++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/pom.xml
@@ -32,7 +32,7 @@
org.apache.guacamole
guacamole-auth-jdbc
- 1.6.0
+ ${revision}
../../
@@ -50,7 +50,6 @@
org.apache.guacamole
guacamole-ext
- provided
diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-dist/pom.xml b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-dist/pom.xml
index 93a4e752f..ad767fb35 100644
--- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-dist/pom.xml
+++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-dist/pom.xml
@@ -32,7 +32,7 @@
org.apache.guacamole
guacamole-auth-jdbc
- 1.6.0
+ ${revision}
../../
@@ -42,21 +42,21 @@
org.apache.guacamole
guacamole-auth-jdbc-mysql
- 1.6.0
+ ${revision}
org.apache.guacamole
guacamole-auth-jdbc-postgresql
- 1.6.0
+ ${revision}
org.apache.guacamole
guacamole-auth-jdbc-sqlserver
- 1.6.0
+ ${revision}
diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/pom.xml b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/pom.xml
index 0818ac3c2..523235830 100644
--- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/pom.xml
+++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/pom.xml
@@ -32,7 +32,7 @@
org.apache.guacamole
guacamole-auth-jdbc
- 1.6.0
+ ${revision}
../../
@@ -42,14 +42,13 @@
org.apache.guacamole
guacamole-ext
- provided
org.apache.guacamole
guacamole-auth-jdbc-base
- 1.6.0
+ ${revision}
diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/src/main/resources/guac-manifest.json b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/src/main/resource-templates/guac-manifest.json
similarity index 94%
rename from extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/src/main/resources/guac-manifest.json
rename to extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/src/main/resource-templates/guac-manifest.json
index 01187f629..bc537fc75 100644
--- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/src/main/resources/guac-manifest.json
+++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/src/main/resource-templates/guac-manifest.json
@@ -1,6 +1,6 @@
{
- "guacamoleVersion" : "1.6.0",
+ "guacamoleVersion" : "${project.version}",
"name" : "MySQL Authentication",
"namespace" : "mysql",
diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/pom.xml b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/pom.xml
index 5d3129bd4..58922a4c1 100644
--- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/pom.xml
+++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/pom.xml
@@ -32,7 +32,7 @@
org.apache.guacamole
guacamole-auth-jdbc
- 1.6.0
+ ${revision}
../../
@@ -42,14 +42,13 @@
org.apache.guacamole
guacamole-ext
- provided
org.apache.guacamole
guacamole-auth-jdbc-base
- 1.6.0
+ ${revision}
diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/src/main/resources/guac-manifest.json b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/src/main/resource-templates/guac-manifest.json
similarity index 94%
rename from extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/src/main/resources/guac-manifest.json
rename to extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/src/main/resource-templates/guac-manifest.json
index be22f029a..0d2181d59 100644
--- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/src/main/resources/guac-manifest.json
+++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/src/main/resource-templates/guac-manifest.json
@@ -1,6 +1,6 @@
{
- "guacamoleVersion" : "1.6.0",
+ "guacamoleVersion" : "${project.version}",
"name" : "PostgreSQL Authentication",
"namespace" : "postgresql",
diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/pom.xml b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/pom.xml
index 8ceee87df..17f888e6e 100644
--- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/pom.xml
+++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/pom.xml
@@ -32,7 +32,7 @@
org.apache.guacamole
guacamole-auth-jdbc
- 1.6.0
+ ${revision}
../../
@@ -42,14 +42,13 @@
org.apache.guacamole
guacamole-ext
- provided
org.apache.guacamole
guacamole-auth-jdbc-base
- 1.6.0
+ ${revision}
diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resources/guac-manifest.json b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resource-templates/guac-manifest.json
similarity index 94%
rename from extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resources/guac-manifest.json
rename to extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resource-templates/guac-manifest.json
index 00eeb2196..821441540 100644
--- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resources/guac-manifest.json
+++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlserver/src/main/resource-templates/guac-manifest.json
@@ -1,6 +1,6 @@
{
- "guacamoleVersion" : "1.6.0",
+ "guacamoleVersion" : "${project.version}",
"name" : "SQLServer Authentication",
"namespace" : "sqlserver",
diff --git a/extensions/guacamole-auth-jdbc/pom.xml b/extensions/guacamole-auth-jdbc/pom.xml
index e9ac71f58..13644f1b6 100644
--- a/extensions/guacamole-auth-jdbc/pom.xml
+++ b/extensions/guacamole-auth-jdbc/pom.xml
@@ -26,15 +26,13 @@
org.apache.guacamole
guacamole-auth-jdbc
pom
- 1.6.0
guacamole-auth-jdbc
http://guacamole.apache.org/
org.apache.guacamole
extensions
- 1.6.0
- ../
+ ${revision}
@@ -52,18 +50,4 @@
-
-
-
-
-
- org.apache.guacamole
- guacamole-ext
- 1.6.0
- provided
-
-
-
-
-
diff --git a/extensions/guacamole-auth-json/pom.xml b/extensions/guacamole-auth-json/pom.xml
index dbd1a8bda..dc4a8ebe1 100644
--- a/extensions/guacamole-auth-json/pom.xml
+++ b/extensions/guacamole-auth-json/pom.xml
@@ -26,15 +26,13 @@
org.apache.guacamole
guacamole-auth-json
jar
- 1.6.0
guacamole-auth-json
http://guacamole.apache.org/
org.apache.guacamole
extensions
- 1.6.0
- ../
+ ${revision}
@@ -43,8 +41,6 @@
org.apache.guacamole
guacamole-ext
- 1.6.0
- provided
diff --git a/extensions/guacamole-auth-json/src/main/resources/guac-manifest.json b/extensions/guacamole-auth-json/src/main/resource-templates/guac-manifest.json
similarity index 83%
rename from extensions/guacamole-auth-json/src/main/resources/guac-manifest.json
rename to extensions/guacamole-auth-json/src/main/resource-templates/guac-manifest.json
index 7d8efd5c7..41b6b9256 100644
--- a/extensions/guacamole-auth-json/src/main/resources/guac-manifest.json
+++ b/extensions/guacamole-auth-json/src/main/resource-templates/guac-manifest.json
@@ -1,6 +1,6 @@
{
- "guacamoleVersion" : "1.6.0",
+ "guacamoleVersion" : "${project.version}",
"name" : "Encrypted JSON Authentication",
"namespace" : "json",
diff --git a/extensions/guacamole-auth-ldap/pom.xml b/extensions/guacamole-auth-ldap/pom.xml
index b7ef05e79..fa5083f01 100644
--- a/extensions/guacamole-auth-ldap/pom.xml
+++ b/extensions/guacamole-auth-ldap/pom.xml
@@ -26,15 +26,13 @@
org.apache.guacamole
guacamole-auth-ldap
jar
- 1.6.0
guacamole-auth-ldap
http://guacamole.apache.org/
org.apache.guacamole
extensions
- 1.6.0
- ../
+ ${revision}
@@ -43,8 +41,6 @@
org.apache.guacamole
guacamole-ext
- 1.6.0
- provided
diff --git a/extensions/guacamole-auth-ldap/src/main/resources/guac-manifest.json b/extensions/guacamole-auth-ldap/src/main/resource-templates/guac-manifest.json
similarity index 85%
rename from extensions/guacamole-auth-ldap/src/main/resources/guac-manifest.json
rename to extensions/guacamole-auth-ldap/src/main/resource-templates/guac-manifest.json
index 737d9533f..19e81b4ef 100644
--- a/extensions/guacamole-auth-ldap/src/main/resources/guac-manifest.json
+++ b/extensions/guacamole-auth-ldap/src/main/resource-templates/guac-manifest.json
@@ -1,6 +1,6 @@
{
- "guacamoleVersion" : "1.6.0",
+ "guacamoleVersion" : "${project.version}",
"name" : "LDAP Authentication",
"namespace" : "ldap",
diff --git a/extensions/guacamole-auth-quickconnect/pom.xml b/extensions/guacamole-auth-quickconnect/pom.xml
index 28e62310a..730d7fbc5 100644
--- a/extensions/guacamole-auth-quickconnect/pom.xml
+++ b/extensions/guacamole-auth-quickconnect/pom.xml
@@ -26,15 +26,13 @@
org.apache.guacamole
guacamole-auth-quickconnect
jar
- 1.6.0
guacamole-auth-quickconnect
http://guacamole.apache.org/
org.apache.guacamole
extensions
- 1.6.0
- ../
+ ${revision}
@@ -98,8 +96,6 @@
org.apache.guacamole
guacamole-ext
- 1.6.0
- provided
diff --git a/extensions/guacamole-auth-quickconnect/src/main/resources/guac-manifest.json b/extensions/guacamole-auth-quickconnect/src/main/resource-templates/guac-manifest.json
similarity index 94%
rename from extensions/guacamole-auth-quickconnect/src/main/resources/guac-manifest.json
rename to extensions/guacamole-auth-quickconnect/src/main/resource-templates/guac-manifest.json
index ab1de15d8..3de3d5aa8 100644
--- a/extensions/guacamole-auth-quickconnect/src/main/resources/guac-manifest.json
+++ b/extensions/guacamole-auth-quickconnect/src/main/resource-templates/guac-manifest.json
@@ -1,5 +1,5 @@
{
- "guacamoleVersion" : "1.6.0",
+ "guacamoleVersion" : "${project.version}",
"name" : "Adhoc Guacamole Connections",
"namespace" : "quickconnect",
diff --git a/extensions/guacamole-auth-radius/pom.xml b/extensions/guacamole-auth-radius/pom.xml
index b518981f1..78a367b36 100644
--- a/extensions/guacamole-auth-radius/pom.xml
+++ b/extensions/guacamole-auth-radius/pom.xml
@@ -26,15 +26,13 @@
org.apache.guacamole
guacamole-auth-radius
jar
- 1.6.0
guacamole-auth-radius
http://guacamole.apache.org/
org.apache.guacamole
extensions
- 1.6.0
- ../
+ ${revision}
@@ -115,8 +113,6 @@
org.apache.guacamole
guacamole-ext
- 1.6.0
- provided
diff --git a/extensions/guacamole-auth-radius/src/main/resources/guac-manifest.json b/extensions/guacamole-auth-radius/src/main/resource-templates/guac-manifest.json
similarity index 92%
rename from extensions/guacamole-auth-radius/src/main/resources/guac-manifest.json
rename to extensions/guacamole-auth-radius/src/main/resource-templates/guac-manifest.json
index 7fa630d77..116df5d5c 100644
--- a/extensions/guacamole-auth-radius/src/main/resources/guac-manifest.json
+++ b/extensions/guacamole-auth-radius/src/main/resource-templates/guac-manifest.json
@@ -1,6 +1,6 @@
{
- "guacamoleVersion" : "1.6.0",
+ "guacamoleVersion" : "${project.version}",
"name" : "RADIUS Authentication Backend",
"namespace" : "radius",
diff --git a/extensions/guacamole-auth-restrict/pom.xml b/extensions/guacamole-auth-restrict/pom.xml
index 0fcf35e4e..9379616a4 100644
--- a/extensions/guacamole-auth-restrict/pom.xml
+++ b/extensions/guacamole-auth-restrict/pom.xml
@@ -26,15 +26,13 @@
org.apache.guacamole
guacamole-auth-restrict
jar
- 1.6.0
guacamole-auth-restrict
http://guacamole.apache.org/
org.apache.guacamole
extensions
- 1.6.0
- ../
+ ${revision}
@@ -127,8 +125,6 @@
org.apache.guacamole
guacamole-ext
- 1.6.0
- provided
diff --git a/extensions/guacamole-auth-restrict/src/main/resources/guac-manifest.json b/extensions/guacamole-auth-restrict/src/main/resource-templates/guac-manifest.json
similarity index 92%
rename from extensions/guacamole-auth-restrict/src/main/resources/guac-manifest.json
rename to extensions/guacamole-auth-restrict/src/main/resource-templates/guac-manifest.json
index 72b90dff6..58c3aadac 100644
--- a/extensions/guacamole-auth-restrict/src/main/resources/guac-manifest.json
+++ b/extensions/guacamole-auth-restrict/src/main/resource-templates/guac-manifest.json
@@ -1,6 +1,6 @@
{
- "guacamoleVersion" : "1.6.0",
+ "guacamoleVersion" : "${project.version}",
"name" : "Restriction Authentication Backend",
"namespace" : "restrict",
diff --git a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-base/pom.xml b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-base/pom.xml
index 1cfb1815d..0ce3fef2f 100644
--- a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-base/pom.xml
+++ b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-base/pom.xml
@@ -32,7 +32,7 @@
org.apache.guacamole
guacamole-auth-sso
- 1.6.0
+ ${revision}
../../
diff --git a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-cas/pom.xml b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-cas/pom.xml
index 93f677e56..75c381ebb 100644
--- a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-cas/pom.xml
+++ b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-cas/pom.xml
@@ -26,14 +26,13 @@
org.apache.guacamole
guacamole-auth-sso-cas
jar
- 1.6.0
guacamole-auth-sso-cas
http://guacamole.apache.org/
org.apache.guacamole
guacamole-auth-sso
- 1.6.0
+ ${revision}
../../
diff --git a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-cas/src/main/resources/guac-manifest.json b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-cas/src/main/resource-templates/guac-manifest.json
similarity index 93%
rename from extensions/guacamole-auth-sso/modules/guacamole-auth-sso-cas/src/main/resources/guac-manifest.json
rename to extensions/guacamole-auth-sso/modules/guacamole-auth-sso-cas/src/main/resource-templates/guac-manifest.json
index d7ebe4b6e..341f0528a 100644
--- a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-cas/src/main/resources/guac-manifest.json
+++ b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-cas/src/main/resource-templates/guac-manifest.json
@@ -1,6 +1,6 @@
{
- "guacamoleVersion" : "1.6.0",
+ "guacamoleVersion" : "${project.version}",
"name" : "CAS Authentication Extension",
"namespace" : "cas",
diff --git a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-dist/pom.xml b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-dist/pom.xml
index 2c59c5614..814e2b8c7 100644
--- a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-dist/pom.xml
+++ b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-dist/pom.xml
@@ -32,7 +32,7 @@
org.apache.guacamole
guacamole-auth-sso
- 1.6.0
+ ${revision}
../../
@@ -42,28 +42,28 @@
org.apache.guacamole
guacamole-auth-sso-cas
- 1.6.0
+ ${revision}
org.apache.guacamole
guacamole-auth-sso-openid
- 1.6.0
+ ${revision}
org.apache.guacamole
guacamole-auth-sso-saml
- 1.6.0
+ ${revision}
org.apache.guacamole
guacamole-auth-sso-ssl
- 1.6.0
+ ${revision}
diff --git a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-openid/pom.xml b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-openid/pom.xml
index e53143485..14ab1b36b 100644
--- a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-openid/pom.xml
+++ b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-openid/pom.xml
@@ -26,14 +26,13 @@
org.apache.guacamole
guacamole-auth-sso-openid
jar
- 1.6.0
guacamole-auth-sso-openid
http://guacamole.apache.org/
org.apache.guacamole
guacamole-auth-sso
- 1.6.0
+ ${revision}
../../
diff --git a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-openid/src/main/resources/guac-manifest.json b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-openid/src/main/resource-templates/guac-manifest.json
similarity index 94%
rename from extensions/guacamole-auth-sso/modules/guacamole-auth-sso-openid/src/main/resources/guac-manifest.json
rename to extensions/guacamole-auth-sso/modules/guacamole-auth-sso-openid/src/main/resource-templates/guac-manifest.json
index ca05ff165..516d77141 100644
--- a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-openid/src/main/resources/guac-manifest.json
+++ b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-openid/src/main/resource-templates/guac-manifest.json
@@ -1,6 +1,6 @@
{
- "guacamoleVersion" : "1.6.0",
+ "guacamoleVersion" : "${project.version}",
"name" : "OpenID Authentication Extension",
"namespace" : "openid",
diff --git a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-saml/pom.xml b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-saml/pom.xml
index e4a7a73cf..67515beab 100644
--- a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-saml/pom.xml
+++ b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-saml/pom.xml
@@ -26,14 +26,13 @@
org.apache.guacamole
guacamole-auth-sso-saml
jar
- 1.6.0
guacamole-auth-sso-saml
http://guacamole.apache.org/
org.apache.guacamole
guacamole-auth-sso
- 1.6.0
+ ${revision}
../../
diff --git a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-saml/src/main/resources/guac-manifest.json b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-saml/src/main/resource-templates/guac-manifest.json
similarity index 94%
rename from extensions/guacamole-auth-sso/modules/guacamole-auth-sso-saml/src/main/resources/guac-manifest.json
rename to extensions/guacamole-auth-sso/modules/guacamole-auth-sso-saml/src/main/resource-templates/guac-manifest.json
index 47a7d4fb3..f19c11593 100644
--- a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-saml/src/main/resources/guac-manifest.json
+++ b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-saml/src/main/resource-templates/guac-manifest.json
@@ -1,6 +1,6 @@
{
- "guacamoleVersion" : "1.6.0",
+ "guacamoleVersion" : "${project.version}",
"name" : "SAML Authentication Extension",
"namespace" : "saml",
diff --git a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-ssl/pom.xml b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-ssl/pom.xml
index c4e46aafa..2186713ec 100644
--- a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-ssl/pom.xml
+++ b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-ssl/pom.xml
@@ -26,14 +26,13 @@
org.apache.guacamole
guacamole-auth-sso-ssl
jar
- 1.6.0
guacamole-auth-sso-ssl
http://guacamole.apache.org/
org.apache.guacamole
guacamole-auth-sso
- 1.6.0
+ ${revision}
../../
diff --git a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-ssl/src/main/resources/guac-manifest.json b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-ssl/src/main/resource-templates/guac-manifest.json
similarity index 94%
rename from extensions/guacamole-auth-sso/modules/guacamole-auth-sso-ssl/src/main/resources/guac-manifest.json
rename to extensions/guacamole-auth-sso/modules/guacamole-auth-sso-ssl/src/main/resource-templates/guac-manifest.json
index d874933dd..4c6908da0 100644
--- a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-ssl/src/main/resources/guac-manifest.json
+++ b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-ssl/src/main/resource-templates/guac-manifest.json
@@ -1,6 +1,6 @@
{
- "guacamoleVersion" : "1.6.0",
+ "guacamoleVersion" : "${project.version}",
"name" : "SSL Authentication Extension",
"namespace" : "ssl",
diff --git a/extensions/guacamole-auth-sso/pom.xml b/extensions/guacamole-auth-sso/pom.xml
index f95ecd6e1..caed3815f 100644
--- a/extensions/guacamole-auth-sso/pom.xml
+++ b/extensions/guacamole-auth-sso/pom.xml
@@ -26,15 +26,13 @@
org.apache.guacamole
guacamole-auth-sso
pom
- 1.6.0
guacamole-auth-sso
http://guacamole.apache.org/
org.apache.guacamole
extensions
- 1.6.0
- ../
+ ${revision}
@@ -56,19 +54,11 @@
-
-
- org.apache.guacamole
- guacamole-ext
- 1.6.0
- provided
-
-
org.apache.guacamole
guacamole-auth-sso-base
- 1.6.0
+ ${revision}
diff --git a/extensions/guacamole-auth-totp/pom.xml b/extensions/guacamole-auth-totp/pom.xml
index b11570e5d..7016b041d 100644
--- a/extensions/guacamole-auth-totp/pom.xml
+++ b/extensions/guacamole-auth-totp/pom.xml
@@ -26,15 +26,13 @@
org.apache.guacamole
guacamole-auth-totp
jar
- 1.6.0
guacamole-auth-totp
http://guacamole.apache.org/
org.apache.guacamole
extensions
- 1.6.0
- ../
+ ${revision}
@@ -127,8 +125,6 @@
org.apache.guacamole
guacamole-ext
- 1.6.0
- provided
diff --git a/extensions/guacamole-auth-totp/src/main/resources/guac-manifest.json b/extensions/guacamole-auth-totp/src/main/resource-templates/guac-manifest.json
similarity index 94%
rename from extensions/guacamole-auth-totp/src/main/resources/guac-manifest.json
rename to extensions/guacamole-auth-totp/src/main/resource-templates/guac-manifest.json
index da6697597..06aebd495 100644
--- a/extensions/guacamole-auth-totp/src/main/resources/guac-manifest.json
+++ b/extensions/guacamole-auth-totp/src/main/resource-templates/guac-manifest.json
@@ -1,6 +1,6 @@
{
- "guacamoleVersion" : "1.6.0",
+ "guacamoleVersion" : "${project.version}",
"name" : "TOTP TFA Authentication Backend",
"namespace" : "totp",
diff --git a/extensions/guacamole-display-statistics/pom.xml b/extensions/guacamole-display-statistics/pom.xml
index de4995256..ea3439530 100644
--- a/extensions/guacamole-display-statistics/pom.xml
+++ b/extensions/guacamole-display-statistics/pom.xml
@@ -26,15 +26,13 @@
org.apache.guacamole
guacamole-display-statistics
jar
- 1.6.0
guacamole-display-statistics
http://guacamole.apache.org/
org.apache.guacamole
extensions
- 1.6.0
- ../
+ ${revision}
diff --git a/extensions/guacamole-display-statistics/src/main/resources/guac-manifest.json b/extensions/guacamole-display-statistics/src/main/resource-templates/guac-manifest.json
similarity index 90%
rename from extensions/guacamole-display-statistics/src/main/resources/guac-manifest.json
rename to extensions/guacamole-display-statistics/src/main/resource-templates/guac-manifest.json
index be9a3df69..c49c8b5ba 100644
--- a/extensions/guacamole-display-statistics/src/main/resources/guac-manifest.json
+++ b/extensions/guacamole-display-statistics/src/main/resource-templates/guac-manifest.json
@@ -1,6 +1,6 @@
{
- "guacamoleVersion" : "1.6.0",
+ "guacamoleVersion" : "${project.version}",
"name" : "Display Statistic Toolbar",
"namespace" : "display-stats",
diff --git a/extensions/guacamole-history-recording-storage/pom.xml b/extensions/guacamole-history-recording-storage/pom.xml
index 1d4fbf421..4793b159f 100644
--- a/extensions/guacamole-history-recording-storage/pom.xml
+++ b/extensions/guacamole-history-recording-storage/pom.xml
@@ -26,15 +26,13 @@
org.apache.guacamole
guacamole-history-recording-storage
jar
- 1.6.0
guacamole-history-recording-storage
http://guacamole.apache.org/
org.apache.guacamole
extensions
- 1.6.0
- ../
+ ${revision}
@@ -43,8 +41,6 @@
org.apache.guacamole
guacamole-ext
- 1.6.0
- provided
diff --git a/extensions/guacamole-history-recording-storage/src/main/resources/guac-manifest.json b/extensions/guacamole-history-recording-storage/src/main/resource-templates/guac-manifest.json
similarity index 87%
rename from extensions/guacamole-history-recording-storage/src/main/resources/guac-manifest.json
rename to extensions/guacamole-history-recording-storage/src/main/resource-templates/guac-manifest.json
index dfdf8f622..b9c83cde5 100644
--- a/extensions/guacamole-history-recording-storage/src/main/resources/guac-manifest.json
+++ b/extensions/guacamole-history-recording-storage/src/main/resource-templates/guac-manifest.json
@@ -1,6 +1,6 @@
{
- "guacamoleVersion" : "1.6.0",
+ "guacamoleVersion" : "${project.version}",
"name" : "Session Recording Storage",
"namespace" : "recording-storage",
diff --git a/extensions/guacamole-vault/modules/guacamole-vault-base/pom.xml b/extensions/guacamole-vault/modules/guacamole-vault-base/pom.xml
index 6928f5791..a1c9693b6 100644
--- a/extensions/guacamole-vault/modules/guacamole-vault-base/pom.xml
+++ b/extensions/guacamole-vault/modules/guacamole-vault-base/pom.xml
@@ -36,7 +36,7 @@
org.apache.guacamole
guacamole-vault
- 1.6.0
+ ${revision}
../../
@@ -46,7 +46,6 @@
org.apache.guacamole
guacamole-ext
- provided
diff --git a/extensions/guacamole-vault/modules/guacamole-vault-dist/pom.xml b/extensions/guacamole-vault/modules/guacamole-vault-dist/pom.xml
index 4c4a5184b..57a044941 100644
--- a/extensions/guacamole-vault/modules/guacamole-vault-dist/pom.xml
+++ b/extensions/guacamole-vault/modules/guacamole-vault-dist/pom.xml
@@ -36,7 +36,7 @@
org.apache.guacamole
guacamole-vault
- 1.6.0
+ ${revision}
../../
@@ -46,7 +46,7 @@
org.apache.guacamole
guacamole-vault-ksm
- 1.6.0
+ ${revision}
diff --git a/extensions/guacamole-vault/modules/guacamole-vault-ksm/pom.xml b/extensions/guacamole-vault/modules/guacamole-vault-ksm/pom.xml
index 4a5367cfe..add25f85f 100644
--- a/extensions/guacamole-vault/modules/guacamole-vault-ksm/pom.xml
+++ b/extensions/guacamole-vault/modules/guacamole-vault-ksm/pom.xml
@@ -26,14 +26,13 @@
org.apache.guacamole
guacamole-vault-ksm
jar
- 1.6.0
guacamole-vault-ksm
http://guacamole.apache.org/
org.apache.guacamole
guacamole-vault
- 1.6.0
+ ${revision}
../../
@@ -47,14 +46,13 @@
org.apache.guacamole
guacamole-ext
- provided
org.apache.guacamole
guacamole-vault-base
- 1.6.0
+ ${revision}
diff --git a/extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/resources/guac-manifest.json b/extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/resource-templates/guac-manifest.json
similarity index 85%
rename from extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/resources/guac-manifest.json
rename to extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/resource-templates/guac-manifest.json
index 6bff704c5..c2a6a2fb0 100644
--- a/extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/resources/guac-manifest.json
+++ b/extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/resource-templates/guac-manifest.json
@@ -1,6 +1,6 @@
{
- "guacamoleVersion" : "1.6.0",
+ "guacamoleVersion" : "${project.version}",
"name" : "Keeper Secrets Manager",
"namespace" : "keeper-secrets-manager",
diff --git a/extensions/guacamole-vault/pom.xml b/extensions/guacamole-vault/pom.xml
index a8ea92c68..14313ff7a 100644
--- a/extensions/guacamole-vault/pom.xml
+++ b/extensions/guacamole-vault/pom.xml
@@ -26,15 +26,13 @@
org.apache.guacamole
guacamole-vault
pom
- 1.6.0
guacamole-vault
http://guacamole.apache.org/
org.apache.guacamole
extensions
- 1.6.0
- ../
+ ${revision}
@@ -50,18 +48,4 @@
-
-
-
-
-
- org.apache.guacamole
- guacamole-ext
- 1.6.0
- provided
-
-
-
-
-
diff --git a/extensions/pom.xml b/extensions/pom.xml
index 53512ad67..b4fd39e27 100644
--- a/extensions/pom.xml
+++ b/extensions/pom.xml
@@ -26,15 +26,13 @@
org.apache.guacamole
extensions
pom
- 1.6.0
extensions
http://guacamole.apache.org/
org.apache.guacamole
guacamole-client
- 1.6.0
- ../
+ ${revision}
@@ -134,6 +132,20 @@
+
+
+
+
+
+ org.apache.guacamole
+ guacamole-ext
+ ${revision}
+ provided
+
+
+
+
+
diff --git a/guacamole-common-js/pom.xml b/guacamole-common-js/pom.xml
index 8a34eec0c..1a9ac5d5f 100644
--- a/guacamole-common-js/pom.xml
+++ b/guacamole-common-js/pom.xml
@@ -26,19 +26,22 @@
org.apache.guacamole
guacamole-common-js
pom
- 1.6.0
guacamole-common-js
http://guacamole.apache.org/
org.apache.guacamole
guacamole-client
- 1.6.0
- ../
+ ${revision}
+
+ ${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 +157,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
diff --git a/guacamole-common/pom.xml b/guacamole-common/pom.xml
index 6f42bcc34..e95807356 100644
--- a/guacamole-common/pom.xml
+++ b/guacamole-common/pom.xml
@@ -26,15 +26,13 @@
org.apache.guacamole
guacamole-common
jar
- 1.6.0
guacamole-common
http://guacamole.apache.org/
org.apache.guacamole
guacamole-client
- 1.6.0
- ../
+ ${revision}
diff --git a/guacamole-ext/pom.xml b/guacamole-ext/pom.xml
index 779dcc0c6..2ab2ae2d7 100644
--- a/guacamole-ext/pom.xml
+++ b/guacamole-ext/pom.xml
@@ -26,15 +26,13 @@
org.apache.guacamole
guacamole-ext
jar
- 1.6.0
guacamole-ext
http://guacamole.apache.org/
org.apache.guacamole
guacamole-client
- 1.6.0
- ../
+ ${revision}
@@ -87,8 +85,7 @@
org.apache.guacamole
guacamole-common
- 1.6.0
- compile
+ ${revision}
diff --git a/guacamole/pom.xml b/guacamole/pom.xml
index b0743b0fd..ebad2b889 100644
--- a/guacamole/pom.xml
+++ b/guacamole/pom.xml
@@ -26,15 +26,13 @@
org.apache.guacamole
guacamole
war
- 1.6.0
guacamole
http://guacamole.apache.org/
org.apache.guacamole
guacamole-client
- 1.6.0
- ../
+ ${revision}
@@ -254,14 +252,14 @@
org.apache.guacamole
guacamole-ext
- 1.6.0
+ ${revision}
org.apache.guacamole
guacamole-common-js
- 1.6.0
+ ${revision}
zip
runtime
@@ -374,6 +372,13 @@
1.2.2
+
+
+ junit
+ junit
+ test
+
+
diff --git a/guacamole/src/main/java-templates/org/apache/guacamole/extension/GuacamoleVersion.java b/guacamole/src/main/java-templates/org/apache/guacamole/extension/GuacamoleVersion.java
new file mode 100644
index 000000000..ef5e85325
--- /dev/null
+++ b/guacamole/src/main/java-templates/org/apache/guacamole/extension/GuacamoleVersion.java
@@ -0,0 +1,159 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.guacamole.extension;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Representation of the Guacamole webapp version. This is used both to
+ * represent the expected minimum webapp version required by an extension and
+ * to represent the running version of Guacamole.
+ */
+public class GuacamoleVersion {
+
+ /**
+ * Regular expression that splits a version number into its major, minor,
+ * and patch components, as well as an optional version suffix.
+ */
+ private static final Pattern VERSION_PATTERN = Pattern.compile("(\\d+)\\.(\\d+)\\.(\\d+)(.+)?");
+
+ /**
+ * The version of this copy of the Guacamole web application. This value is
+ * substituted by Maven during the build.
+ */
+ public static final GuacamoleVersion RUNNING_VERSION = new GuacamoleVersion("${project.version}");
+
+ /**
+ * The first (leftmost) version number of a Guacamole version. This is the
+ * number of greatest significance and denotes compatibility. If two
+ * Guacamole versions have the same major number, extensions for the older
+ * version should still work with the newer version.
+ */
+ private final int major;
+
+ /**
+ * The second (middle) version number of a Guacamole version. If two
+ * Guacamole versions have the same major number but different minor
+ * numbers, they would be expected to differ in the features available.
+ */
+ private final int minor;
+
+ /**
+ * The third (rightmost) version number of a Guacamole version. This is the
+ * number of least significance and denotes minor changes or fixes. If
+ * two Guacamole versions have the same major and minor numbers but
+ * different patch numbers, the newer version would be expected to have
+ * fixes or improvements that correct issues affecting the older version,
+ * but would not be expected to have major new features.
+ */
+ private final int patch;
+
+ /**
+ * An arbitrary suffix that might be appended by downstream package
+ * maintainers or vendors. A Guacamole version with a particular suffix
+ * would be expected to have patches applied relative to the version without
+ * the suffix but is otherwise compatible (as if the patch or minor numbers
+ * differed instead of the suffix).
+ */
+ private final String suffix;
+
+ /**
+ * Creates a new GuacamoleVersion representing the version of Guacamole
+ * that has the given version string. The version string must be in the
+ * format "MAJOR.MINOR.PATCH" with an optional and arbitrary version
+ * suffix.
+ *
+ * @param versionStr
+ * The Guacamole version string to parse.
+ *
+ * @throws IllegalArgumentException
+ * If the version string is not in the correct format.
+ */
+ public GuacamoleVersion(String versionStr) throws IllegalArgumentException {
+
+ // Use all-zeroes without suffix to represent the wildcard version
+ if ("*".equals(versionStr)) {
+ major = minor = patch = 0;
+ suffix = null;
+ }
+
+ // Extract major/minor/patch and optional suffix from version string
+ else {
+
+ Matcher versionMatcher = VERSION_PATTERN.matcher(versionStr);
+ if (!versionMatcher.matches())
+ throw new IllegalArgumentException("Format of version "
+ + "string \"" + versionStr + "\" is not valid");
+
+ major = Integer.parseInt(versionMatcher.group(1));
+ minor = Integer.parseInt(versionMatcher.group(2));
+ patch = Integer.parseInt(versionMatcher.group(3));
+ suffix = versionMatcher.group(4);
+
+ }
+
+ }
+
+ /**
+ * Returns whether this Guacamole version is expected to be compatible with
+ * an extension that requires at least the given Guacamole version.
+ *
+ * @param required
+ * The minimum Guacamole version required.
+ *
+ * @return
+ * true if this Guacamole version is expected to be compatible with an
+ * extension requiring at least the given version, false otherwise.
+ */
+ public boolean provides(GuacamoleVersion required) {
+
+ // Wildcard version always matches
+ if (required.major == 0 && required.minor == 0 && required.patch == 0
+ && required.suffix == null)
+ return true;
+
+ // Major version component MUST be identical
+ if (this.major != required.major)
+ return false;
+
+ // Minor version component must be the same or greater than the
+ // requirement
+ if (this.minor < required.minor)
+ return false;
+
+ // If both major and minor are identical, the patch version component
+ // must be the same or greater than the requirement
+ if (this.minor == required.minor && this.patch < required.patch)
+ return false;
+
+ // Any suffix denotes vendor-specific patching that must be assumed to
+ // be an arbitrary requirement only satisfied by that suffix. If no
+ // suffix is required, any suffix of the current Guacamole version can
+ // just be ignored.
+
+ if (required.suffix == null)
+ return true;
+
+ return required.suffix.equals(this.suffix);
+
+ }
+
+}
diff --git a/guacamole/src/main/java/org/apache/guacamole/extension/ExtensionModule.java b/guacamole/src/main/java/org/apache/guacamole/extension/ExtensionModule.java
index 21adbe81e..ae91ce722 100644
--- a/guacamole/src/main/java/org/apache/guacamole/extension/ExtensionModule.java
+++ b/guacamole/src/main/java/org/apache/guacamole/extension/ExtensionModule.java
@@ -24,7 +24,6 @@ import com.google.inject.servlet.ServletModule;
import java.io.File;
import java.io.FileFilter;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
@@ -57,27 +56,6 @@ public class ExtensionModule extends ServletModule {
*/
private final Logger logger = LoggerFactory.getLogger(ExtensionModule.class);
- /**
- * The version strings of all Guacamole versions whose extensions are
- * compatible with this release.
- */
- private static final List ALLOWED_GUACAMOLE_VERSIONS =
- Collections.unmodifiableList(Arrays.asList(
- "*",
- "1.0.0",
- "1.1.0",
- "1.2.0",
- "1.3.0",
- "1.4.0",
- "1.5.0",
- "1.5.1",
- "1.5.2",
- "1.5.3",
- "1.5.4",
- "1.5.5",
- "1.6.0"
- ));
-
/**
* The name of the directory within GUACAMOLE_HOME containing any .jars
* which should be included in the classpath of all extensions.
@@ -394,21 +372,6 @@ public class ExtensionModule extends ServletModule {
}
- /**
- * Returns whether the given version of Guacamole is compatible with this
- * version of Guacamole as far as extensions are concerned.
- *
- * @param guacamoleVersion
- * The version of Guacamole the extension was built for.
- *
- * @return
- * true if the given version of Guacamole is compatible with this
- * version of Guacamole, false otherwise.
- */
- private boolean isCompatible(String guacamoleVersion) {
- return ALLOWED_GUACAMOLE_VERSIONS.contains(guacamoleVersion);
- }
-
/**
* Returns the set of identifiers of all authentication providers whose
* internal failures should be tolerated during the authentication process.
@@ -513,7 +476,8 @@ public class ExtensionModule extends ServletModule {
Extension extension = new Extension(getParentClassLoader(), extensionFile, temporaryFiles);
// Validate Guacamole version of extension
- if (!isCompatible(extension.getGuacamoleVersion())) {
+ GuacamoleVersion requiredVersion = new GuacamoleVersion(extension.getGuacamoleVersion());
+ if (!GuacamoleVersion.RUNNING_VERSION.provides(requiredVersion)) {
logger.debug("Declared Guacamole version \"{}\" of extension \"{}\" is not compatible with this version of Guacamole.",
extension.getGuacamoleVersion(), extensionFile.getName());
throw new GuacamoleServerException("Extension \"" + extension.getName() + "\" is not "
@@ -523,7 +487,7 @@ public class ExtensionModule extends ServletModule {
extensions.add(extension);
}
- catch (GuacamoleException e) {
+ catch (GuacamoleException | IllegalArgumentException e) {
logger.error("Extension \"{}\" could not be loaded: {}",
extensionFile.getName(), e.getMessage(), e);
}
diff --git a/guacamole/src/test/java/org/apache/guacamole/extension/GuacamoleVersionTest.java b/guacamole/src/test/java/org/apache/guacamole/extension/GuacamoleVersionTest.java
new file mode 100644
index 000000000..53ced59b7
--- /dev/null
+++ b/guacamole/src/test/java/org/apache/guacamole/extension/GuacamoleVersionTest.java
@@ -0,0 +1,150 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.guacamole.extension;
+
+import java.util.Arrays;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Unit tests which verify GuacamoleVersion correctly parses and compares
+ * Guacamole versions.
+ */
+public class GuacamoleVersionTest {
+
+ /**
+ * Verifies that trivially valid version numbers are correctly parsed.
+ */
+ @Test
+ public void testValidVersion() {
+ GuacamoleVersion version = new GuacamoleVersion("1.2.3");
+ Assert.assertTrue(version.provides(version));
+ }
+
+ /**
+ * Verifies that invalid version numbers correctly fail to parse.
+ */
+ @Test
+ public void testInvalidVersion() {
+ for (String invalid : Arrays.asList("1.2")) {
+ try {
+ GuacamoleVersion version = new GuacamoleVersion(invalid);
+ Assert.fail("Invalid Guacamole version string \""
+ + invalid + "\" should have failed to parse.");
+ }
+ catch (IllegalArgumentException e) {
+ // Expected
+ }
+ }
+ }
+
+ /**
+ * Verifies that newer versions are recognized as providing older versions
+ * when they differ by minor number (but not the other way around).
+ */
+ @Test
+ public void testMinorNewerProvidesOlder() {
+
+ GuacamoleVersion olderVersion = new GuacamoleVersion("1.2.3");
+ GuacamoleVersion newerVersion = new GuacamoleVersion("1.22.3");
+
+ Assert.assertTrue(newerVersion.provides(olderVersion));
+ Assert.assertFalse(olderVersion.provides(newerVersion));
+
+ }
+
+ /**
+ * Verifies that newer versions are recognized as providing older versions
+ * when they differ by patch number (but not the other way around).
+ */
+ @Test
+ public void testPatchNewerProvidesOlder() {
+
+ GuacamoleVersion olderVersion = new GuacamoleVersion("1.2.3");
+ GuacamoleVersion newerVersion = new GuacamoleVersion("1.2.7");
+
+ Assert.assertTrue(newerVersion.provides(olderVersion));
+ Assert.assertFalse(olderVersion.provides(newerVersion));
+
+ }
+
+ /**
+ * Verifies that two versions are NOT recognized as providing each other
+ * when they differ by major number (regardless of which is newer).
+ */
+ @Test
+ public void testPatchMajorIncompatible() {
+
+ GuacamoleVersion olderVersion = new GuacamoleVersion("1.2.3");
+ GuacamoleVersion newerVersion = new GuacamoleVersion("2.2.3");
+
+ Assert.assertFalse(newerVersion.provides(olderVersion));
+ Assert.assertFalse(olderVersion.provides(newerVersion));
+
+ }
+
+ /**
+ * Verifies that a version number with an arbitrary suffix is recognized
+ * as providing that same version without the suffix (but not the other way
+ * around).
+ */
+ @Test
+ public void testCompatibleSuffix() {
+
+ GuacamoleVersion olderVersion = new GuacamoleVersion("1.2.3");
+ GuacamoleVersion newerVersion = new GuacamoleVersion("1.2.3-foo");
+
+ Assert.assertTrue(newerVersion.provides(olderVersion));
+ Assert.assertFalse(olderVersion.provides(newerVersion));
+
+ }
+
+ /**
+ * Verifies that two version numbers that differ by arbitrary suffix are
+ * NOT recognized as providing each other, even when the version numbers
+ * are otherwise the same.
+ */
+ @Test
+ public void testIncompatibleSuffix() {
+
+ GuacamoleVersion olderVersion = new GuacamoleVersion("1.2.3-bar");
+ GuacamoleVersion newerVersion = new GuacamoleVersion("1.2.3-foo");
+
+ Assert.assertFalse(newerVersion.provides(olderVersion));
+ Assert.assertFalse(olderVersion.provides(newerVersion));
+
+ }
+
+ /**
+ * Verifies that the special wildcard version is provided by any version,
+ * but not the other way around.
+ */
+ @Test
+ public void testWildcardVersion() {
+
+ GuacamoleVersion specificVersion = new GuacamoleVersion("1.2.3-foo");
+ GuacamoleVersion wildcardVersion = new GuacamoleVersion("*");
+
+ Assert.assertTrue(specificVersion.provides(wildcardVersion));
+ Assert.assertFalse(wildcardVersion.provides(specificVersion));
+
+ }
+
+}
diff --git a/pom.xml b/pom.xml
index 17be9fdd1..7543dfd1c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,7 +26,7 @@
org.apache.guacamole
guacamole-client
pom
- 1.6.0
+ ${revision}
guacamole-client
http://guacamole.apache.org/
@@ -35,6 +35,12 @@
UTF-8
+
+ 1.6.1
+
32.1.3-jre
5.1.0
@@ -201,6 +207,36 @@
+
+
+ org.codehaus.mojo
+ flatten-maven-plugin
+ 1.7.3
+
+ oss
+ true
+
+
+
+ flatten
+ process-resources
+
+ flatten
+
+
+
+ flatten.clean
+ clean
+
+ clean
+
+
+
+
+
@@ -490,6 +526,47 @@
+
+
+ filter-java-source
+
+ src/main/java-templates
+
+
+
+
+ org.codehaus.mojo
+ templating-maven-plugin
+ 3.0.0
+
+
+ filter-java-source
+
+ filter-sources
+
+
+
+
+
+
+
+
+
+
+ filter-resources
+
+ src/main/resource-templates
+
+
+
+
+ src/main/resource-templates
+ true
+
+
+
+
+
check-dependencies