Developer Jahia 7.3 Jahia 8 Legacy

How to embed a jar in a module?


After updating a module Jahia not able to resolve the classpath at runtime,  

java.lang.NoClassDefFoundError: com/mycompany/ums/security/CanadaUserService


Jahia is not able to find the missing classes.


First, you need to upload the missing jar to the maven repository.

mvn install:install-file -Dfile=[yourjar.jar] -DgroupId=com.mycompagny -DartifactId=YourLib -Dversion=1.1.6 -Dpackaging=jar -DgeneratePom=true

Then add the following dependency in your pom.xml 


This will add automatically your jar in your Jahia module when building.