<?xml version="1.0"?>
<ruleset xmlns="http://windup.jboss.org/schema/jboss-ruleset" id="springboot-cache-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 from SpringBoot Cache to Quarkus spring-cache 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="springboot" />
        <targetTechnology id="quarkus" />
    </metadata>
    <rules>
        <rule id="springboot-cache-to-quarkus-00000">
            <when>
                    <or>
                        <dependency groupId="org.springframework.boot" artifactId="spring-boot-starter-cache"/>
                        <project>
                            <artifact groupId="org.springframework.boot" artifactId="spring-boot-starter-cache"/>
                        </project>
                    </or>
            </when>
            <perform>
                <hint title="Replace the SpringBoot cache artifact with Quarkus 'spring-cache' extension" effort="1" category-id="mandatory">
                    <message>
                        Replace the SpringBoot Cache module artifact with Quarkus `spring-cache` extension

                        Add Quarkus dependency `io.quarkus:quarkus-spring-cache`
                    </message>
                    <link title="Quarkus Extension for Spring Cache API Guide" href="https://quarkus.io/guides/spring-cache" />
                </hint>
            </perform>
        </rule>
    </rules>
</ruleset>