@classmethod
def create_java_libraries(cls, parse_context):

    def real_create_java_libraries(base_name, org='com.twitter', provides_java_name=None, provides_scala_name=None):

        def provides_artifact(provides_name):
            if (provides_name is None):
                return None
            jvm_repo = cls.Repository(name='maven-central', url='http://maven.example.com', push_db_basedir=os.path.join('build-support', 'ivy', 'pushdb'))
            return parse_context.create_object('artifact', org=org, name=provides_name, repo=jvm_repo)
        parse_context.create_object('java_library', name='{}-java'.format(base_name), provides=provides_artifact(provides_java_name))
        parse_context.create_object('scala_library', name='{}-scala'.format(base_name), provides=provides_artifact(provides_scala_name))
    return real_create_java_libraries
@classmethod
def create_java_libraries(cls, parse_context):

    def real_create_java_libraries(base_name, org='com.twitter', provides_java_name=None, provides_scala_name=None):

        def provides_artifact(provides_name):
            if (provides_name is None):
                return None
            jvm_repo = cls.Repository(name='maven-central', url='http://maven.example.com', push_db_basedir=os.path.join('build-support', 'ivy', 'pushdb'))
            return parse_context.create_object('artifact', org=org, name=provides_name, repo=jvm_repo)
        parse_context.create_object('java_library', name='{}-java'.format(base_name), provides=provides_artifact(provides_java_name))
        parse_context.create_object('scala_library', name='{}-scala'.format(base_name), provides=provides_artifact(provides_scala_name))
    return real_create_java_libraries