Skip to content

Commit

Permalink
PrimeFaces 14 and proper EE10 namespaces (#496)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Jun 14, 2024
1 parent fdcf2c6 commit 422f83c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
12 changes: 10 additions & 2 deletions src/main/resources/META-INF/rewrite/jakarta-faces-4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,14 @@ recipeList:
find: "http://xmlns.jcp.org/jsf"
replace: "jakarta.faces"
filePattern: '**/*.xhtml'
- org.openrewrite.text.FindAndReplace:
find: "http://primefaces.org/ui/extensions"
replace: "primefaces.extensions"
filePattern: '**/*.xhtml'
- org.openrewrite.text.FindAndReplace:
find: "http://primefaces.org/ui"
replace: "primefaces"
filePattern: '**/*.xhtml'
- org.openrewrite.text.FindAndReplace:
find: javax.
replace: jakarta.
Expand Down Expand Up @@ -477,15 +485,15 @@ recipeList:
- org.openrewrite.java.dependencies.UpgradeDependencyVersion:
groupId: org.primefaces
artifactId: primefaces
newVersion: 13.0.x
newVersion: 14.0.x
- org.openrewrite.maven.ChangeDependencyClassifier:
groupId: org.primefaces.extensions
artifactId: primefaces-extensions
newClassifier: jakarta
- org.openrewrite.java.dependencies.UpgradeDependencyVersion:
groupId: org.primefaces.extensions
artifactId: primefaces-extensions
newVersion: 13.0.x
newVersion: 14.0.x
- org.openrewrite.java.dependencies.UpgradeDependencyVersion:
groupId: org.omnifaces
artifactId: omnifaces
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ void migrateSun() {
xmlns:h="jakarta.faces.html"
xmlns:ui="jakarta.faces.facelets"
xmlns:c="jakarta.tags.core"
xmlns:p="http://primefaces.org/ui"
xmlns:pe="http://primefaces.org/ui/extensions">
xmlns:p="primefaces"
xmlns:pe="primefaces.extensions">
<script src="https://www.gstatic.com/charts/loader.js"></script>
<p:outputPanel id="container" layout="block">
<h:panelGrid columns="4">
Expand Down Expand Up @@ -144,8 +144,8 @@ void migrateJCP() {
xmlns:pt="jakarta.faces.passthrough"
xmlns:fn="jakarta.tags.functions"
xmlns:cc="jakarta.faces.composite"
xmlns:p="http://primefaces.org/ui"
xmlns:pe="http://primefaces.org/ui/extensions">
xmlns:p="primefaces"
xmlns:pe="primefaces.extensions">
<script src="https://www.gstatic.com/charts/loader.js"></script>
<div pt:id="container">
<h:panelGrid columns="4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void changeVersionAndAddClassfier() {
</project>
""",
spec -> spec.after(actual -> {
String version = Pattern.compile("<version>(13\\.0\\.\\d+)</version>")
String version = Pattern.compile("<version>(14\\.0\\.\\d+)</version>")
.matcher(actual).results().reduce((a, b) -> b).orElseThrow().group(1);
return """
<?xml version="1.0" encoding="UTF-8"?>
Expand Down

0 comments on commit 422f83c

Please sign in to comment.