From b9a6a9b6ce80f38410cacc41fbdc56d16f36cda1 Mon Sep 17 00:00:00 2001 From: xhh Date: Thu, 18 Feb 2016 20:17:42 +0800 Subject: [PATCH 1/3] Java: add getter/setter for ApiClient#objectMapper and ApiClient#httpClient as well. Closes #2134 --- .../main/resources/Java/ApiClient.mustache | 109 ++++++++++------ .../java/io/swagger/client/ApiClient.java | 117 ++++++++++++------ 2 files changed, 150 insertions(+), 76 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/Java/ApiClient.mustache b/modules/swagger-codegen/src/main/resources/Java/ApiClient.mustache index 38792c39614..79da18933aa 100644 --- a/modules/swagger-codegen/src/main/resources/Java/ApiClient.mustache +++ b/modules/swagger-codegen/src/main/resources/Java/ApiClient.mustache @@ -49,7 +49,7 @@ public class ApiClient { private int connectionTimeout = 0; private Client httpClient; - private ObjectMapper mapper; + private ObjectMapper objectMapper; private Map authentications; @@ -59,24 +59,16 @@ public class ApiClient { private DateFormat dateFormat; public ApiClient() { - mapper = new ObjectMapper(); - mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); - mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); - mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); - mapper.registerModule(new JodaModule()); + objectMapper = new ObjectMapper(); + objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); + objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); + objectMapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); + objectMapper.registerModule(new JodaModule()); + objectMapper.setDateFormat(ApiClient.buildDefaultDateFormat()); - httpClient = buildHttpClient(debugging); - - // Use RFC3339 format for date and datetime. - // See http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14 - this.dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX"); - - // Use UTC as the default time zone. - this.dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); - - this.mapper.setDateFormat((DateFormat) dateFormat.clone()); + dateFormat = ApiClient.buildDefaultDateFormat(); // Set default User-Agent. setUserAgent("Java-Swagger"); @@ -88,6 +80,62 @@ public class ApiClient { authentications.put("{{name}}", new OAuth());{{/isOAuth}}{{/authMethods}} // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); + + rebuildHttpClient(); + } + + public static DateFormat buildDefaultDateFormat() { + // Use RFC3339 format for date and datetime. + // See http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14 + DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX"); + // Use UTC as the default time zone. + dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); + return dateFormat; + } + + /** + * Build the Client used to make HTTP requests with the latest settings, + * i.e. objectMapper and debugging. + * TODO: better to use the Builder Pattern? + */ + public ApiClient rebuildHttpClient() { + // Add the JSON serialization support to Jersey + JacksonJsonProvider jsonProvider = new JacksonJsonProvider(objectMapper); + DefaultClientConfig conf = new DefaultClientConfig(); + conf.getSingletons().add(jsonProvider); + Client client = Client.create(conf); + if (debugging) { + client.addFilter(new LoggingFilter()); + } + this.httpClient = client; + return this; + } + + /** + * Returns the current object mapper used for JSON serialization/deserialization. + *

+ * Note: If you make changes to the object mapper, remember to set it back via + * setObjectMapper in order to trigger HTTP client rebuilding. + *

