def build_filename(artifact_id, version, extension, classifier=None):
    """
    Return a filename for a Maven artifact built from its coordinates.
    """
    extension = extension or ''
    classifier = classifier or ''
    if classifier:
        classifier = f'-{classifier}'
    return f'{artifact_id}-{version}{classifier}.{extension}'