Building cordova when you are behind a proxy

When I try to build the cordova android version, I got the following error:

   > Could not GET
   'https://repo1.maven.org/maven2/com/facebook/android/facebook-android-sdk/maven-metadata.xml'.
   > Connection to https://repo1.maven.org refused
   > Failed to list versions for com.facebook.android:facebook-android-sdk.
   > Unable to load Maven meta-data from
   https://download.01.org/crosswalk/releases/crosswalk/android/maven2/com/facebook/android/facebook-android-sdk/maven-m
etadata.xml.

This is because I am behind a proxy. I set the proxy server in the environment settings and in my windows system settings. The cordova plugins are downloaded correctly.