Skip to content

Instantly share code, notes, and snippets.

View sebargarcia's full-sized avatar

Sebastián Garcia sebargarcia

View GitHub Profile
wscld / replacejcenter.kts
Last active January 13, 2022 17:57
fix for deprecated jcenter dependencies: run ./gradlew assembleRelease --init-script ../init.gradle.kts
class ReplaceJCenter : Plugin<Gradle> {
override fun apply(gradle: Gradle) {
gradle.allprojects {
repositories {
all {
if (this !is MavenArtifactRepository || url.toString().contains("jcenter")) {
project.logger.lifecycle("Removing ${(this as? MavenArtifactRepository)?.url ?: name}...")
project.logger.lifecycle("Adding mavenCentral()")
bowenwr /
Created September 5, 2014 18:44
Jersey Pagination Example for Jersey Mailing List Request
public class HelperResource {
public static void setRequestOptions(ContainerRequestContext requestContext, RequestOptions requestOptions) {
requestContext.setProperty("requestOptions", requestOptions);
public static boolean isBodyRequested(ContainerRequestContext requestContext) {
// Do not return a body for head methods, but we might want to calculate paging / headers, etc.
// For now this is getting rewritten as GET by Jersey, but it might be changed later: