Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Does the scripting engine in 7.1 no longer support anything but Groovy
Hi,
When I compare the Liferay Scripting documentation of 7.0 and 7.1, I noticed 7.1 no longer mentions how to install Javascript, Beanshell, ... Only Groovy is mentioned.
https://dev.liferay.com/es/discover/portal/-/knowledge_base/7-0/using-liferays-script-engine versus https://dev.liferay.com/es/discover/portal/-/knowledge_base/7-1/using-liferays-script-engine
On github, the JavaScriptExecutor.java class is marked as "@deprecated As of Judson (7.1.x), with no direct replacement".
If this is truly the case, it would be nice to make this clearer in the documentation. We are currently developing on 7.0 and use Javascript scripts for setup of environments ( and have been since 6.1). There's no point in continuing with Javascript if it will no longer be supported.
I did not find any of the scripting modules on Marketplace as mentioned in 7.0 documentation (perhaps I overlooked) ?
Nothing on https://dev.liferay.com/es/discover/deployment/-/knowledge_base/7-1/deprecated-apps-in-7-1-what-to-do nor on https://dev.liferay.com/es/develop/reference/-/knowledge_base/7-1/breaking-changes.
Thanks for any help,
Aldo.
Looks like you can download these as OSGi modules from the Maven Repo and deploy through the /deploy folder. For example I deployed com.liferay.portal.scripting.javascript-3.0.7.jar from https://mvnrepository.com/artifact/com.liferay/com.liferay.portal.scripting.javascript/3.0.7 into DXP 7.1 and I now see JavaScript listed on Server Administration > Scripts > Language list.
Thanks for your answer. That is what I am already doing for 7.0. But the fact that the documentation no longer mentions it AND that it is marked deprecated does have me worried for the future.
At least it will still work in 7.1.
In case someone is interested, I have found more info in the Customer Knowledge Base and the following have been officially removed from Liferay in 7.0:
- Beanshell Scripting
- Javascript Scripting
- Python Scripting
- Ruby Scripting
So even if they still function today, there is no guarantee for the future.
This means we'll eventually have to switch to Groovy for all our (installation) scripting.