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