Skip to content

Commit 298ca8d

Browse files
dekiwing328
authored andcommitted
#7123 use correct jackson date library when using Java 8 (#7285)
1 parent 6bc84ee commit 298ca8d

File tree

3 files changed

+36
-11
lines changed

3 files changed

+36
-11
lines changed

modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/pom.mustache

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,20 @@
154154
<version>${jackson-jaxrs-version}</version>
155155
<scope>compile</scope>
156156
</dependency>
157+
{{#java8}}
157158
<dependency>
158-
<groupId>com.fasterxml.jackson.datatype</groupId>
159-
<artifactId>jackson-datatype-joda</artifactId>
160-
<version>${jackson-jaxrs-version}</version>
161-
<scope>compile</scope>
159+
<groupId>com.fasterxml.jackson.datatype</groupId>
160+
<artifactId>jackson-datatype-jsr310</artifactId>
161+
<version>${jackson-jaxrs-version}</version>
162+
</dependency>
163+
{{/java8}}
164+
{{^java8}}
165+
<dependency>
166+
<groupId>com.fasterxml.jackson.datatype</groupId>
167+
<artifactId>jackson-datatype-joda</artifactId>
168+
<version>${jackson-jaxrs-version}</version>
162169
</dependency>
170+
{{/java8}}
163171
{{#useBeanValidationFeature}}
164172
<dependency>
165173
<groupId>org.hibernate</groupId>

modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/server/pom.mustache

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,20 @@
169169
<version>${jackson-jaxrs-version}</version>
170170
<scope>compile</scope>
171171
</dependency>
172+
{{#java8}}
172173
<dependency>
173-
<groupId>com.fasterxml.jackson.datatype</groupId>
174-
<artifactId>jackson-datatype-joda</artifactId>
175-
<version>${jackson-jaxrs-version}</version>
176-
<scope>compile</scope>
174+
<groupId>com.fasterxml.jackson.datatype</groupId>
175+
<artifactId>jackson-datatype-jsr310</artifactId>
176+
<version>${jackson-jaxrs-version}</version>
177+
</dependency>
178+
{{/java8}}
179+
{{^java8}}
180+
<dependency>
181+
<groupId>com.fasterxml.jackson.datatype</groupId>
182+
<artifactId>jackson-datatype-joda</artifactId>
183+
<version>${jackson-jaxrs-version}</version>
177184
</dependency>
185+
{{/java8}}
178186
{{#generateSpringApplication}}
179187
<!-- Spring -->
180188
<dependency>

modules/swagger-codegen/src/main/resources/JavaJaxRS/pom.mustache

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,20 @@
133133
<artifactId>jersey-media-multipart</artifactId>
134134
<version>${jersey2-version}</version>
135135
</dependency>
136+
{{#java8}}
136137
<dependency>
137-
<groupId>com.fasterxml.jackson.datatype</groupId>
138-
<artifactId>jackson-datatype-joda</artifactId>
139-
<version>${jackson-version}</version>
138+
<groupId>com.fasterxml.jackson.datatype</groupId>
139+
<artifactId>jackson-datatype-jsr310</artifactId>
140+
<version>${jackson-version}</version>
141+
</dependency>
142+
{{/java8}}
143+
{{^java8}}
144+
<dependency>
145+
<groupId>com.fasterxml.jackson.datatype</groupId>
146+
<artifactId>jackson-datatype-joda</artifactId>
147+
<version>${jackson-version}</version>
140148
</dependency>
149+
{{/java8}}
141150
<dependency>
142151
<groupId>com.fasterxml.jackson.jaxrs</groupId>
143152
<artifactId>jackson-jaxrs-json-provider</artifactId>

0 commit comments

Comments
 (0)