-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into WINDUPRULE-1041-jaxrs
- Loading branch information
Showing
3 changed files
with
144 additions
and
0 deletions.
There are no files selected for viewing
96 changes: 96 additions & 0 deletions
96
rules/rules-reviewed/quarkus/java-ee/jakarta-faces-to-quarkus.windup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
<?xml version="1.0"?> | ||
<!DOCTYPE ruleset [ | ||
<!ENTITY build-tool-maven-link-title "Quarkus - Guide"> | ||
<!ENTITY build-tool-maven-link-href "https://quarkus.io/guides/maven-tooling#build-tool-maven"> | ||
]> | ||
<ruleset xmlns="http://windup.jboss.org/schema/jboss-ruleset" id="jakarta-faces-to-quarkus" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd"> | ||
<metadata> | ||
<description> | ||
This ruleset gives hints to migrate JAX-RS applications to Quarkus extension | ||
</description> | ||
<dependencies> | ||
<addon id="org.jboss.windup.rules,windup-rules-javaee,3.0.0.Final" /> | ||
<addon id="org.jboss.windup.rules,windup-rules-java,3.0.0.Final" /> | ||
<addon id="org.jboss.windup.rules,windup-rules-xml,3.0.0.Final" /> | ||
</dependencies> | ||
<sourceTechnology id="java-ee" /> | ||
<targetTechnology id="quarkus" /> | ||
</metadata> | ||
<rules> | ||
<rule id="jakarta-faces-to-quarkus-00000"> | ||
<when> | ||
<xmlfile in="pom.xml" matches="/m:project/m:dependencies/m:dependency[m:groupId/text() = 'jakarta.faces']"> | ||
<namespace prefix="m" uri="http://maven.apache.org/POM/4.0.0" /> | ||
</xmlfile> | ||
</when> | ||
<perform> | ||
<hint title="Replace Jakarta Faces Dependency with MyFaces" effort="1" category-id="mandatory"> | ||
<message> | ||
<![CDATA[ | ||
Faces Dependencies with groupId `jakarta.faces` should be replaced with | ||
``` | ||
<!-- Quarkus MyFaces dependencies --> | ||
<dependency> | ||
<groupId>org.apache.myfaces.core.extensions.quarkus</groupId> | ||
<artifactId>myfaces-quarkus</artifactId> | ||
<version>4.0.1</version> | ||
</dependency> | ||
<!-- Quarkus Faces utilities and components extensions --> | ||
<dependency> | ||
<groupId>io.quarkiverse.primefaces</groupId> | ||
<artifactId>quarkus-primefaces</artifactId> | ||
<version>3.13.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkiverse.omnifaces</groupId> | ||
<artifactId>quarkus-omnifaces</artifactId> | ||
<version>4.2.0</version> | ||
</dependency> | ||
``` | ||
]]> | ||
</message> | ||
<link title="Apache MyFaces: Getting Started on Quarkus" href="https://myfaces.apache.org/#/coregettingstarted?id=quarkus" /> | ||
</hint> | ||
</perform> | ||
</rule> | ||
<rule id="jakarta-faces-to-quarkus-00010"> | ||
<when> | ||
<filecontent filename="pom.xml" pattern="artifactId>jakarta.faces<" /> | ||
</when> | ||
<perform> | ||
<hint title="Replace Jakarta Faces Dependency with MyFaces" effort="1" category-id="mandatory"> | ||
<message> | ||
<![CDATA[ | ||
Faces Dependencies with artifactId `jakarta.faces` should be replaced with | ||
``` | ||
<!-- Quarkus MyFaces dependencies --> | ||
<dependency> | ||
<groupId>org.apache.myfaces.core.extensions.quarkus</groupId> | ||
<artifactId>myfaces-quarkus</artifactId> | ||
<version>4.0.1</version> | ||
</dependency> | ||
<!-- Quarkus Faces utilities and components extensions --> | ||
<dependency> | ||
<groupId>io.quarkiverse.primefaces</groupId> | ||
<artifactId>quarkus-primefaces</artifactId> | ||
<version>3.13.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkiverse.omnifaces</groupId> | ||
<artifactId>quarkus-omnifaces</artifactId> | ||
<version>4.2.0</version> | ||
</dependency> | ||
``` | ||
]]> | ||
</message> | ||
<link title="Apache MyFaces: Getting Started on Quarkus" href="https://myfaces.apache.org/#/coregettingstarted?id=quarkus" /> | ||
</hint> | ||
</perform> | ||
</rule> | ||
</rules> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
rules/rules-reviewed/quarkus/java-ee/tests/jakarta-faces-to-quarkus.windup.test.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0"?> | ||
<ruletest id="jakarta-faces-to-quarkus-tests" | ||
xmlns="http://windup.jboss.org/schema/jboss-ruleset" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd"> | ||
<testDataPath>data/application-jakarta-api</testDataPath> | ||
<rulePath>../jakarta-faces-to-quarkus.windup.xml</rulePath> | ||
<ruleset> | ||
<rules> | ||
<rule id="jakarta-faces-to-quarkus-00000-test"> | ||
<when> | ||
<not> | ||
<iterable-filter size="1"> | ||
<hint-exists message="Faces Dependencies with groupId `jakarta.faces` should be replaced with"/> | ||
</iterable-filter> | ||
</not> | ||
</when> | ||
<perform> | ||
<fail message="[jakarta-faces-to-quarkus-00000] MyFaces hint was not found!" /> | ||
</perform> | ||
</rule> | ||
<rule id="jakarta-faces-to-quarkus-00010-test"> | ||
<when> | ||
<not> | ||
<iterable-filter size="1"> | ||
<hint-exists message="Faces Dependencies with artifactId `jakarta.faces` should be replaced with"/> | ||
</iterable-filter> | ||
</not> | ||
</when> | ||
<perform> | ||
<fail message="[jakarta-faces-to-quarkus-00010] MyFaces hint was not found!" /> | ||
</perform> | ||
</rule> | ||
</rules> | ||
</ruleset> | ||
</ruletest> |