[ https://issues.apache.org/jira/browse/CONNECTORS-388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13188697#comment-13188697 ]
Piergiorgio Lucidi commented on CONNECTORS-388: ----------------------------------------------- Started to work on this issue (r1233061). I imported Apache Velocity in the lib folder and in the build files (Ant and Maven), all the new dependencies are the following: * antlr * avalon * jdom * maven-ant-tasks * oro * werken-xpath I had to update the Commons Collections dependencies from 2.1 to 3.2.1 that is required in Velocity because it uses new classes introduced in the third version of the library. I updated the org.apache.manifoldcf.core.i18n.Messages class adding the new method that must be used for all the connectors that must use Velocity (outputResourceWithVelocity). I started to work on the CMIS Connector, that's why I updated the org.apache.manifoldcf.crawler.connectors.cmis.Message class that is related to the specific connector. To conform other connectors, it is only needed to change the method outputResource to the new one outputResourceWithVelocity. And it is needed to conform all the templates JS and HTML changing all the replacer from "${something:A}" to "$something:A", this because Velocity has a different way to use replacers for parameters. Now I have a problem to get load the HTML template in Velocity, in the Messages class we have: {code} StringWriter stringWriter = new StringWriter(); try { Velocity.mergeTemplate(resourceLoaderPath, "UTF-8", context, stringWriter); } catch (Exception e) { throw new ManifoldCFException(e.getMessage(),e); } {code} It seems that Velocity doesn't find for some reasons the template in the classpath, notice that I'm using the ClasspathResourceLoader that is used for this specific need: {code} Properties properties = new Properties(); properties.setProperty(VelocityEngine.RESOURCE_LOADER, "classpath"); properties.setProperty("classpath."+VelocityEngine.RESOURCE_LOADER+".class", ClasspathResourceLoader.class.getName()); {code} So I think that we need only to solve this issue about classpath loading and we have done! Any hints? > Upgrade the Crawler UI framework with Apache Velocity > ----------------------------------------------------- > > Key: CONNECTORS-388 > URL: https://issues.apache.org/jira/browse/CONNECTORS-388 > Project: ManifoldCF > Issue Type: Improvement > Components: Framework core > Affects Versions: ManifoldCF 0.3 > Reporter: Piergiorgio Lucidi > Assignee: Piergiorgio Lucidi > Original Estimate: 72h > Remaining Estimate: 72h > > We have to try to upgrade the UI Crawler using Apache Velocity that a good > solution that could fit with Manifold implementation. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira