async def METHOD_NAME(
    zip: ZipBinary,
    bash: BashBinary,
    touch: TouchBinary,
    jvm: JvmSubsystem,
    request: JvmResourcesRequest,
) -> FallibleClasspathEntry:
    # Request the component's direct dependency classpath, and additionally any prerequisite.
    # Filter out any dependencies that are generated by our current target so that each resource
    # only appears in a single input JAR.
    # NOTE: Generated dependencies will have the same dependencies as the current target, so we
    # don't need to inspect those dependencies.
    optional_prereq_request = [*((request.prerequisite,) if request.prerequisite else ())]
    fallibles = await MultiGet(
        Get(FallibleClasspathEntries, ClasspathEntryRequests(optional_prereq_request)),
        Get(FallibleClasspathEntries, ClasspathDependenciesRequest(request, ignore_generated=True)),
    )
    direct_dependency_classpath_entries = FallibleClasspathEntries(
        itertools.chain(*fallibles)
    ).if_all_succeeded()
    if direct_dependency_classpath_entries is None:
        return FallibleClasspathEntry(
            description=str(request.component),
            result=CompileResult.DEPENDENCY_FAILED,
            output=None,
            exit_code=1,
        )
    source_files = await Get(
        StrippedSourceFiles,
        SourceFilesRequest([tgt.get(SourcesField) for tgt in request.component.members]),
    )
    output_filename = f"{request.component.representative.address.path_safe_spec}.resources.jar"
    output_files = [output_filename]
    # #16231: Valid JAR files need the directories of each resource file as well as the files
    # themselves.
    paths = {Path(filename) for filename in source_files.snapshot.files}
    directories = {parent for path in paths for parent in path.parents}
    input_files = {str(path) for path in chain(paths, directories)}
    resources_jar_input_digest = source_files.snapshot.digest
    input_filenames = " ".join(shlex.quote(file) for file in sorted(input_files))
    resources_jar_result = await Get(
        ProcessResult,
        Process(
            argv=[
                bash.path,
                "-c",
                " ".join(
                    [
                        "TZ=UTC",
                        touch.path,
                        "-t 198001010000.00",
                        input_filenames,
                        "&&",
                        "TZ=UTC",
                        zip.path,
                        "-oX",
                        output_filename,
                        input_filenames,
                    ]
                ),
            ],
            description=f"Build resources JAR for {request.component}",
            input_digest=resources_jar_input_digest,
            output_files=output_files,
            level=LogLevel.DEBUG,
        ),
    )
    output_digest = resources_jar_result.output_digest
    cpe = ClasspathEntry(output_digest, output_files, [])
    merged_cpe_digest = await Get(
        Digest,
        MergeDigests(chain((cpe.digest,), (i.digest for i in direct_dependency_classpath_entries))),
    )
    merged_cpe = ClasspathEntry.merge(
        digest=merged_cpe_digest, entries=[cpe, *direct_dependency_classpath_entries]
    )
    return FallibleClasspathEntry(output_filename, CompileResult.SUCCEEDED, merged_cpe, 0)