From 95e9427ae1b0a7136f4090d91e0f3e51bae0ae1c Mon Sep 17 00:00:00 2001
From: Guillaume Delhumeau <guillaume.delhumeau@xwiki.com>
Date: Tue, 26 Feb 2019 10:53:16 +0100
Subject: [PATCH] XDOCKER-100: Upgrade stable version to 11.1.

---
 10/mysql-tomcat/xwiki/hibernate.cfg.xml    | 4 ++--
 10/postgres-tomcat/xwiki/hibernate.cfg.xml | 4 ++--
 11/mysql-tomcat/.env                       | 2 +-
 11/mysql-tomcat/Dockerfile                 | 4 ++--
 11/mysql-tomcat/xwiki/hibernate.cfg.xml    | 4 ++--
 11/postgres-tomcat/.env                    | 2 +-
 11/postgres-tomcat/Dockerfile              | 4 ++--
 11/postgres-tomcat/xwiki/hibernate.cfg.xml | 4 ++--
 build.gradle                               | 4 ++--
 template/xwiki/hibernate.cfg.xml           | 9 ++++++---
 10 files changed, 22 insertions(+), 19 deletions(-)

diff --git a/10/mysql-tomcat/xwiki/hibernate.cfg.xml b/10/mysql-tomcat/xwiki/hibernate.cfg.xml
index bd0af68..402e96f 100644
--- a/10/mysql-tomcat/xwiki/hibernate.cfg.xml
+++ b/10/mysql-tomcat/xwiki/hibernate.cfg.xml
@@ -94,10 +94,10 @@
     <property name="dbcp.maxOpenPreparedStatements">20</property>
     <mapping resource="xwiki.hbm.xml"/>
     <mapping resource="feeds.hbm.xml"/>
-    <mapping resource="activitystream.hbm.xml"/>
     <mapping resource="instance.hbm.xml"/>
     <mapping resource="mailsender.hbm.xml"/>
-    <mapping resource="notification-filter-preferences.hbm.xml"/>
+    <mapping resource="activitystream.hbm.xml"/>
 
+    <mapping resource="notification-filter-preferences.hbm.xml"/>
   </session-factory>
 </hibernate-configuration>
diff --git a/10/postgres-tomcat/xwiki/hibernate.cfg.xml b/10/postgres-tomcat/xwiki/hibernate.cfg.xml
index d7ebe10..3efb601 100644
--- a/10/postgres-tomcat/xwiki/hibernate.cfg.xml
+++ b/10/postgres-tomcat/xwiki/hibernate.cfg.xml
@@ -96,10 +96,10 @@
     <property name="xwiki.virtual_mode">schema</property>
     <mapping resource="xwiki.postgresql.hbm.xml"/>
     <mapping resource="feeds.hbm.xml"/>
-    <mapping resource="activitystream.hbm.xml"/>
     <mapping resource="instance.hbm.xml"/>
     <mapping resource="mailsender.hbm.xml"/>
-    <mapping resource="notification-filter-preferences.hbm.xml"/>
+    <mapping resource="activitystream.hbm.xml"/>
 
+    <mapping resource="notification-filter-preferences.hbm.xml"/>
   </session-factory>
 </hibernate-configuration>
diff --git a/11/mysql-tomcat/.env b/11/mysql-tomcat/.env
index baca356..3c9fa58 100644
--- a/11/mysql-tomcat/.env
+++ b/11/mysql-tomcat/.env
@@ -1,5 +1,5 @@
 # Default environment values
-XWIKI_VERSION=11.0.3
+XWIKI_VERSION=11.1
 DB_USER=xwiki
 DB_PASSWORD=xwiki
 DB_DATABASE=xwiki
diff --git a/11/mysql-tomcat/Dockerfile b/11/mysql-tomcat/Dockerfile
index 9602127..e4e09c7 100644
--- a/11/mysql-tomcat/Dockerfile
+++ b/11/mysql-tomcat/Dockerfile
@@ -44,9 +44,9 @@ RUN apt-get update && \
 # Install XWiki as the ROOT webapp context in Tomcat
 # Create the Tomcat temporary directory
 # Configure the XWiki permanent directory
-ENV XWIKI_VERSION=11.0.3
+ENV XWIKI_VERSION=11.1
 ENV XWIKI_URL_PREFIX "http://maven.xwiki.org/releases/org/xwiki/platform/xwiki-platform-distribution-war/${XWIKI_VERSION}"
