build compile maven tests Jahia 7.3 Jahia 8

Error when upgrading Jahia version in a custom module pom.xml


When the Jahia version inside the pom.xml of a module is upgraded, it could lead to some errors on the build. Specially when automatic tests are active. The error(s) are spring errors, beans cannot be instantiated like

org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'pathResolver' is defined


The problem comes from a version conflict. Usually, wrong commons-io version is used in junit. To overwrite it an additional dependency would be needed to commons-io in the version from the current Jahia. E.g. For Jahia it would be:


After adding the dependency, the tests should work as expected on the next built.