private static Proxy getProxy(final String host, final String userPass) {
        if (host == null) {
            return null;
        }

        URL hostUrl = parseHostString(host);
        if (userPass != null) {
            String[] userSettings = parseProxyCredentials(userPass);
            AuthenticationBuilder authBuilder = new AuthenticationBuilder()
                    .addUsername(userSettings[0])
                    .addPassword(userSettings[1]);
            return new Proxy(hostUrl.getProtocol(), hostUrl.getHost(), hostUrl.getPort(), authBuilder.build());
        } else {
            return new Proxy(hostUrl.getProtocol(), hostUrl.getHost(), hostUrl.getPort());
        }

    }
@param cacheLocation Maven local cache location.
smithy-cli/src/main/java/software/amazon/smithy/cli/dependencies/MavenDependencyResolver.java