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