<?xml version="1.0"?>
<ruleset xmlns="http://windup.jboss.org/schema/jboss-ruleset" id="picocli-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 picocli 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="picocli" />
        <targetTechnology id="quarkus" />
    </metadata>
    <rules>
        <rule id="quarkus-picocli-00000">
            <when>

                <project>
                    <artifact groupId="info.picocli" artifactId="picocli"/>
                </project>
            </when>
            <perform>
                <iteration over="default">
                    <hint title="Replace the 'picocli' dependency with Quarkus 'quarkus-picocli' extension" effort="1" category-id="mandatory">
                        <message>
                            Replace the `info.picocli:picocli` dependency with the Quarkus dependency `io.quarkus:quarkus-picocli`  
                            Further information in the link below.
                        </message>
                        <link title="Quarkus - Guide" href="https://quarkus.io/guides/picocli" />
                    </hint>
                </iteration>
            </perform>
        </rule>
        <rule id="quarkus-picocli-00010">
            <when>
                <dependency groupId="info.picocli" artifactId="picocli"/>
            </when>
            <perform>
                <hint title="Replace the 'picocli' dependency with Quarkus 'quarkus-picocli' extension" effort="1" category-id="mandatory">
                    <message>
                        Replace the `info.picocli:picocli` dependency with the Quarkus dependency `io.quarkus:quarkus-picocli`  
                        Further information in the link below.
                    </message>
                    <link title="Quarkus - Guide" href="https://quarkus.io/guides/picocli" />
                </hint>
            </perform>
        </rule>
    </rules>
</ruleset>