-ENV XWIKI_DOWNLOAD_SHA256 ac9b1b917ec86946c7bcdfc53ddc39a9011003d8e563dcd7a77b74cf47aeeadf
+ENV XWIKI_DOWNLOAD_SHA256 a8203a6de2e0c54d4ba0e514c68b44bcff2f5953506d8828c3d4db469ebd7881
 RUN rm -rf /usr/local/tomcat/webapps/* && \
   mkdir -p /usr/local/tomcat/temp && \
   mkdir -p /usr/local/xwiki/data && \
diff --git a/11/mysql-tomcat/xwiki/hibernate.cfg.xml b/11/mysql-tomcat/xwiki/hibernate.cfg.xml
index bd0af68..ef2cdce 100644
--- a/11/mysql-tomcat/xwiki/hibernate.cfg.xml
+++ b/11/mysql-tomcat/xwiki/hibernate.cfg.xml
@@ -94,10 +94,10 @@
     <property name="dbcp.maxOpenPreparedStatements">20</property>
     <mapping resource="xwiki.hbm.xml"/>
     <mapping resource="feeds.hbm.xml"/>
-    <mapping resource="activitystream.hbm.xml"/>
     <mapping resource="instance.hbm.xml"/>
     <mapping resource="mailsender.hbm.xml"/>
-    <mapping resource="notification-filter-preferences.hbm.xml"/>
+    <mapping resource="eventstream.hbm.xml"/>
 
+    <mapping resource="notification-filter-preferences.hbm.xml"/>
   </session-factory>
 </hibernate-configuration>
diff --git a/11/postgres-tomcat/.env b/11/postgres-tomcat/.env
index 9599d36..18a0895 100644
--- a/11/postgres-tomcat/.env
+++ b/11/postgres-tomcat/.env
@@ -1,5 +1,5 @@
 # Default environment values
-XWIKI_VERSION=11.0.3
+XWIKI_VERSION=11.1
 DB_USER=xwiki
 DB_PASSWORD=xwiki
 DB_DATABASE=xwiki
diff --git a/11/postgres-tomcat/Dockerfile b/11/postgres-tomcat/Dockerfile
index 68b74e0..663e0b3 100644
--- a/11/postgres-tomcat/Dockerfile
+++ b/11/postgres-tomcat/Dockerfile
@@ -44,9 +44,9 @@ RUN apt-get update && \
 # Install XWiki as the ROOT webapp context in Tomcat
 # Create the Tomcat temporary directory
 # Configure the XWiki permanent directory
-ENV XWIKI_VERSION=11.0.3
+ENV XWIKI_VERSION=11.1
 ENV XWIKI_URL_PREFIX "http://maven.xwiki.org/releases/org/xwiki/platform/xwiki-platform-distribution-war/${XWIKI_VERSION}"
-ENV XWIKI_DOWNLOAD_SHA256 ac9b1b917ec86946c7bcdfc53ddc39a9011003d8e563dcd7a77b74cf47aeeadf
+ENV XWIKI_DOWNLOAD_SHA256 a8203a6de2e0c54d4ba0e514c68b44bcff2f5953506d8828c3d4db469ebd7881
 RUN rm -rf /usr/local/tomcat/webapps/* && \
   mkdir -p /usr/local/tomcat/temp && \
   mkdir -p /usr/local/xwiki/data && \
diff --git a/11/postgres-tomcat/xwiki/hibernate.cfg.xml b/11/postgres-tomcat/xwiki/hibernate.cfg.xml
index d7ebe10..481e530 100644
--- a/11/postgres-tomcat/xwiki/hibernate.cfg.xml
+++ b/11/postgres-tomcat/xwiki/hibernate.cfg.xml
@@ -96,10 +96,10 @@
     <property name="xwiki.virtual_mode">schema</property>
     <mapping resource="xwiki.postgresql.hbm.xml"/>
     <mapping resource="feeds.hbm.xml"/>
-    <mapping resource="activitystream.hbm.xml"/>
     <mapping resource="instance.hbm.xml"/>
     <mapping resource="mailsender.hbm.xml"/>
-    <mapping resource="notification-filter-preferences.hbm.xml"/>
+    <mapping resource="eventstream.hbm.xml"/>
 
+    <mapping resource="notification-filter-preferences.hbm.xml"/>
   </session-factory>
 </hibernate-configuration>
diff --git a/build.gradle b/build.gradle
index fc27831..9387d9f 100644
--- a/build.gradle
+++ b/build.gradle
@@ -39,8 +39,8 @@ def tokens = [
         xwikiSha256: '5b544d8786b71cc51b150a3623efa17aea1dfafda429776caeb97d5a3d2c5343'
     ],
     '11': [
-        xwikiVersion: '11.0.3',
-        xwikiSha256: 'ac9b1b917ec86946c7bcdfc53ddc39a9011003d8e563dcd7a77b74cf47aeeadf'
+        xwikiVersion: '11.1',
+        xwikiSha256: 'a8203a6de2e0c54d4ba0e514c68b44bcff2f5953506d8828c3d4db469ebd7881'
     ]
 ]
 
diff --git a/template/xwiki/hibernate.cfg.xml b/template/xwiki/hibernate.cfg.xml
index 4b7d484..181c124 100644
--- a/template/xwiki/hibernate.cfg.xml
+++ b/template/xwiki/hibernate.cfg.xml
@@ -94,7 +94,6 @@
     <property name="dbcp.maxOpenPreparedStatements">20</property>
     <mapping resource="xwiki.hbm.xml"/>
     <mapping resource="feeds.hbm.xml"/>
-    <mapping resource="activitystream.hbm.xml"/>
     <mapping resource="instance.hbm.xml"/>
     <mapping resource="mailsender.hbm.xml"/>'''
 
@@ -116,9 +115,13 @@
     <property name="xwiki.virtual_mode">schema</property>
     <mapping resource="xwiki.postgresql.hbm.xml"/>
     <mapping resource="feeds.hbm.xml"/>
-    <mapping resource="activitystream.hbm.xml"/>
     <mapping resource="instance.hbm.xml"/>
     <mapping resource="mailsender.hbm.xml"/>''' %>
-    <% if (!xwikiVersion.startsWith('9.')) println '<mapping resource="notification-filter-preferences.hbm.xml"/>' %>
+    <% if (xwikiVersion.startsWith('11.'))
+          println '<mapping resource="eventstream.hbm.xml"/>'
+       else
+          println '<mapping resource="activitystream.hbm.xml"/>'
+    %>
+    <mapping resource="notification-filter-preferences.hbm.xml"/>
   </session-factory>
 </hibernate-configuration>
-- 
GitLab