The 5.7 branch of Magnolia reached End-of-Life on December 31, 2023, as specified in our End-of-life policy. This means the 5.7 branch is no longer maintained or supported. Please upgrade to the latest Magnolia release. By upgrading, you will get the latest release of Magnolia featuring significant improvements to the author and developer experience. For a successful upgrade, please consult our Magnolia 6.2 documentation. If you need help, please contact info@magnolia-cms.com.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 85 Next »

This page contains the information you should be aware of when you are upgrading to Magnolia 5.7.x from any previous and currently supported version.

Before starting the upgrade, we recommend you read:

If you are migrating from Magnolia 4.4/4.5, read the migration documentation first. You can also contact us for migration support. 

What to update

Add Magnolia Privacy modules

If you have an Enterprise license, add the new Privacy modules that help you make your websites GDPR-compliant:.

Maven is the easiest way to install the modules. Add the following dependency to your bundle:

<dependency>
  <groupId>info.magnolia.privacy</groupId>
  <artifactId>magnolia-privacy-cookie-manager</artifactId>
</dependency>
<dependency>
  <groupId>info.magnolia.privacy</groupId>
  <artifactId>magnolia-privacy-visitor-manager</artifactId>
</dependency>
<dependency>
  <groupId>info.magnolia.privacy</groupId>
  <artifactId>magnolia-privacy-ui</artifactId>
</dependency>
<dependency>
  <groupId>info.magnolia.privacy</groupId>
  <artifactId>magnolia-privacy-sample</artifactId>
</dependency>

Maven dependency management will include the other required submodules. Make sure that all dependencies are in the same version.

Remove outdated add-on modules 

With Magnolia 5.7 we have removed a few modules that were not bundled but which were added as add-ons. We recommend you remove them. 

Here is the list of the removed add-on modules:

  • magnolia-jndi-1.0.2
  • magnolia-module-newsletter-bundle-2.2
  • magnolia-module-webdav-2.1.3
  • magnolia-templating-samples-5.4.1

See also  MGNLEE-533 - Getting issue details... STATUS .

Webdav

You must remove the magnolia-module-webdav - since Jackrabbit 2.16 is not supporting webdav anymore.

The magnolia.properties file

TODO:

  • Remove the SNAPSHOT version on the artifact macro displaying the latest 5.7.x version
  • fetch the proper version of the properties files based on the latest tagged version after the release.

When upgrading Magnolia - its is always worth to compare your magnolia.properties file with the one coming from freshly released Magnolia bundles.

(info) Between Magnolia 5.6.6 and Magnolia 5.7 - the magnolia.properties file has not changed.

Below find the latest versions of  the magnolia.properties files of the Magnolia 5.7 series: 

Error rendering macro 'artifact-resource-macro'

com.sun.jersey.api.client.ClientHandlerException: java.net.NoRouteToHostException: No route to host (Host unreachable)

Magnolia CE / Magnolia EE Standard*

Error rendering macro 'code-pro'

Error 401 retrieving server data from URL. User is not authorized to perform the request.

*) Magnolia CE and Magnolia EE Standard are using the same magnolia.properties file.

Magnolia EE Pro

Error rendering macro 'code-pro'

Error 401 retrieving server data from URL. User is not authorized to perform the request.

Tomcat 9.0.8

If you are using Tomcat - we have upgraded to Tomcat 9.0.8.

In case you are using another servlet container - have a look at the Certified stack.

3rd-party libraries

Jackrabbit 2.16.1

If you want to run Magnolia on Java 9 or 10, you must use Jackrabbit 2.16.1.

  • jackrabbit-api-2.16.1
  • jackrabbit-core-2.16.1
  • jackrabbit-data-2.16.1
  • jackrabbit-jcr-commons-2.16.1
  • jackrabbit-spi-2.16.1
  • jackrabbit-spi-commons-2.16.1

Vaadin 8.4.2

If you come from Magnolia 5.5.x or even lower, please read the instructions to upgrade to Magnolia 5.6.x concerning custom modules and the widget set too.

  • vaadin-compatibility-aceeditor-1.0
  • vaadin-compatibility-ckeditor-1.0
  • vaadin-compatibility-client-8.4.2
  • vaadin-compatibility-context-menu-1.0
  • vaadin-compatibility-expandingtextarea-1.0
  • vaadin-compatibility-server-8.4.2
  • vaadin-compatibility-shared-8.4.2
  • vaadin-compatibility-themes-8.4.2
  • vaadin-compatibility-tokenfield-1.0
  • vaadin-server-8.4.2
  • vaadin-shared-8.4.2
  • validation-api-1.1.0.Final

