tools/bzl/maven_jar.bzl
def _maven_release(ctx, parts):
    """induce jar and url name from maven coordinates."""
    if len(parts) not in [3, 4]:
        fail('%s:\nexpected id="groupId:artifactId:version[:classifier]"' %
             ctx.attr.artifact)
    if len(parts) == 4:
        group, artifact, version, classifier = parts
        file_version = version + "-" + classifier
    else:
        group, artifact, version = parts
        file_version = version

    jar = artifact.lower() + "-" + file_version
    url = "/".join([
        ctx.attr.repository,
        group.replace(".", "/"),
        artifact,
        version,
        artifact + "-" + file_version,
    ])

    return jar, url
induce jar and url name from maven coordinates.
induce jar and url name from maven coordinates.
induce jar and url name from maven coordinates .
def _maven_release(ctx, parts):
    if len(parts) not in [3, 4]:
        fail('%s:\nexpected id="groupId:artifactId:version[:classifier]"' %
             ctx.attr.artifact)
    if len(parts) == 4:
        group, artifact, version, classifier = parts
        file_version = version + "-" + classifier
    else:
        group, artifact, version = parts
        file_version = version
    jar = artifact.lower() + "-" + file_version
    url = "/".join([
        ctx.attr.repository,
        group.replace(".", "/"),
        artifact,
        version,
        artifact + "-" + file_version,
    ])
    return jar, url
def _maven_release ( ctx , parts ) : if len ( parts ) not in [ 3 , 4 ] : fail ( '%s:\nexpected id="groupId:artifactId:version[:classifier]"' % ctx . attr . artifact ) if len ( parts ) == 4 : group , artifact , version , classifier = parts file_version = version + "-" + classifier else : group , artifact , version = parts file_version = version jar = artifact . lower ( ) + "-" + file_version url = "/" . join ( [ ctx . attr . repository , group . replace ( "." , "/" ) , artifact , version , artifact + "-" + file_version , ] ) return jar , url
induce jar and url name from maven coordinates.
induce jar and url name from maven coordinates .
"""induce jar and url name from maven coordinates."""
ctx
parts