-
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.
* kitchesink quarkus migration rules * kitchensink migration rules tests * add rule for junit * jax-rs activation rule (cherry picked from commit 7969042) Co-authored-by: Mark Brophy <36955467+m-brophy@users.noreply.github.com>
- Loading branch information
1 parent
145a20a
commit c401290
Showing
18 changed files
with
369 additions
and
1 deletion.
There are no files selected for viewing
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
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
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
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
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
35 changes: 35 additions & 0 deletions
35
rules/rules-reviewed/quarkus/java-ee/dependency-removal-for-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,35 @@ | ||
<?xml version="1.0"?> | ||
<ruleset xmlns="http://windup.jboss.org/schema/jboss-ruleset" id="dependency-removal-for-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="dependency-removal-for-quarkus-00000"> | ||
<when> | ||
<or> | ||
<project><artifact groupId="org.jboss.spec.javax.annotation" artifactId="jboss-annotations-api_1.3_spec" /></project> | ||
<project><artifact groupId="org.jboss.spec.javax.ejb" artifactId="jboss-ejb-api_3.2_spec" /></project> | ||
<project><artifact groupId="org.jboss.spec.javax.xml.bind" artifactId="jboss-jaxb-api_2.3_spec" /></project> | ||
</or> | ||
</when> | ||
<perform> | ||
<hint title="Remove non-quarkus dependencies" effort="1" category-id="mandatory"> | ||
<message> | ||
Non-quarkus dependencies are no longer required and can be removed. | ||
</message> | ||
<link title="Quarkus - Guide" href="https://quarkus.io/guides" /> | ||
</hint> | ||
</perform> | ||
</rule> | ||
</rules> | ||
</ruleset> |
60 changes: 60 additions & 0 deletions
60
rules/rules-reviewed/quarkus/java-ee/javaee-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,60 @@ | ||
<?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="javaee-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="javaee-faces-to-quarkus-00000"> | ||
<when> | ||
<xmlfile in="pom.xml" matches="/m:project/m:dependencies/m:dependency[m:groupId/text() = 'org.jboss.spec.javax.faces']"> | ||
<namespace prefix="m" uri="http://maven.apache.org/POM/4.0.0" /> | ||
</xmlfile> | ||
</when> | ||
<perform> | ||
<hint title="Replace JSF Dependency with MyFaces" effort="1" category-id="mandatory"> | ||
<message> | ||
<![CDATA[ | ||
JSF Dependencies with groupId `org.jboss.spec.javax.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
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
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
12 changes: 12 additions & 0 deletions
12
...ewed/quarkus/java-ee/tests/data/application-javaee-api/src/main/java/sample/HelloEJB.java
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,12 @@ | ||
package sample; | ||
|
||
import javax.ejb.Stateless; | ||
|
||
@Stateless | ||
public class HelloEJB { | ||
|
||
String createHelloMessage(String name) { | ||
return "Hello " + name + "!"; | ||
} | ||
|
||
} |
3 changes: 2 additions & 1 deletion
3
.../quarkus/java-ee/tests/data/application-javaee-api/src/main/java/sample/HelloService.java
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
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
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
24 changes: 24 additions & 0 deletions
24
rules/rules-reviewed/quarkus/java-ee/tests/dependency-removal-for-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,24 @@ | ||
<?xml version="1.0"?> | ||
<ruletest id="dependency-removal-for-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/*</testDataPath> | ||
<rulePath>../dependency-removal-for-quarkus.windup.xml</rulePath> | ||
<ruleset> | ||
<rules> | ||
<rule id="dependency-removal-for-quarkus-00000-test"> | ||
<when> | ||
<not> | ||
<iterable-filter size="4"> | ||
<hint-exists message="Non-quarkus dependencies are no longer required and can be removed"/> | ||
</iterable-filter> | ||
</not> | ||
</when> | ||
<perform> | ||
<fail message="[dependency-removal-for-quarkus-00000] Dependency removal hint was not found!" /> | ||
</perform> | ||
</rule> | ||
</rules> | ||
</ruleset> | ||
</ruletest> |
Oops, something went wrong.