I would check if your variable is set - try running
you can also do:
env | sort
to see all variables set.
if that produces output, then your problem is not with Jenkins but with shell scripting. If it does not produce output, your problem is setting the env variables from parameters. I have not used Freestyle jobs in eons, not sure how to do it, but I am sure there is a way.
If it is a shell problem and your COMPONENTS holds whitespace separate list with no whitespaces inside it - this should work in most shells (no need to play games with subshells):