-
-
Notifications
You must be signed in to change notification settings - Fork 930
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
SAK-14142 Allow Velocity tools to work when webapps aren't expanded. #918
Conversation
The portal previously required that the WARs were all unpacked, this allows it to serve it’s content from a WAR that hasn’t been expanded.
Rather than requiring that WARs be unpacked into the filesystem, this allows the templates to be loaded directly from the webapp. We use the webapp loaded from the velocity tools project.
this is so they load their templates through the webapp and don't assume the webapps are unpacked. They had their own class for loading velocity templates which is very similar to the one in the velocity tools.
I don't completely understand this change, but I trust Matthew. @ern any concerns? |
You can ask Tomcat not to unpack WARs when it deploys them, but some of the code in Sakai assumed that the WARs were always unpacked and so would attempt to load the files directly off disk, this would fail. In all those cases there is an alternative way to get at the contents of the file. |
I personally don't have any opinion on this, mostly because I generally use the sakai:deploy-exploded goal anyway (SMP-19) and won't have war files. I also like being able to modify vm files in-place and have them exploded. Will this still work in that case if there are no war files? |
@jonespm Good point, just cleaned out my webapps directory and sakai:deploy-exploded to check and it all seems to work fine (startup and tools). However I don't think live reloading on VM used to work as they are all set to be cached forever (0). |
Ah, no 0 means check every time. https://velocity.apache.org/engine/releases/velocity-1.5/developer-guide.html#resourceloaders |
And editing in exploded webapp works fine. |
Thanks for checking, I'm fine with it if it still works with exploded wars too |
Yeah I am with Matt I use the deploy-exlpoded goal as well but maybe someone out there wants to use this! |
SAK-14142 Allow Velocity tools to work when webapps aren't expanded.
Cheers for looks over it. |
…4151-saving-an-assignment-draft-multiple to release/12.0.08.0 * commit '5cebf67a6fcb701c02fd58d242e6fe5c7484533a': SAKAI-4151 Only save feedback attachments property if not blank
Although this isn't recommended in the Tomcat 8 deployment guide I don't see any harm in supporting running without unpacking the webapps.
This also cleans up some of the use of velocity to use the velocity tools JAR, rather than using copy of the file.