Groovy 2.5

Magnolia 5.7 updates magnolia-module-groovy to version 2.7, which ships the latest stable version of Apache Groovy 2.5.

Earlier versions of Groovy were delivered in a single jar file called groovy-all but this library does not exist anymore. magnolia-module-groovy-2.7 now ships with only the minimum set of libraries:

  • groovy-2.5.0.jar
  • groovy-xml-2.5.0.jar

Some of your custom Groovy scripts may require additional libraries.

<dependency>
  <groupId>org.codehaus.groovy</groupId>
  <artifactId>groovy</artifactId>
  <version>2.5.0</version>
</dependency>
<dependency>
  <groupId>org.codehaus.groovy</groupId>
  <artifactId>groovy-xml</artifactId>
  <version>2.5.0</version>
</dependency>

Other 3rd-party libraries

  • commons-lang3-3.7
  • freemarker-2.3.25-incubating
  • gson-2.2.2
  • guice-4.2.0
  • guice-multibindings-4.2.0
  • jackson-databind-2.9.5
  • jsoup-1.8.3
  • mycila-guice-closeable-4.0
  • mycila-guice-injection-4.0
  • mycila-guice-jsr-4.0
  • snakeyaml-1.21
  • xercesImpl-2.12

How to update

Recommendations

  1. Update to your latest minor release version first before upgrade to recent major release. A June 2018 example: a customer is considering an upgrade from 5.5.8 to 5.7. The correct sequence would be: 5.5.8 → 

    Error rendering macro 'artifact-resource-macro'

    com.sun.jersey.api.client.ClientHandlerException: java.net.NoRouteToHostException: No route to host (Host unreachable)

     → 

    Error rendering macro 'artifact-resource-macro'

    com.sun.jersey.api.client.ClientHandlerException: java.net.NoRouteToHostException: No route to host (Host unreachable)

     → 5.7

  2. Update all external libraries required by the Magnolia release to which you intend to upgrade.
  3. Carefully look for "change" or "changes for ..." sections in the release notes since.
  4. Because the upgrade process takes time and is vulnerable to incidents, please minimize the risk by cleaning up your system, removing unused data, reindexing everything and doing a full backup first.

Updating manually

  1. Stop the application server.
  2. Extract the new Magnolia bundle.
  3. Replace JAR files in the WEB-INF/lib folder of your old Magnolia instances with new JARs from the bundle.
    (warning) Magnolia 5.7 updates numerous 3rd-party libraries - see Java 8, 9 and 10 runtime compatibility and library updates.
  4. Remove any module JARs you had previously removed from your instances. Add any modules you might have added.
    (warning) We have removed a few modules from the add-ons. Some of them you must remove. See Removing outdated add-on modules.
  5. Add new introduced modules - see Adding the privacy modules.
  6. Optional: Delete all indexes to give them a little boost. Delete the index folder under each workspace directory: repositories/magnolia/workspaces/<workspace>/index. Indexes are recreated on startup, which might take a while depending on the size of your repository.
  7. If you customized magnolia.properties files, compare the changes to the file in the new bundle. Properties may have been added and removed.
  8. Read release notes for all intermediary versions for any additional update tasks.
  9. Restart the application server.
  10. Using your browser, go to the Magnolia instances and run the Web update.

Updating Maven managed webapps

On this section we assume that you use Maven to manage your (custom) webapp. How you do this depends on how you have organized your pom files.

Upgrading the versions of inherited BOM files

The most typical use case is, that your custom webapp is based on one of Magnolias preconfigured webapps. The structure of the Maven project which is managing your webapp could look like this:

custom-ee/
├── custom-ee-webapp
│   ├── pom.xml
│   └── src
└── pom.xml
Line 3: custom-ee/custom-ee-webapp/pom.xml is the pom file of your custom webapp.

