2

I'm building a new Liferay theme and being crushed by this problem.

When I make changes to the init_custom.vm, the only possible way for me to see the changes is to restart Tomcat. When I make other changes to my theme, such as editing my CSS or adding images, I can see the changes after deploying the theme via the Ant Deploy target. No such luck with the templates.

I checked the $CATALINA_HOME/webapps/my-theme/init_custom.vm after deploying, and that file does reflect my changes.

I cannot continue to develop if this is going to be the cycle. I must be able to make changes to the velocity template without requiring a restart. Any suggestions?

I'm using the Eclipse Liferay IDE and the Ant build to deploy my theme when I make changes. I'm using the Liferay 6.0.6 Tomcat bundle. I've also already added include-and-override=portal-developer.properties to my portal-ide.properties file.

Thanks!!!

(also asked this in the Liferay Forums, and I'll make sure to copy back any answers I get: http://www.liferay.com/community/forums/-/message_boards/message/11292911)

Prakash K
  • 11,669
  • 6
  • 51
  • 109
Rob Gonzalez
  • 579
  • 1
  • 6
  • 19
  • FYI: I've seen http://stackoverflow.com/questions/5567742/how-to-edit-a-velocimacro-without-restarting-velocity and http://stackoverflow.com/questions/7298396/velocity-template-auto-reload-doesnt-work and they did not work for me. Upgrading to 6.1 beta did, for some reason, work. – Rob Gonzalez Nov 02 '11 at 22:10
  • I switched to the 6.1 Beta and do not have the problem on that release, so it was just with 6.0.6... – Rob Gonzalez Nov 23 '11 at 00:14
  • So if I may request, can you answer your own question and accept it? Thanks – Prakash K Jul 27 '12 at 09:55

2 Answers2

1

Liferay also caches everything Velocity related which sometimes can present itself in the way you describe: changes to templates don't seem to show unless you restart Liferay. You can turn off this behavior if you set the following property in your portal-ext.properties file:

velocity.engine.resource.manager.cache.enabled=false
fimez
  • 408
  • 3
  • 14
0

I switched to the 6.1 Beta and do not have the problem on that release, so it was just with 6.0.6.

Also: I've seen How to edit a velocimacro without restarting velocity? and Testing JSON API in Rails 3.2 using rspec using exact PUT/POST bodies as Backbone would send and they did not work for me. Upgrading to 6.1 beta did, for some reason, work.

Community
  • 1
  • 1
Rob Gonzalez
  • 579
  • 1
  • 6
  • 19