Skip to content

Commit 274c315

Browse files
author
ant3
committed
Rebuilt jersey2 client sample.
1 parent b7e4be7 commit 274c315

File tree

10 files changed

+56
-42
lines changed

10 files changed

+56
-42
lines changed

samples/client/petstore/java/jersey2/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,9 @@
1313

1414
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
1515
hs_err_pid*
16+
17+
# build files
18+
**/target
19+
target
20+
.gradle
21+
build

samples/client/petstore/java/jersey2/.swagger-codegen-ignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
1616
#foo/**/qux
17-
# Thsi matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
1818

1919
# You can also negate patterns with an exclamation (!).
2020
# For example, you can ignore all files in a docs folder with the file extension .md:
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#
2+
# Generated by: https://github.com/swagger-api/swagger-codegen.git
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
language: java
17+
jdk:
18+
- oraclejdk8
19+
- oraclejdk7
20+
before_install:
21+
# ensure gradlew has proper permission
22+
- chmod a+x ./gradlew
23+
script:
24+
# test using maven
25+
- mvn test
26+
# uncomment below to test using gradle
27+
# - gradle test
28+
# uncomment below to test using sbt
29+
# - sbt test

samples/client/petstore/java/jersey2/build.gradle

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ if(hasProperty('target') && target == 'android') {
7777

7878
apply plugin: 'java'
7979
apply plugin: 'maven'
80-
8180
sourceCompatibility = JavaVersion.VERSION_1_7
8281
targetCompatibility = JavaVersion.VERSION_1_7
8382

@@ -95,21 +94,21 @@ if(hasProperty('target') && target == 'android') {
9594

9695
ext {
9796
swagger_annotations_version = "1.5.8"
98-
jackson_version = "2.7.0"
97+
jackson_version = "2.7.5"
9998
jersey_version = "2.22.2"
100-
jodatime_version = "2.9.3"
99+
jodatime_version = "2.9.4"
101100
junit_version = "4.12"
102101
}
103102

104103
dependencies {
105104
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
106105
compile "org.glassfish.jersey.core:jersey-client:$jersey_version"
107106
compile "org.glassfish.jersey.media:jersey-media-multipart:$jersey_version"
108-
compile "org.glassfish.jersey.media:jersey-media-json-jackson:2.22.1"
107+
compile "org.glassfish.jersey.media:jersey-media-json-jackson:$jersey_version"
109108
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
110109
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
111110
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
112-
compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:2.1.5"
111+
compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version"
113112
compile "joda-time:joda-time:$jodatime_version"
114113
compile "com.brsanthu:migbase64:2.2"
115114
testCompile "junit:junit:$junit_version"

samples/client/petstore/java/jersey2/build.sbt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ lazy val root = (project in file(".")).
1212
"io.swagger" % "swagger-annotations" % "1.5.8",
1313
"org.glassfish.jersey.core" % "jersey-client" % "2.22.2",
1414
"org.glassfish.jersey.media" % "jersey-media-multipart" % "2.22.2",
15-
"org.glassfish.jersey.media" % "jersey-media-json-jackson" % "2.22.1",
16-
"com.fasterxml.jackson.core" % "jackson-core" % "2.7.0",
17-
"com.fasterxml.jackson.core" % "jackson-annotations" % "2.7.0",
18-
"com.fasterxml.jackson.core" % "jackson-databind" % "2.7.0",
19-
"com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.1.5",
20-
"joda-time" % "joda-time" % "2.9.3",
15+
"org.glassfish.jersey.media" % "jersey-media-json-jackson" % "2.22.2",
16+
"com.fasterxml.jackson.core" % "jackson-core" % "2.7.5",
17+
"com.fasterxml.jackson.core" % "jackson-annotations" % "2.7.5",
18+
"com.fasterxml.jackson.core" % "jackson-databind" % "2.7.5",
19+
"com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.7.5",
20+
"joda-time" % "joda-time" % "2.9.4",
2121
"com.brsanthu" % "migbase64" % "2.2",
2222
"junit" % "junit" % "4.12" % "test",
2323
"com.novocode" % "junit-interface" % "0.10" % "test"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Hello world!

samples/client/petstore/java/jersey2/pom.xml

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
<plugin>
5353
<groupId>org.apache.maven.plugins</groupId>
5454
<artifactId>maven-jar-plugin</artifactId>
55-
<version>2.2</version>
55+
<version>2.6</version>
5656
<executions>
5757
<execution>
5858
<goals>
@@ -98,33 +98,12 @@
9898
<plugin>
9999
<groupId>org.apache.maven.plugins</groupId>
100100
<artifactId>maven-compiler-plugin</artifactId>
101-
<version>2.3.2</version>
101+
<version>2.5.1</version>
102102
<configuration>
103103
<source>1.7</source>
104104
<target>1.7</target>
105105
</configuration>
106106
</plugin>
107-
<!-- For testing build.gradle -->
108-
<plugin>
109-
<groupId>org.codehaus.mojo</groupId>
110-
<artifactId>exec-maven-plugin</artifactId>
111-
<version>1.2.1</version>
112-
<executions>
113-
<execution>
114-
<id>gradle-test</id>
115-
<phase>integration-test</phase>
116-
<goals>
117-
<goal>exec</goal>
118-
</goals>
119-
<configuration>
120-
<executable>gradle</executable>
121-
<arguments>
122-
<argument>check</argument>
123-
</arguments>
124-
</configuration>
125-
</execution>
126-
</executions>
127-
</plugin>
128107
</plugins>
129108
</build>
130109
<dependencies>
@@ -148,7 +127,7 @@
148127
<dependency>
149128
<groupId>org.glassfish.jersey.media</groupId>
150129
<artifactId>jersey-media-json-jackson</artifactId>
151-
<version>2.22.1</version>
130+
<version>${jersey-version}</version>
152131
</dependency>
153132

154133
<!-- JSON processing: jackson -->
@@ -170,7 +149,7 @@
170149
<dependency>
171150
<groupId>com.fasterxml.jackson.datatype</groupId>
172151
<artifactId>jackson-datatype-joda</artifactId>
173-
<version>2.1.5</version>
152+
<version>${jackson-version}</version>
174153
</dependency>
175154
<dependency>
176155
<groupId>joda-time</groupId>
@@ -196,8 +175,8 @@
196175
<properties>
197176
<swagger-core-version>1.5.8</swagger-core-version>
198177
<jersey-version>2.22.2</jersey-version>
199-
<jackson-version>2.7.0</jackson-version>
200-
<jodatime-version>2.9.3</jodatime-version>
178+
<jackson-version>2.7.5</jackson-version>
179+
<jodatime-version>2.9.4</jodatime-version>
201180
<maven-plugin-version>1.0.0</maven-plugin-version>
202181
<junit-version>4.12</junit-version>
203182
</properties>

samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/ApiClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ public ApiClient() {
8484

8585
// Setup authentications (key: authentication name, value: authentication).
8686
authentications = new HashMap<String, Authentication>();
87-
authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
8887
authentications.put("petstore_auth", new OAuth());
88+
authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
8989
// Prevent the authentications from being modified.
9090
authentications = Collections.unmodifiableMap(authentications);
9191
}

samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/FakeApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
import javax.ws.rs.core.GenericType;
99

1010
import org.joda.time.LocalDate;
11-
import org.joda.time.DateTime;
1211
import java.math.BigDecimal;
12+
import org.joda.time.DateTime;
1313

1414
import java.util.ArrayList;
1515
import java.util.HashMap;

samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/api/PetApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
import javax.ws.rs.core.GenericType;
99

1010
import io.swagger.client.model.Pet;
11-
import java.io.File;
1211
import io.swagger.client.model.ModelApiResponse;
12+
import java.io.File;
1313

1414
import java.util.ArrayList;
1515
import java.util.HashMap;

0 commit comments

Comments
 (0)