custom-ee/custom-ee-webapp/pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.example</groupId>
    <artifactId>custom-ee</artifactId>
    <version>1.0-SNAPSHOT</version>
    <relativePath>../pom.xml</relativePath>
  </parent>
  <artifactId>custom-ee-webapp</artifactId>
  <name>custom-ee: webapp</name>
  <packaging>war</packaging>

  <dependencies>
    <dependency>
      <groupId>info.magnolia.eebundle</groupId>
      <artifactId>magnolia-enterprise-pro-webapp</artifactId>
      <type>war</type>
    </dependency>
    <dependency>
      <groupId>info.magnolia.eebundle</groupId>
      <artifactId>magnolia-enterprise-pro-webapp</artifactId>
      <type>pom</type>
    </dependency>
    <!-- More custom modules here -->
    <dependency>
      <groupId>com.example</groupId>
      <artifactId>foobar-module</artifactId>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <!-- exclude jars copied "physically" from the webapp overlay - so we only get those resolved by Maven's dependency management -->
          <dependentWarExcludes>WEB-INF/lib/*.jar</dependentWarExcludes>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>

Line 5: custom-ee/pom.xml is the "parent pom file" of your custom webapp - this file is managing the dependencies and its versions. 

custom-ee/pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.example</groupId>
  <artifactId>custom-ee</artifactId>
  <name>custom-ee (parent pom)</name>
  <version>1.0-SNAPSHOT</version>
  <packaging>pom</packaging>

  <properties>
    <magnoliaBundleVersion>5.6.6</magnoliaBundleVersion>
    <foobarModuleVersion>1.2</foobarModuleVersion>
    <javaVersion>1.8</javaVersion>
  </properties>

  <!-- Fill the following in, so you can use the release plugin -->
  <scm>
    <connection/>
    <developerConnection/>
    <url/>
  </scm>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>info.magnolia.eebundle</groupId>
        <artifactId>magnolia-enterprise-bundle-parent</artifactId>
        <version>${magnoliaBundleVersion}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <!-- More dependencies for your custom modules here -->
      <dependency>
        <groupId>com.example</groupId>
        <artifactId>foobar-module</artifactId>
        <version>${foobarModuleVersion}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>


  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.7.0</version>
        <configuration>
          <source>${javaVersion}</source>
          <target>${javaVersion}</target>
        </configuration>
      </plugin>
    </plugins>

    <!-- default resources configuration which will filter your module descriptors -->
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <includes>
          <include>**/*</include>
        </includes>
      </resource>
      <resource>
        <filtering>true</filtering>
        <directory>src/main/resources</directory>
        <includes>
          <include>META-INF/magnolia/*</include>
        </includes>
      </resource>
    </resources>
  </build>

  <repositories>
    <repository>
      <id>magnolia.public</id>
      <url>https://nexus.magnolia-cms.com/content/groups/public</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
    <repository>
      <id>magnolia.enterprise.releases</id>
      <url>https://nexus.magnolia-cms.com/content/repositories/magnolia.enterprise.releases</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
    <repository>
      <id>vaadin-addons</id>
      <url>https://maven.vaadin.com/vaadin-addons</url>
    </repository>
  </repositories>

  <modules>
    <module>custom-ee-webapp</module>
  </modules>
</project>

Note that the "parent pom" (custom-ee/pom.xml) is managing all versions for Magnolia modules as well as for 3rd-party libraries.

  • It is importing info.magnolia.eebundle:magnolia-enterprise-bundle-parent - which manages the versions of Magnolia Enterprise modules and imports 
    • info.magnolia.bundle:magnolia-bundle-parent (which manages the versions of the Magnolia CE modules) and 
    • info.magnolia.boms:magnolia-external-dependencies (which manages the versions of the 3rd-party libraries)

If the pom files for your custom webapp are organized as shown in this example - you must change only one property. In the <properties> section of your parent pom change the version of the magnoliaBundleVersion property:

<properties>
  <magnoliaBundleVersion>5.7</magnoliaBundleVersion>
  <foobarModuleVersion>1.2</foobarModuleVersion>
  <javaVersion>1.8</javaVersion>
</properties>
Line 2: Set the magnoliaBundleVersion to your required version. That's all you must change on the pom files of your webapp.

Checking the Maven dependency tree

Whether your Maven project is shown as above or whether it is done in a different way, in any case:

Building the Maven dependency tree helps you to analyze the versions of all the Magnolia modules and all 3rd-party libraries of your custom webapp.

Open a shell, go to the directory of your webapp and execute the Maven command for the dependency tree.

cd /Users/jdoe/dev/repo/custom-mgnl-webapps/custom-ee/custom-ee-webapp
mvn dependency:tree

Known issues

If you encounter problems, please check the Known issues page first.

  • No labels