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 126.96.36.199 it would be:
<dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>2.8.0</version> <scope>provided</scope> </dependency>
After adding the dependency, the tests should work as expected on the next built.