+ */ + public ObjectMapper getObjectMapper() { + return objectMapper; + } + + public ApiClient setObjectMapper(ObjectMapper objectMapper) { + this.objectMapper = objectMapper; + // Need to rebuild the Client as it depends on object mapper. + rebuildHttpClient(); + return this; + } + + public Client getHttpClient() { + return httpClient; + } + + public ApiClient setHttpClient(Client httpClient) { + this.httpClient = httpClient; + return this; } public String getBasePath() { @@ -228,8 +276,8 @@ public class ApiClient { */ public ApiClient setDebugging(boolean debugging) { this.debugging = debugging; - // Rebuild HTTP Client according to the new "debugging" value. - this.httpClient = buildHttpClient(debugging); + // Need to rebuild the Client as it depends on the value of debugging. + rebuildHttpClient(); return this; } @@ -263,8 +311,10 @@ public class ApiClient { */ public ApiClient setDateFormat(DateFormat dateFormat) { this.dateFormat = dateFormat; - // also set the date format for model (de)serialization with Date properties - this.mapper.setDateFormat((DateFormat) dateFormat.clone()); + // Also set the date format for model (de)serialization with Date properties. + this.objectMapper.setDateFormat((DateFormat) dateFormat.clone()); + // Need to rebuild the Client as objectMapper changes. + rebuildHttpClient(); return this; } @@ -611,19 +661,4 @@ public class ApiClient { return encodedFormParams; } - - /** - * Build the Client used to make HTTP requests. - */ - private Client buildHttpClient(boolean debugging) { - // Add the JSON serialization support to Jersey - JacksonJsonProvider jsonProvider = new JacksonJsonProvider(mapper); - DefaultClientConfig conf = new DefaultClientConfig(); - conf.getSingletons().add(jsonProvider); - Client client = Client.create(conf); - if (debugging) { - client.addFilter(new LoggingFilter()); - } - return client; - } } diff --git a/samples/client/petstore/java/default/src/main/java/io/swagger/client/ApiClient.java b/samples/client/petstore/java/default/src/main/java/io/swagger/client/ApiClient.java index 7a4ed1a63b0..a8ab7a8f853 100644 --- a/samples/client/petstore/java/default/src/main/java/io/swagger/client/ApiClient.java +++ b/samples/client/petstore/java/default/src/main/java/io/swagger/client/ApiClient.java @@ -41,7 +41,7 @@ import io.swagger.client.auth.HttpBasicAuth; import io.swagger.client.auth.ApiKeyAuth; import io.swagger.client.auth.OAuth; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-12T18:48:10.013-08:00") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-18T20:04:40.386+08:00") public class ApiClient { private Map defaultHeaderMap = new HashMap(); private String basePath = "http://petstore.swagger.io/v2"; @@ -49,7 +49,7 @@ public class ApiClient { private int connectionTimeout = 0; private Client httpClient; - private ObjectMapper mapper; + private ObjectMapper objectMapper; private Map authentications; @@ -59,34 +59,86 @@ public class ApiClient { private DateFormat dateFormat; public ApiClient() { - mapper = new ObjectMapper(); - mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); - mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); - mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); - mapper.registerModule(new JodaModule()); + objectMapper = new ObjectMapper(); + objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); + objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); + objectMapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); + objectMapper.registerModule(new JodaModule()); + objectMapper.setDateFormat(ApiClient.buildDefaultDateFormat()); - httpClient = buildHttpClient(debugging); - - // Use RFC3339 format for date and datetime. - // See http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14 - this.dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX"); - - // Use UTC as the default time zone. - this.dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); - - this.mapper.setDateFormat((DateFormat) dateFormat.clone()); + dateFormat = ApiClient.buildDefaultDateFormat(); // Set default User-Agent. setUserAgent("Java-Swagger"); // Setup authentications (key: authentication name, value: authentication). authentications = new HashMap(); - authentications.put("api_key", new ApiKeyAuth("header", "api_key")); authentications.put("petstore_auth", new OAuth()); + authentications.put("test_api_client_id", new ApiKeyAuth("header", "x-test_api_client_id")); + authentications.put("test_api_client_secret", new ApiKeyAuth("header", "x-test_api_client_secret")); + authentications.put("api_key", new ApiKeyAuth("header", "api_key")); + authentications.put("test_api_key_query", new ApiKeyAuth("query", "test_api_key_query")); + authentications.put("test_api_key_header", new ApiKeyAuth("header", "test_api_key_header")); // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); + + rebuildHttpClient(); + } + + public static DateFormat buildDefaultDateFormat() { + // Use RFC3339 format for date and datetime. + // See http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14 + DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX"); + // Use UTC as the default time zone. + dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); + return dateFormat; + } + + /** + * Build the Client used to make HTTP requests with the latest settings, + * i.e. objectMapper and debugging. + * TODO: better to use the Builder Pattern? + */ + public ApiClient rebuildHttpClient() { + // Add the JSON serialization support to Jersey + JacksonJsonProvider jsonProvider = new JacksonJsonProvider(objectMapper); + DefaultClientConfig conf = new DefaultClientConfig(); + conf.getSingletons().add(jsonProvider); + Client client = Client.create(conf); + if (debugging) { + client.addFilter(new LoggingFilter()); + } + this.httpClient = client; + return this; + } + + /** + * Returns the current object mapper used for JSON serialization/deserialization. + *

+ * Note: If you make changes to the object mapper, remember to set it back via + * setObjectMapper in order to trigger HTTP client rebuilding. + *

+ */ + public ObjectMapper getObjectMapper() { + return objectMapper; + } + + public ApiClient setObjectMapper(ObjectMapper objectMapper) { + this.objectMapper = objectMapper; + // Need to rebuild the Client as it depends on object mapper. + rebuildHttpClient(); + return this; + } + + public Client getHttpClient() { + return httpClient; + } + + public ApiClient setHttpClient(Client httpClient) { + this.httpClient = httpClient; + return this; } public String getBasePath() { @@ -227,8 +279,8 @@ public class ApiClient { */ public ApiClient setDebugging(boolean debugging) { this.debugging = debugging; - // Rebuild HTTP Client according to the new "debugging" value. - this.httpClient = buildHttpClient(debugging); + // Need to rebuild the Client as it depends on the value of debugging. + rebuildHttpClient(); return this; } @@ -262,8 +314,10 @@ public class ApiClient { */ public ApiClient setDateFormat(DateFormat dateFormat) { this.dateFormat = dateFormat; - // also set the date format for model (de)serialization with Date properties - this.mapper.setDateFormat((DateFormat) dateFormat.clone()); + // Also set the date format for model (de)serialization with Date properties. + this.objectMapper.setDateFormat((DateFormat) dateFormat.clone()); + // Need to rebuild the Client as objectMapper changes. + rebuildHttpClient(); return this; } @@ -610,19 +664,4 @@ public class ApiClient { return encodedFormParams; } - - /** - * Build the Client used to make HTTP requests. - */ - private Client buildHttpClient(boolean debugging) { - // Add the JSON serialization support to Jersey - JacksonJsonProvider jsonProvider = new JacksonJsonProvider(mapper); - DefaultClientConfig conf = new DefaultClientConfig(); - conf.getSingletons().add(jsonProvider); - Client client = Client.create(conf); - if (debugging) { - client.addFilter(new LoggingFilter()); - } - return client; - } } From a892511b1f23cb47e28c4b3b52f83fbcca0c6dc6 Mon Sep 17 00:00:00 2001 From: xhh Date: Fri, 19 Feb 2016 13:24:16 +0800 Subject: [PATCH 2/3] Add missing libs to Java jersey2 client --- .../libraries/jersey2/build.gradle.mustache | 2 ++ .../Java/libraries/jersey2/pom.mustache | 21 +++++++++++++++++++ .../client/petstore/java/default/build.gradle | 2 ++ .../client/petstore/java/jersey2/README.md | 2 +- .../client/petstore/java/jersey2/build.gradle | 2 ++ samples/client/petstore/java/jersey2/pom.xml | 21 +++++++++++++++++++ 6 files changed, 49 insertions(+), 1 deletion(-) diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/build.gradle.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/build.gradle.mustache index 20b79fef22a..7cc850565d0 100644 --- a/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/build.gradle.mustache +++ b/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/build.gradle.mustache @@ -105,10 +105,12 @@ dependencies { compile "io.swagger:swagger-annotations:$swagger_annotations_version" compile "org.glassfish.jersey.core:jersey-client:$jersey_version" compile "org.glassfish.jersey.media:jersey-media-multipart:$jersey_version" + compile "org.glassfish.jersey.media:jersey-media-json-jackson:2.22.1" compile "com.fasterxml.jackson.core:jackson-core:$jackson_version" compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version" compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:2.1.5" compile "joda-time:joda-time:$jodatime_version" + compile "com.brsanthu:migbase64:2.2" testCompile "junit:junit:$junit_version" } diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/pom.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/pom.mustache index 76f2164a1ad..2b860a0d8ac 100644 --- a/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/pom.mustache +++ b/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/pom.mustache @@ -104,6 +104,27 @@ 1.6 + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + gradle-test + integration-test + + exec + + + gradle + + check + + + + + diff --git a/samples/client/petstore/java/default/build.gradle b/samples/client/petstore/java/default/build.gradle index 7bebf9164bb..9e7ac008009 100644 --- a/samples/client/petstore/java/default/build.gradle +++ b/samples/client/petstore/java/default/build.gradle @@ -108,7 +108,9 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-core:$jackson_version" compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version" + compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:2.1.5" compile "joda-time:joda-time:$jodatime_version" + compile "com.brsanthu:migbase64:2.2" testCompile "junit:junit:$junit_version" } diff --git a/samples/client/petstore/java/jersey2/README.md b/samples/client/petstore/java/jersey2/README.md index 473892d2321..930a4f28c55 100644 --- a/samples/client/petstore/java/jersey2/README.md +++ b/samples/client/petstore/java/jersey2/README.md @@ -20,7 +20,7 @@ mvn deploy Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information. -After the client libarary is installed/deployed, you can use it in your Maven project by adding the following to your *pom.xml*: +After the client library is installed/deployed, you can use it in your Maven project by adding the following to your *pom.xml*: ```xml diff --git a/samples/client/petstore/java/jersey2/build.gradle b/samples/client/petstore/java/jersey2/build.gradle index c3a9375c9e0..15d69a646ab 100644 --- a/samples/client/petstore/java/jersey2/build.gradle +++ b/samples/client/petstore/java/jersey2/build.gradle @@ -105,10 +105,12 @@ dependencies { compile "io.swagger:swagger-annotations:$swagger_annotations_version" compile "org.glassfish.jersey.core:jersey-client:$jersey_version" compile "org.glassfish.jersey.media:jersey-media-multipart:$jersey_version" + compile "org.glassfish.jersey.media:jersey-media-json-jackson:2.22.1" compile "com.fasterxml.jackson.core:jackson-core:$jackson_version" compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version" compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:2.1.5" compile "joda-time:joda-time:$jodatime_version" + compile "com.brsanthu:migbase64:2.2" testCompile "junit:junit:$junit_version" } diff --git a/samples/client/petstore/java/jersey2/pom.xml b/samples/client/petstore/java/jersey2/pom.xml index 6b0ba2cba08..6aaeae99c80 100644 --- a/samples/client/petstore/java/jersey2/pom.xml +++ b/samples/client/petstore/java/jersey2/pom.xml @@ -104,6 +104,27 @@ 1.6 + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + gradle-test + integration-test + + exec + + + gradle + + check + + + + + From 7296da7bc392fee64122bc582b0fe756b811ae0c Mon Sep 17 00:00:00 2001 From: xhh Date: Fri, 19 Feb 2016 17:48:59 +0800 Subject: [PATCH 3/3] Fix tests by upgrading libraries --- .../libraries/jersey2/build.gradle.mustache | 20 +++++++++---------- .../Java/libraries/jersey2/pom.mustache | 6 +++--- .../client/petstore/java/jersey2/build.gradle | 20 +++++++++---------- samples/client/petstore/java/jersey2/pom.xml | 6 +++--- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/build.gradle.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/build.gradle.mustache index 7cc850565d0..4ba5115aaf4 100644 --- a/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/build.gradle.mustache +++ b/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/build.gradle.mustache @@ -23,7 +23,7 @@ if(hasProperty('target') && target == 'android') { apply plugin: 'com.android.library' apply plugin: 'com.github.dcendents.android-maven' - + android { compileSdkVersion 22 buildToolsVersion '22.0.0' @@ -35,7 +35,7 @@ if(hasProperty('target') && target == 'android') { sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 } - + // Rename the aar correctly libraryVariants.all { variant -> variant.outputs.each { output -> @@ -51,7 +51,7 @@ if(hasProperty('target') && target == 'android') { provided 'javax.annotation:jsr250-api:1.0' } } - + afterEvaluate { android.libraryVariants.all { variant -> def task = project.tasks.create "jar${variant.name.capitalize()}", Jar @@ -63,12 +63,12 @@ if(hasProperty('target') && target == 'android') { artifacts.add('archives', task); } } - + task sourcesJar(type: Jar) { from android.sourceSets.main.java.srcDirs classifier = 'sources' } - + artifacts { archives sourcesJar } @@ -77,16 +77,16 @@ if(hasProperty('target') && target == 'android') { apply plugin: 'java' apply plugin: 'maven' - + sourceCompatibility = JavaVersion.VERSION_1_7 targetCompatibility = JavaVersion.VERSION_1_7 - + install { repositories.mavenInstaller { pom.artifactId = '{{artifactId}}' } } - + task execute(type:JavaExec) { main = System.getProperty('mainClass') classpath = sourceSets.main.runtimeClasspath @@ -96,9 +96,9 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.0" jackson_version = "2.4.2" - jersey_version = "2.6" + jersey_version = "2.22" jodatime_version = "2.3" - junit_version = "4.8.1" + junit_version = "4.12" } dependencies { diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/pom.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/pom.mustache index 2b860a0d8ac..be6b9b66cef 100644 --- a/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/pom.mustache +++ b/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/pom.mustache @@ -150,7 +150,7 @@ jersey-media-json-jackson 2.22.1 - + com.fasterxml.jackson.core @@ -195,10 +195,10 @@ 1.5.0 - 2.12 + 2.22 2.4.2 2.3 1.0.0 - 4.8.1 + 4.12 diff --git a/samples/client/petstore/java/jersey2/build.gradle b/samples/client/petstore/java/jersey2/build.gradle index 15d69a646ab..72fc75b04f2 100644 --- a/samples/client/petstore/java/jersey2/build.gradle +++ b/samples/client/petstore/java/jersey2/build.gradle @@ -23,7 +23,7 @@ if(hasProperty('target') && target == 'android') { apply plugin: 'com.android.library' apply plugin: 'com.github.dcendents.android-maven' - + android { compileSdkVersion 22 buildToolsVersion '22.0.0' @@ -35,7 +35,7 @@ if(hasProperty('target') && target == 'android') { sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 } - + // Rename the aar correctly libraryVariants.all { variant -> variant.outputs.each { output -> @@ -51,7 +51,7 @@ if(hasProperty('target') && target == 'android') { provided 'javax.annotation:jsr250-api:1.0' } } - + afterEvaluate { android.libraryVariants.all { variant -> def task = project.tasks.create "jar${variant.name.capitalize()}", Jar @@ -63,12 +63,12 @@ if(hasProperty('target') && target == 'android') { artifacts.add('archives', task); } } - + task sourcesJar(type: Jar) { from android.sourceSets.main.java.srcDirs classifier = 'sources' } - + artifacts { archives sourcesJar } @@ -77,16 +77,16 @@ if(hasProperty('target') && target == 'android') { apply plugin: 'java' apply plugin: 'maven' - + sourceCompatibility = JavaVersion.VERSION_1_7 targetCompatibility = JavaVersion.VERSION_1_7 - + install { repositories.mavenInstaller { pom.artifactId = 'swagger-petstore-jersey2' } } - + task execute(type:JavaExec) { main = System.getProperty('mainClass') classpath = sourceSets.main.runtimeClasspath @@ -96,9 +96,9 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.0" jackson_version = "2.4.2" - jersey_version = "2.6" + jersey_version = "2.22" jodatime_version = "2.3" - junit_version = "4.8.1" + junit_version = "4.12" } dependencies { diff --git a/samples/client/petstore/java/jersey2/pom.xml b/samples/client/petstore/java/jersey2/pom.xml index 6aaeae99c80..216caa5675b 100644 --- a/samples/client/petstore/java/jersey2/pom.xml +++ b/samples/client/petstore/java/jersey2/pom.xml @@ -150,7 +150,7 @@ jersey-media-json-jackson 2.22.1 - + com.fasterxml.jackson.core @@ -195,10 +195,10 @@ 1.5.0 - 2.12 + 2.22 2.4.2 2.3 1.0.0 - 4.8.1 + 4.12