Ray Augé:
Why can't you expect it to be in the PATH?
This is an environment variable design for exactly that purpose.
But really, this is going beyond a problem with Liferay. You're making some assumptions on the host system anyway. What if there IS no "diff" installed (windows)! How will your plugin deal with that?
I would expect the tool to be on the PATH. I guess I don't know how to write up the liferay-plugin-package.properties file w/ the security-manager-xxx values to indicate that I'm going to read/exec "diff" for example; right now it looks like I'd have to know the actual path to where the tool would be on someone else's system and specify a full path for the security-manager properties...
Then there's the whole "diff" vs "diff.exe" thing (where windows would run from the command line "diff", but actually executes "diff.exe" or "diff.bat" or even "diff.cmd"), where I have no real idea what platform someone might be running Liferay on (wasn't zOS supported at one point
)...
As far as diff not being available, if I were putting such a plugin in the marketplace I'd include, in the description, that the tool needs to have some version of diff installed; if the end user doesn't have diff and installs my plugin and it results in "portlet is not available", well who is really to blame?
I'm certainly not trying to make things hard. I'm just looking to specify in security-manager properties that I'm going to invoke some command, whether "java" or "diff" or "xxx" and that PACL would know that I'm trying to run an app that must be in the PATH and may or may not have some system-dependent extension, and that all of these possibilities are okay because the plugin indicates it needs that access, and the admin can determine whether or not they will install the plugin.
Please sign in to flag this as inappropriate.