Setting proxy for maven on remote host

I’m trying to run a task using maven. However, my machine is behind a proxy and therefore I need to set it before executing my mvn command.
I tried setting the proxy values in environment but it doesn’t work. Any idea how to resolve this ?

Thanks

Here is my task snippet.

I don’t think maven respects the http_proxy* environment vars, but needs specific configuration.

http://maven.apache.org/guides/mini/guide-proxies.html