Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WINDUPRULE-676 Rules for components with 1:1 matching with a Quarkus extension #516

Merged
merged 19 commits into from
Dec 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
5deaf30
WINDUPRULE-676 Rules for components with 1:1 matching with a Quarkus …
mrizzi Nov 5, 2020
de71b02
WINDUPRULE-676 Provided priority 1 rules
mrizzi Nov 5, 2020
94831fc
WINDUPRULE-676 Excluded 'smallrye' rules
mrizzi Nov 5, 2020
e28fb82
WINDUPRULE-676 Added tests, test data and moved to 'rules-generate' f…
mrizzi Nov 9, 2020
5e3760f
WINDUPRULE-676 Create 3 different rules: project, dependency and java…
mrizzi Nov 16, 2020
e9a7eaf
WINDUPRULE-676 Made test JAR files creation idempotent
mrizzi Nov 29, 2020
b0fd6b2
WINDUPRULE-676 Added SmallRye YAML config rule
mrizzi Nov 29, 2020
08ce511
WINDUPRULE-676 Quarkus Amazon IAM extension rule and updated link for…
mrizzi Dec 1, 2020
6d7b042
WINDUPRULE-676 Quarkus quarkus-hibernate-validator extension rule
mrizzi Dec 1, 2020
34db66e
WINDUPRULE-676 Quarkus quarkus-narayana-jta extension rule
mrizzi Dec 1, 2020
0aaa7d4
WINDUPRULE-676 Quarkus quarkus-agroal extension rule
mrizzi Dec 3, 2020
884730d
WINDUPRULE-676 Quarkus quarkus-keycloak-admin-client extension rule
mrizzi Dec 3, 2020
5b3a636
WINDUPRULE-676 Quarkus quarkus-kubernetes-client extension rule
mrizzi Dec 3, 2020
5ec59ab
WINDUPRULE-676 Quarkus quarkus-openshift-client extension rule
mrizzi Dec 3, 2020
d3d8188
WINDUPRULE-676 'No specific guide is available' message enhancement
mrizzi Dec 7, 2020
9065548
WINDUPRULE-676 Provide Hibernate guide to quickstart
mrizzi Dec 7, 2020
f21c61e
WINDUPRULE-676 Provide guide for JDBC drivers to Hibernate ORM
mrizzi Dec 7, 2020
c3d0ee0
WINDUPRULE-676 RESTEasy updated guide from upcoming Quarkus 1.11
mrizzi Dec 7, 2020
a44561d
WINDUPRULE-676 Change link's title when link refers to a quickstart a…
mrizzi Dec 11, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@
<filtering>false</filtering>
<directory>rules-reviewed</directory>
</resource>
<resource>
<filtering>false</filtering>
<directory>rules-generated</directory>
</resource>
</resources>

<plugins>
Expand Down Expand Up @@ -296,6 +300,14 @@
<dir>rules-reviewed</dir>
<systemId>${project.build.directory}/xsd/schema/windup-jboss-ruleset.xsd</systemId>
</validationSet>
<validationSet>
<includes>
<include>**/*.windup.xml</include>
<include>**/*.windup.test.xml</include>
</includes>
<dir>rules-generated</dir>
<systemId>${project.build.directory}/xsd/schema/windup-jboss-ruleset.xsd</systemId>
</validationSet>
</validationSets>
</configuration>
</plugin>
Expand Down
68 changes: 68 additions & 0 deletions rules-generated/quarkus/agroal/agroal-to-quarkus.windup.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<?xml version="1.0"?>
<ruleset xmlns="http://windup.jboss.org/schema/jboss-ruleset" id="agroal-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 agroal components 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="agroal" />
<targetTechnology id="quarkus" />
</metadata>
<rules>
<rule id="quarkus-agroal-00000">
<when>
<project>
<artifact groupId="io.agroal" artifactId="agroal-api"/>
</project>
</when>
<perform>
<hint title="Replace the 'agroal-api' dependency with Quarkus 'quarkus-agroal' extension" effort="1" category-id="mandatory">
<message>
Replace the `io.agroal:agroal-api` dependency with the Quarkus dependency `io.quarkus:quarkus-agroal`
Further information in the link below.
</message>
<link title="Quarkus - Guide" href="https://quarkus.io/guides/datasource" />
</hint>
</perform>
</rule>
<rule id="quarkus-agroal-00010">
<when>
<dependency groupId="io.agroal" artifactId="agroal-api"/>
</when>
<perform>
<hint title="Replace the 'agroal-api' dependency with Quarkus 'quarkus-agroal' extension" effort="1" category-id="mandatory">
<message>
Replace the `io.agroal:agroal-api` dependency with the Quarkus dependency `io.quarkus:quarkus-agroal`
Further information in the link below.
</message>
<link title="Quarkus - Guide" href="https://quarkus.io/guides/datasource" />
</hint>
</perform>
</rule>
<rule id="quarkus-agroal-00020">
<when>
<javaclass references="io.agroal.api.{fileName}" >
<location>IMPORT</location>
</javaclass>
</when>
<perform>
<hint title="Replace the 'agroal-api' dependency with Quarkus 'quarkus-agroal' extension" effort="1" category-id="mandatory">
<message>
Replace the `io.agroal:agroal-api` dependency with the Quarkus dependency `io.quarkus:quarkus-agroal`
Further information in the link below.
</message>
<link title="Quarkus - Guide" href="https://quarkus.io/guides/datasource" />
</hint>
</perform>
<where param="fileName">
<!-- from https://docs.oracle.com/javase/specs/jls/se11/html/jls-3.html#jls-3.8 -->
<matches pattern="[a-zA-Z_$*][a-zA-Z0-9_$]*" />
</where>
</rule>
</rules>
</ruleset>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
83dec22c4587fbda56d4bd36cc6f8badee398262 io.agroal:agroal-api:2.3.4.RELEASE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0"?>
<ruletest id="agroal-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/</testDataPath>
<rulePath>../agroal-to-quarkus.windup.xml</rulePath>
<ruleset>
<rules>
<rule id="quarkus-agroal-00000-test">
<when>
<not>
<iterable-filter size="4">
<hint-exists message="Replace the `io.agroal:agroal-api` dependency with the Quarkus dependency.*"/>
</iterable-filter>
</not>
</when>
<perform>
<fail message="[quarkus-agroal] quarkus-agroal Quarkus extension hint was not found!" />
</perform>
</rule>
</rules>
</ruleset>
</ruletest>
8 changes: 8 additions & 0 deletions rules-generated/quarkus/agroal/tests/data/SampleClass.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import io.agroal.api.WhateverV3;
import io.agroal.api.*;
import io.agroal.api.another.should.not.trigger.the.rule.*;
import io.agroal.api.another.as.Well;

public class SampleClass {
public static void main(String[] args) {}
}
Binary file not shown.
15 changes: 15 additions & 0 deletions rules-generated/quarkus/agroal/tests/data/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.sample</groupId>
<artifactId>sample-project</artifactId>
<version>0.0.1</version>
<name>Sample Project</name>
<dependencies>
<dependency>
<groupId>io.agroal</groupId>
<artifactId>agroal-api</artifactId>
<version>2.3.4.RELEASE</version>
</dependency>
</dependencies>
</project>
Loading