Ionic build android Fail, behindo Corporate proxy


#1

Hello people.
I’m a few days trying to make the Ionic operate by proxy the company that work, but without successo, always fails in charge “ionic build android” accusing authentication error in the proxy when attempting to download the ‘gradle-1.5.0.pom’:

Below the exit of Ionic commands.

Thank you

(08:22:42) <USERNAME>@<HOST>:~/Desenvolvimento/Ionic -> PROXY=http://<USERPROXY>:<PASSPROXY>@<IPPROXY>:3128 ionic start myApp tabs
 ✗ (node:3130) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
Creating Ionic app in folder /home/<USERNAME>/Desenvolvimento/Ionic/myApp based on tabs project
Downloading: https://github.com/driftyco/ionic-app-base/archive/master.zip
[=============================]  100%  0.0s
Downloading: https://github.com/driftyco/ionic-starter-tabs/archive/master.zip
[=============================]  100%  0.0s
Updated the hooks directory to have execute permissions
Update Config.xml
Initializing cordova project

♬ ♫ ♬ ♫  Your Ionic app is ready to go! ♬ ♫ ♬ ♫

Make sure to cd into your new app directory:
  cd myApp

To run your app in the browser (great for initial development):
  ionic serve

To run on iOS:
  ionic run ios

To run on Android:
  ionic run android

To test your app on a device easily, try Ionic View:
  http://view.ionic.io

New! Add push notifications, live app updates, and more with Ionic Platform!
  https://apps.ionic.io/signup


+---------------------------------------------------------+
+ Extra! Extra! Fresh Ionic updates for June 2016
+
+ Ionic 2 Beta is out! Try the next generation of Ionic
+ http://ionicframework.com/docs/v2/getting-started/installation/
+
+ Test and share your Ionic apps easily with Ionic View
+ http://view.ionic.io
+
+ Building enterprise apps? Ionic Enterprise Framework comes with the support and features you need
+ http://ionic.io/enterprise
+
+---------------------------------------------------------+



(08:24:29) <USERNAME>@<HOST>:~/Desenvolvimento/Ionic -> cd myApp/
(08:24:48) <USERNAME>@<HOST>:~/Desenvolvimento/Ionic/myApp -> PROXY=http://<USERPROXY>:<PASSPROXY>@<IPPROXY>:3128 ionic platform add android
 ✗ (node:3369) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
Updated the hooks directory to have execute permissions
Downloading Default Ionic Resources
 ✗ (node:3369) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
Downloading: https://github.com/driftyco/ionic-default-resources/archive/master.zip
[=============================]  100%  0.0s
Done adding default Ionic resources
Adding icons for platform: android
Adding android project...
Creating Cordova project for the Android platform:
        Path: platforms/android
        Package: com.ionicframework.myapp572502
        Name: myApp
        Activity: MainActivity
        Android target: android-23
Android project created with cordova-android@5.1.1
Installing "cordova-plugin-console" for android
Installing "cordova-plugin-device" for android
Installing "cordova-plugin-splashscreen" for android
Installing "cordova-plugin-statusbar" for android
Installing "cordova-plugin-whitelist" for android

               This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.
          
Installing "ionic-plugin-keyboard" for android
Running command: /home/<USERNAME>/Desenvolvimento/Ionic/myApp/hooks/after_prepare/010_add_platform_class.js /home/<USERNAME>/Desenvolvimento/Ionic/myApp
add to body class: platform-android
Saving platform to package.json file
(08:25:04) <USERNAME>@<HOST>:~/Desenvolvimento/Ionic/myApp -> 


(08:25:54) <USERNAME>@<HOST>:~/Desenvolvimento/Ionic/myApp -> PROXY=http://<USERPROXY>:<PASSPROXY>@<IPPROXY>:3128 ionic build android
 ✗ (node:3500) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
Running command: /home/<USERNAME>/Desenvolvimento/Ionic/myApp/hooks/after_prepare/010_add_platform_class.js /home/<USERNAME>/Desenvolvimento/Ionic/myApp
add to body class: platform-android
ANDROID_HOME=/home/<USERNAME>/Android/Sdk/
JAVA_HOME=/usr/lib/jvm/java-8-jdk

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':classpath'.
   > Could not resolve com.android.tools.build:gradle:1.5.0.
     Required by:
         :android:unspecified
      > Could not GET 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/1.5.0/gradle-1.5.0.pom'.
         > Connection to https://repo1.maven.org refused

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 2 mins 13.544 secs
Error: Error code 1 for command: /home/<USERNAME>/Desenvolvimento/Ionic/myApp/platforms/android/gradlew with args: cdvBuildDebug,-b,/home/<USERNAME>/Desenvolvimento/Ionic/myApp/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true
(08:28:12) <USERNAME>@<HOST>:~/Desenvolvimento/Ionic/myApp ->