Skip to content

Commit 1735ab9

Browse files
RomainPruvostMHHrpruvostRomainPro76
authored
[Java] Replace Java EE 8 dependencies by Jakarta EE 8 (OpenAPITools#10513)
* Migrate javax.annotation:javax.annotation-api to jakarta.annotation:jakarta.annotation-api:1.3.5 * Migrate javax.annotation:javax.annotation-api to jakarta.annotation:jakarta.annotation-api:1.3.5 for sbt * Migrate javax.annotation:javax.annotation-api to jakarta.annotation:jakarta.annotation-api:1.3.5 for gradle * Commit samples files after the execution of the command "generate-samples.sh for configs java and kotlin * Delete org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec from the exclusion section of org.jboss.resteasy:resteasy-client in the resteasy module because jboss-annotations-api_1.2_spec isn't a transitive dependency * Migrate javax.validation:validation-api to jakarta.validation:jakarta.validation-api:2.0.2 for maven * Migrate javax.validation:validation-api to jakarta.validation:jakarta.validation-api:2.0.2 for gradle * Migrate javax.validation:validation-api to jakarta.validation:jakarta.validation-api:2.0.2 for sbt * Commit samples files after the execution of the command "generate-samples.sh for configs java, spring, jaxrs and kotlin * Migrate javax.ws.rs:javax.ws.rs-api to jakarta.ws.rs:jakarta.ws.rs-api:2.1.6 for maven * Commit samples files after the execution of the command "generate-samples.sh for configs java, spring, jaxrs and kotlin * Migrate javax.json.bind:javax.json.bind-api to jakarta.json.bind:jakarta.json.bind-api:1.0.2 for maven * Commit samples files after the execution of the command "generate-samples.sh for configs java, spring, jaxrs and kotlin * Migrate javax.json:javax.json-api to jakarta.json:jakarta.json-api:1.1.6 for maven * Commit samples files after the execution of the command "generate-samples.sh for configs java, spring, jaxrs and kotlin * Migrate javax.xml.bind:jaxb-api to jakarta.xml.bind:jakarta.xml.bind-api:2.3.3 for maven * Commit samples files after the execution of the command "generate-samples.sh for configs java, spring, jaxrs and kotlin * Migrate javax.el:el-api to jakarta.el:jakarta.el-api:3.0.3 for maven * Migrate javax.servlet:servlet-api to jakarta.servlet:jakarta.servlet-api:4.0.4 for maven * Delete the property servlet-api-version in pom files because it is useless * Commit samples files after the execution of the command "generate-samples.sh for configs java, spring, jaxrs and kotlin * Migrate javax.activation:activation to jakarta.activation:jakarta.activation-api:1.2.2 for maven * Delete javax.activation:activation from the exclusion section of org.jboss.resteasy:resteasy-client in the resteasy module because javax.activation:activation isn't a transitive dependency * Commit samples files after the execution of the command "generate-samples.sh for configs java, spring, jaxrs and kotlin * Fix the name of property jakarta.activation-version * Fix a missing property 'jakarta-annotation-version' in JavaJaxRS/resteasy/pom.mustache * generate samples * Fix version value of jakarta.validation-api artifact in Java/libraries/rest-assured/pom.mustache * Fix missing property jakarta-annotation-version in jaxrs-resteasy/eap/pom.mustache * generate samples * Revert changes in sample files after running the command generate-samples.sh in gitBash * Fix files in samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8 * Replace the old dependency javax.validation:validation-api by the new Jakarta EE 8 jakarta.validation:jakarta.validation-api in openapi-generator-online Co-authored-by: rpruvost <[email protected]> Co-authored-by: rpruvost <[email protected]>
1 parent e1d1ced commit 1735ab9

201 files changed

Lines changed: 1007 additions & 909 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

modules/openapi-generator-online/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@
132132
</dependency>
133133
<!-- Bean Validation API support -->
134134
<dependency>
135-
<groupId>javax.validation</groupId>
136-
<artifactId>validation-api</artifactId>
135+
<groupId>jakarta.validation</groupId>
136+
<artifactId>jakarta.validation-api</artifactId>
137137
</dependency>
138138
<dependency>
139139
<groupId>org.openapitools</groupId>

modules/openapi-generator/src/main/resources/Java/build.gradle.mustache

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ if(hasProperty('target') && target == 'android') {
5656
}
5757

5858
dependencies {
59-
provided 'javax.annotation:jsr250-api:1.0'
59+
provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"
6060
}
6161
}
6262

@@ -129,6 +129,7 @@ ext {
129129
{{#openApiNullable}}
130130
jackson_databind_nullable_version = "0.2.1"
131131
{{/openApiNullable}}
132+
jakarta_annotation_version = "1.3.5"
132133
{{#threetenbp}}
133134
jackson_threetenbp_version = "2.9.10"
134135
{{/threetenbp}}
@@ -161,6 +162,6 @@ dependencies {
161162
{{^java8}}
162163
implementation "com.brsanthu:migbase64:2.2"
163164
{{/java8}}
164-
implementation 'javax.annotation:javax.annotation-api:1.3.2'
165+
implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"
165166
testImplementation "junit:junit:$junit_version"
166167
}

modules/openapi-generator/src/main/resources/Java/libraries/apache/pom.mustache

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -321,9 +321,9 @@
321321
{{#useBeanValidation}}
322322
<!-- Bean Validation API support -->
323323
<dependency>
324-
<groupId>javax.validation</groupId>
325-
<artifactId>validation-api</artifactId>
326-
<version>1.1.0.Final</version>
324+
<groupId>jakarta.validation</groupId>
325+
<artifactId>jakarta.validation-api</artifactId>
326+
<version>${beanvalidation-version}</version>
327327
<scope>provided</scope>
328328
</dependency>
329329
{{/useBeanValidation}}
@@ -345,9 +345,9 @@
345345
</dependency>
346346
{{/parcelableModel}}
347347
<dependency>
348-
<groupId>javax.annotation</groupId>
349-
<artifactId>javax.annotation-api</artifactId>
350-
<version>${javax-annotation-version}</version>
348+
<groupId>jakarta.annotation</groupId>
349+
<artifactId>jakarta.annotation-api</artifactId>
350+
<version>${jakarta-annotation-version}</version>
351351
<scope>provided</scope>
352352
</dependency>
353353
<!-- test dependencies -->
@@ -366,7 +366,10 @@
366366
{{#threetenbp}}
367367
<jackson-threetenbp-version>2.9.10</jackson-threetenbp-version>
368368
{{/threetenbp}}
369-
<javax-annotation-version>1.3.2</javax-annotation-version>
369+
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
370+
{{#useBeanValidation}}
371+
<beanvalidation-version>2.0.2</beanvalidation-version>
372+
{{/useBeanValidation}}
370373
<maven-plugin-version>1.0.0</maven-plugin-version>
371374
<junit-version>4.13.1</junit-version>
372375
</properties>

modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ if(hasProperty('target') && target == 'android') {
4949
}
5050

5151
dependencies {
52-
provided 'javax.annotation:jsr250-api:1.0'
52+
provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"
5353
}
5454
}
5555

@@ -105,6 +105,7 @@ ext {
105105
{{#openApiNullable}}
106106
jackson_databind_nullable_version = "0.2.1"
107107
{{/openApiNullable}}
108+
jakarta_annotation_version = "1.3.5"
108109
{{#threetenbp}}
109110
jackson_threetenbp_version = "2.9.10"
110111
{{/threetenbp}}
@@ -140,7 +141,7 @@ dependencies {
140141
implementation "com.brsanthu:migbase64:2.2"
141142
implementation "com.github.scribejava:scribejava-core:$scribejava_version"
142143
implementation "com.brsanthu:migbase64:2.2"
143-
implementation 'javax.annotation:javax.annotation-api:1.3.2'
144+
implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"
144145
testImplementation "org.junit.jupiter:junit-jupiter:$junit_version"
145146
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version"
146147
testImplementation "org.junit.jupiter:junit-jupiter-params:$junit_version"

modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ lazy val root = (project in file(".")).
2323
"com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile",
2424
"com.github.scribejava" % "scribejava-core" % "8.0.0" % "compile",
2525
"com.brsanthu" % "migbase64" % "2.2" % "compile",
26-
"javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile",
26+
"jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile",
2727
"org.junit.jupiter" % "junit-jupiter" % "5.7.0" % "test",
2828
"org.junit.jupiter" % "junit-jupiter-params" % "5.7.0" % "test",
2929
"com.github.tomakehurst" % "wiremock-jre8" % "2.27.2" % "test",

modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,9 @@
311311
<version>${scribejava-version}</version>
312312
</dependency>
313313
<dependency>
314-
<groupId>javax.annotation</groupId>
315-
<artifactId>javax.annotation-api</artifactId>
316-
<version>${javax-annotation-version}</version>
314+
<groupId>jakarta.annotation</groupId>
315+
<artifactId>jakarta.annotation-api</artifactId>
316+
<version>${jakarta-annotation-version}</version>
317317
<scope>provided</scope>
318318
</dependency>
319319

@@ -371,7 +371,7 @@
371371
{{#threetenbp}}
372372
<jackson-threetenbp-version>2.9.10</jackson-threetenbp-version>
373373
{{/threetenbp}}
374-
<javax-annotation-version>1.3.2</javax-annotation-version>
374+
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
375375
<junit-version>5.7.0</junit-version>
376376
<maven-plugin-version>1.0.0</maven-plugin-version>
377377
<scribejava-version>8.0.0</scribejava-version>

modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ if(hasProperty('target') && target == 'android') {
5555
}
5656

5757
dependencies {
58-
provided 'javax.annotation:jsr250-api:1.0'
58+
provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"
5959
}
6060
}
6161

@@ -113,6 +113,7 @@ ext {
113113
{{#openApiNullable}}
114114
jackson_databind_nullable_version = "0.2.1"
115115
{{/openApiNullable}}
116+
jakarta_annotation_version = "1.3.5"
116117
google_api_client_version = "1.23.0"
117118
jersey_common_version = "2.25.1"
118119
jodatime_version = "2.9.9"
@@ -147,6 +148,6 @@ dependencies {
147148
{{#withXml}}
148149
implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jackson_version"
149150
{{/withXml}}
150-
implementation 'javax.annotation:javax.annotation-api:1.3.2'
151+
implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"
151152
testImplementation "junit:junit:$junit_version"
152153
}

modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.sbt.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ lazy val root = (project in file(".")).
2727
{{#threetenbp}}
2828
"com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile",
2929
{{/threetenbp}}
30-
"javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile",
30+
"jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile",
3131
"junit" % "junit" % "4.13.1" % "test",
3232
"com.novocode" % "junit-interface" % "0.10" % "test"
3333
)

modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/pom.mustache

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,9 @@
298298
</dependency>
299299
{{/threetenbp}}
300300
<dependency>
301-
<groupId>javax.annotation</groupId>
302-
<artifactId>javax.annotation-api</artifactId>
303-
<version>${javax-annotation-version}</version>
301+
<groupId>jakarta.annotation</groupId>
302+
<artifactId>jakarta.annotation-api</artifactId>
303+
<version>${jakarta-annotation-version}</version>
304304
<scope>provided</scope>
305305
</dependency>
306306

@@ -328,7 +328,7 @@
328328
{{#threetenbp}}
329329
<jackson-threetenbp-version>2.9.10</jackson-threetenbp-version>
330330
{{/threetenbp}}
331-
<javax-annotation-version>1.3.2</javax-annotation-version>
331+
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
332332
<maven-plugin-version>1.0.0</maven-plugin-version>
333333
<junit-version>4.13.1</junit-version>
334334
</properties>

modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ if(hasProperty('target') && target == 'android') {
5555
}
5656

5757
dependencies {
58-
provided 'javax.annotation:jsr250-api:1.0'
58+
provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"
5959
}
6060
}
6161

@@ -112,6 +112,7 @@ ext {
112112
{{#openApiNullable}}
113113
jackson_databind_nullable_version = "0.2.1"
114114
{{/openApiNullable}}
115+
jakarta_annotation_version = "1.3.5"
115116
jersey_version = "2.27"
116117
junit_version = "4.13.1"
117118
{{#threetenbp}}
@@ -157,7 +158,7 @@ dependencies {
157158
{{^java8}}
158159
implementation "com.brsanthu:migbase64:2.2"
159160
{{/java8}}
160-
implementation 'javax.annotation:javax.annotation-api:1.3.2'
161+
implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"
161162
testImplementation "junit:junit:$junit_version"
162163
}
163164

0 commit comments

Comments
 (0)