Build fails when using a proxy server

If you use a proxy server, you must configure Maximo Anywhere to work with the proxy server.

Procedure

  1. Open a command prompt, ping the proxy server, and make a note of the proxy host and port number.
  2. Open a command prompt, and change directory to the <install_home>\AnywhereAppCntr directory.
  3. Run the following commands:
    If your proxy server does not require a username and password, run the following commands:
    • npm config set proxy http://<proxyhost>:<port>
    • npm config set https-proxy http://<proxyhost>:<port>
    If your proxy server requires a username and password, run the following commands:
    • npm config set proxy http://<username>:password@<proxyhost>:<port>
    • npm config set https-proxy http://<username>:password@<proxyhost>:<port>
  4. In the <install_home>\AnywhereAppCntr\scripts\internal\android directory, open the gradle.properties file in a text editor.
  5. Add the following properties, along with the relevant values for your environment, to the gradle.properties file:
     systemProp.http.proxyHost=
     systemProp.http.proxyPort=
     systemProp.https.proxyHost=
     systemProp.https.proxyPort=
     systemProp.http.proxyUser=
     systemProp.http.proxyPassword=
    You can remove the proxyUser and proxyPassword properties if your environment does not require them.
  6. Open Android Studio to download and install the required android SDKs.
  7. Navigate to Configure > SDK Manager > System Settings > HTTP Proxy.