java repo to rest