we are migrating gamification plug-in from jive 7 to jive 8.
we have created common macros that will use in all jive pages.
As per our understanding, jive-macros.ftl file contains all common macros. Hence we need to add all that macros in to jive-macro.ftl file.
In jive 7 we did following steps
1. Created new jive-macros.ftl file with all required common macros,
2. Included default jive-macros.ftl file in it using <#include "/template/global/include/jive-macros.ftl"/> code
3 Load that new macro file by extending com.jivesoftware.community.web.struts.JiveFreemarkerManager class and overriding configureDefaultConfiguration method
4. Import new macro file using configuration.addAutoImport("jive", "/plugins/toolkit/resources/templates/global/include/jive-macros.ftl"); code.
This is working in jive 7, But in jive 8 we are getting following exception :
java.io.FileNotFoundException: Template "/plugins/toolkit/resources/templates/global/include/jive-macros.ftl" not found. The quoted name was interpreted by this template loader: org.apache.struts2.views.freemarker.FreemarkerThemeTemplateLoader@54ed6b53.
while debugging free-marker code I found that it imports jive-macros.ftl source file for two purpose :
1. loading the login page.
2. Applying decorator.
we are getting error while importing jive-macros.ftl file for decorator.
As per my analysis, In jive-7 to achieve above purposes, 4 template loaders have used and com.jivesoftware.community.web.struts.PluginTemplateLoader loads "/plugins/toolkit/resources/templates/global/include/jive-macros.ftl", but in jive 8 only to load login page same 4 template loaders have used but to apply decorator only two template loaders (WebappTemplateLoader,StrutsClassTemplateLoader)are used.
Note: we have followed standard jive-8 plug-in directory structure.
If I change jive-8 plug-in output directory structure by producing jive-macros.ftl file in "classes/plugins/toolkit/resources/templates/global/include/jive-macros.ftl" then it locates jive-macros.ftl file correctly, but I think this is not the correct way... please confirm.
Please help me to resolve this issue.