Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy Portlet Projects #2

Closed
crisp2u opened this issue Jul 17, 2015 · 3 comments
Closed

Deploy Portlet Projects #2

crisp2u opened this issue Jul 17, 2015 · 3 comments

Comments

@crisp2u
Copy link

crisp2u commented Jul 17, 2015

Hi, any idea if this should work also on the static js content coming from a portlet in a portlet project ? I tried to add a new task to copy also js files from portlets but liferay somehow caches them.

@emiloberg
Copy link
Owner

I'd very much recommend using JRebel for that kind of stuff. It has a price tag but it's really worth it.

However. To answer your question: Maybe, I don't really know. You might want to try this:

First, make sure your portal-ext.properties has all the "developer settings" to make sure you cache as little as possible. Copy something along these lines into your portal-ext.properties.

theme.css.fast.load=false
theme.images.fast.load=false
javascript.fast.load=false
javascript.log.enabled=false
layout.template.cache.enabled=false
browser.launcher.url=
freemarker.engine.cache.storage=soft:1
freemarker.engine.modification.check.interval=0
openoffice.cache.enabled=false
velocity.engine.resource.manager.cache.enabled=false
com.liferay.portal.servlet.filters.cache.CacheFilter=false
com.liferay.portal.servlet.filters.themepreview.ThemePreviewFilter=true
yui.compressor.js.verbose=true
yui.compressor.css.line.break=1
velocity.engine.restricted.classes=
velocity.engine.restricted.variables=
freemarker.engine.restricted.classes=
freemarker.engine.restricted.variables=

If that's not working. You might want to touch (or any other way) update the portlet's WEB-INF/web.xml to trigger a redeploy. Try doing a change, copy the files to the server and then edit the web.xml on the server (just change some non-breaking value) and see if that triggers a redeploy. If so, then you can modify the

It's pretty much what this script is doing when you're changing a scss file - it updates the custom.css so that Liferay understands that it has changed. See: https://github.com/emiloberg/Liferay-Instant-Deploy-Theme-Changes-Gulp-Script/blob/master/gulpfile.js#L44-L49

But as said: JRebel is the way to go. Not waiting for redeploys will get you those $365 back in no time. (Disclosure: I'm not affiliated with JRebel in any way, actually not using it myself as I don't do portlet programming. However, all my "real" ;) programmers are.)

@emiloberg
Copy link
Owner

Closing because of inactivity.

@crisp2u
Copy link
Author

crisp2u commented Sep 13, 2015

Thanks, I'm using it myself, but I was trying to find a solution for other front-end guys that we have working with liferay :-) Especially that most of them don't use "real" Java IDEs :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants