Skip to content

Commit e9b5b02

Browse files
mellowaretimtebeekgithub-actions[bot]
authored
Jakarta EE11 / Faces 4.1 (#703)
* Jakarta EE11 * Jakarta EE11 * Update src/test/java/org/openrewrite/java/migrate/jakarta/JakartaEE11Test.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Very light polish --------- Co-authored-by: Tim te Beek <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent e2d21b8 commit e9b5b02

File tree

3 files changed

+150
-0
lines changed

3 files changed

+150
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#
2+
# Copyright 2024 the original author or authors.
3+
# <p>
4+
# Licensed under the Moderne Source Available License (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+
# <p>
8+
# https://docs.moderne.io/licensing/moderne-source-available-license
9+
# <p>
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+
17+
---
18+
type: specs.openrewrite.org/v1beta/recipe
19+
name: org.openrewrite.java.migrate.jakarta.JakartaEE11
20+
displayName: Migrate to Jakarta EE 11
21+
description: These recipes help with the Migration to Jakarta EE 11, flagging and updating deprecated methods.
22+
tags:
23+
- jakarta
24+
recipeList:
25+
- org.openrewrite.java.migrate.jakarta.JakartaEE10
26+
- org.openrewrite.java.migrate.jakarta.Faces4xMigrationToFaces41x
27+
- org.openrewrite.java.migrate.jakarta.UpdateJakartaPlatform11
28+
---
29+
type: specs.openrewrite.org/v1beta/recipe
30+
name: org.openrewrite.java.migrate.jakarta.UpdateJakartaPlatform11
31+
displayName: Update Jakarta EE Platform Dependencies to 11.0.x
32+
description: Update Jakarta EE Platform Dependencies to 11.0.x.
33+
recipeList:
34+
- org.openrewrite.java.dependencies.UpgradeDependencyVersion:
35+
groupId: jakarta.platform
36+
artifactId: "*"
37+
newVersion: 11.0.x
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
#
2+
# Copyright 2024 the original author or authors.
3+
# <p>
4+
# Licensed under the Moderne Source Available License (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+
# <p>
8+
# https://docs.moderne.io/licensing/moderne-source-available-license
9+
# <p>
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+
17+
---
18+
type: specs.openrewrite.org/v1beta/recipe
19+
name: org.openrewrite.java.migrate.jakarta.Faces4xMigrationToFaces41x
20+
displayName: Jakarta Faces 4.0 to 4.1
21+
description: Jakarta EE 11 uses Faces 4.1 a minor upgrade.
22+
tags:
23+
- jakarta
24+
- faces
25+
- jsf
26+
recipeList:
27+
- org.openrewrite.java.migrate.jakarta.Faces2xMigrationToJakarta4x
28+
- org.openrewrite.java.migrate.jakarta.UpdateJakartaFacesApi41
29+
- org.openrewrite.java.migrate.jakarta.OmniFacesNamespaceMigration
30+
- org.openrewrite.java.migrate.jakarta.UpgradeFaces41OpenSourceLibraries
31+
---
32+
type: specs.openrewrite.org/v1beta/recipe
33+
name: org.openrewrite.java.migrate.jakarta.UpdateJakartaFacesApi41
34+
displayName: Update Jakarta EE Java Faces Dependencies to 4.1.x
35+
description: Update Jakarta EE Java Faces Dependencies to 4.1.x.
36+
recipeList:
37+
- org.openrewrite.java.dependencies.UpgradeDependencyVersion:
38+
groupId: jakarta.faces
39+
artifactId: jakarta.faces-api
40+
newVersion: 4.1.x
41+
---
42+
type: specs.openrewrite.org/v1beta/recipe
43+
name: org.openrewrite.java.migrate.jakarta.OmniFacesNamespaceMigration
44+
displayName: OmniFaces Namespace Migration
45+
description: Find and replace legacy OmniFaces namespaces.
46+
tags:
47+
- jakarta
48+
- faces
49+
- jsf
50+
- omnifaces
51+
recipeList:
52+
- org.openrewrite.text.FindAndReplace:
53+
find: "http://omnifaces.org/ui"
54+
replace: "omnifaces"
55+
filePattern: '**/*.xhtml'
56+
- org.openrewrite.text.FindAndReplace:
57+
find: "http://omnifaces.org/functions"
58+
replace: "omnifaces"
59+
filePattern: '**/*.xhtml'
60+
---
61+
type: specs.openrewrite.org/v1beta/recipe
62+
name: org.openrewrite.java.migrate.jakarta.UpgradeFaces41OpenSourceLibraries
63+
displayName: Upgrade Faces open source libraries
64+
description: Upgrade OmniFaces and MyFaces/Mojarra libraries to Jakarta EE11 versions.
65+
tags:
66+
- jakarta
67+
- faces
68+
- jsf
69+
- myfaces
70+
- omnifaces
71+
recipeList:
72+
- org.openrewrite.java.dependencies.UpgradeDependencyVersion:
73+
groupId: org.omnifaces
74+
artifactId: omnifaces
75+
newVersion: 5.x
76+
- org.openrewrite.java.dependencies.UpgradeDependencyVersion:
77+
groupId: org.apache.myfaces.core
78+
artifactId: myfaces-api
79+
newVersion: 4.1.x
80+
- org.openrewrite.java.dependencies.UpgradeDependencyVersion:
81+
groupId: org.apache.myfaces.core
82+
artifactId: myfaces-impl
83+
newVersion: 4.1.x
84+
- org.openrewrite.java.dependencies.UpgradeDependencyVersion:
85+
groupId: org.glassfish
86+
artifactId: jakarta.faces
87+
newVersion: 4.1.x
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright 2024 the original author or authors.
3+
* <p>
4+
* Licensed under the Moderne Source Available License (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+
* <p>
8+
* https://docs.moderne.io/licensing/moderne-source-available-license
9+
* <p>
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+
package org.openrewrite.java.migrate.jakarta;
17+
18+
import org.junit.jupiter.api.Test;
19+
import org.openrewrite.test.RewriteTest;
20+
21+
class JakartaEE11Test implements RewriteTest {
22+
@Test
23+
void loadRecipesToDetectPotentialIssues() {
24+
rewriteRun(spec -> spec.recipeFromResources("org.openrewrite.java.migrate.jakarta.JakartaEE11"));
25+
}
26+
}

0 commit comments

Comments
 (0)