@task
def jar(ctx, jython_version='2.7.0', pyyaml_version='3.11', remove_dist=False):
    "Create JAR distribution.\n\n    Downloads Jython JAR and PyYAML if needed.\n\n    Args:\n        jython_version: Jython version to use as a base. Must match version in\n            `jython-standalone-<version>.jar` found from Maven central.\n        pyyaml_version: Version of PyYAML that will be included in the\n            standalone jar. The version must be available from PyPI.\n        remove_dist:  Control is 'dist' directory initially removed or not.\n    "
    clean(ctx, remove_dist, create_dirs=True)
    jython_jar = get_jython_jar(jython_version)
    print(f"Using '{jython_jar}'.")
    compile_java_files(ctx, jython_jar)
    unzip_jar(jython_jar)
    copy_robot_files()
    pyaml_archive = get_pyyaml(pyyaml_version)
    extract_and_copy_pyyaml_files(pyyaml_version, pyaml_archive)
    compile_python_files(ctx, jython_jar)
    version = Version(path=VERSION_PATH, pattern=VERSION_PATTERN)
    create_robot_jar(ctx, str(version))
Create JAR distribution.

Downloads Jython JAR and PyYAML if needed.

Args:
    jython_version: Jython version to use as a base. Must match version in
        `jython-standalone-<version>.jar` found from Maven central.
    pyyaml_version: Version of PyYAML that will be included in the
        standalone jar. The version must be available from PyPI.
    remove_dist:  Control is 'dist' directory initially removed or not.
@task
def jar(ctx, jython_version='2.7.0', pyyaml_version='3.11', remove_dist=False):
    "Create JAR distribution.\n\n    Downloads Jython JAR and PyYAML if needed.\n\n    Args:\n        jython_version: Jython version to use as a base. Must match version in\n            `jython-standalone-<version>.jar` found from Maven central.\n        pyyaml_version: Version of PyYAML that will be included in the\n            standalone jar. The version must be available from PyPI.\n        remove_dist:  Control is 'dist' directory initially removed or not.\n    "
    clean(ctx, remove_dist, create_dirs=True)
    jython_jar = get_jython_jar(jython_version)
    print(f"Using '{jython_jar}'.")
    compile_java_files(ctx, jython_jar)
    unzip_jar(jython_jar)
    copy_robot_files()
    pyaml_archive = get_pyyaml(pyyaml_version)
    extract_and_copy_pyyaml_files(pyyaml_version, pyaml_archive)
    compile_python_files(ctx, jython_jar)
    version = Version(path=VERSION_PATH, pattern=VERSION_PATTERN)
    create_robot_jar(ctx, str(version))