def parse_config_opts(args):
    curr = args[:]
    curr.reverse()
    config_list = []
    args_list = []
    jars_list = []
    artifacts_list = []
    artifact_repositories_list = []
    maven_local_repository_dir = None
    proxy_url = None
    proxy_username = None
    proxy_password = None
    while (len(curr) > 0):
        token = curr.pop()
        if (token == '-c'):
            config_list.append(curr.pop())
        elif (token == '--config'):
            global CONFFILE
            CONFFILE = curr.pop()
        elif (token == '--jars'):
            jars_list.extend(curr.pop().split(','))
        elif (token == '--artifacts'):
            artifacts_list.extend(curr.pop().split(','))
        elif (token == '--artifactRepositories'):
            artifact_repositories_list.extend(curr.pop().split(','))
        elif (token == '--mavenLocalRepositoryDirectory'):
            maven_local_repository_dir = curr.pop()
        elif (token == '--proxyUrl'):
            proxy_url = curr.pop()
        elif (token == '--proxyUsername'):
            proxy_username = curr.pop()
        elif (token == '--proxyPassword'):
            proxy_password = curr.pop()
        else:
            args_list.append(token)
    return (config_list, jars_list, artifacts_list, artifact_repositories_list, maven_local_repository_dir, proxy_url, proxy_username, proxy_password, args_list)
def parse_config_opts(args):
    curr = args[:]
    curr.reverse()
    config_list = []
    args_list = []
    jars_list = []
    artifacts_list = []
    artifact_repositories_list = []
    maven_local_repository_dir = None
    proxy_url = None
    proxy_username = None
    proxy_password = None
    while (len(curr) > 0):
        token = curr.pop()
        if (token == '-c'):
            config_list.append(curr.pop())
        elif (token == '--config'):
            global CONFFILE
            CONFFILE = curr.pop()
        elif (token == '--jars'):
            jars_list.extend(curr.pop().split(','))
        elif (token == '--artifacts'):
            artifacts_list.extend(curr.pop().split(','))
        elif (token == '--artifactRepositories'):
            artifact_repositories_list.extend(curr.pop().split(','))
        elif (token == '--mavenLocalRepositoryDirectory'):
            maven_local_repository_dir = curr.pop()
        elif (token == '--proxyUrl'):
            proxy_url = curr.pop()
        elif (token == '--proxyUsername'):
            proxy_username = curr.pop()
        elif (token == '--proxyPassword'):
            proxy_password = curr.pop()
        else:
            args_list.append(token)
    return (config_list, jars_list, artifacts_list, artifact_repositories_list, maven_local_repository_dir, proxy_url, proxy_username, proxy_password, args_list)