I have a .vm template:
#set($padSize = 0) >$stringUtils.leftPad($i18n.getText("common.concepts.key"), $padSize): ${issue.getKey()} >$stringUtils.leftPad($i18n.getText("common.concepts.url"), $padSize): ${baseurl}/browse/${issue.getKey()} >$stringUtils.leftPad($i18n.getText("common.concepts.project"), $padSize): $issue.getProject().name >$stringUtils.leftPad($i18n.getText("common.concepts.issuetype"), $padSize): $issue.getIssueTypeObject().getNameTranslation($i18n) #if ($issue.reporterUser) >$stringUtils.leftPad($i18n.getText("issue.field.reporter"), $padSize): $!issue.reporterUser.fullName #end #if ($issue.assigneeUser) >$stringUtils.leftPad($i18n.getText("issue.field.assignee"), $padSize): $!issue.assigneeUser.fullName #end #if ($issue.getPriorityObject() && $issue.getPriorityObject().getId() != $constantsManager.getDefaultPriority().getString("id")) >$stringUtils.leftPad($i18n.getText("issue.field.priority"), $padSize): $issue.getPriorityObject().getNameTranslation($i18n) #end #if ($attachments && $attachments.size() >0) >$stringUtils.leftPad($i18n.getText("template.attachments"), $padSize): #foreach ($attachment in $attachments)$attachment.getFilename()#if ($velocityCount != $attachments.size()), #end#end > #end > $!{velocityhelper.quote($!issue.description)}
It is being parsed by another template:
#parse("templates/email/text/includes/issuesummarymin.vm")
It appears to be cached however, and the following settings have no effect for Velocity-parsed templates:
class.resource.loader.cache=false velocimacro.library.autoreload=true
Is there a way for me to get the .vm file reparsed by Velocity so the template edits appear, without doing a restart?
It should reparse the velocity template when you make edits. Does your project run from a target directory? Double check that the file is being copied over correctly to whichever directory you are running the project from. Also, is your browser doing some strange caching? Sometimes I find when I'm redoing the same template a lot my browser caches it and even with a hard page refresh maintains the old copy.
Hi Stacey, thank you for the response. The issue is that Velocity itself is caching files that have been parsed using the #parse() directive within a template. So the main template (that's calling on #parse() for another template, like an include file) is updating (no issues with browser caching here), but it stubbornly refuses to reparse the "included" #parse()ed templates. Does that make sense?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you tried touching the main template?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.