<?xml version="1.0"?>
<ruleset xmlns="http://windup.jboss.org/schema/jboss-ruleset" id="xml-resin"
    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 provides analysis of Resin proprietary xml files that may require individual
            attention when migrating to JBoss EAP 6+.
        </description>
        <dependencies>
            <addon id="org.jboss.windup.rules,windup-rules-xml,2.3.0.Final"/>
        </dependencies>
        <sourceTechnology id="resin"/>
        <targetTechnology id="eap" versionRange="[6,)"/>
        <tag>web-app</tag>
        <tag>resin</tag>
        <tag>configuration</tag>
    </metadata>
    <rules>
        <rule id="xml-resin-01000">
            <when>
                <xmlfile as="default" matches="/resin:web-app">
                    <namespace prefix="resin" uri="http://caucho.com/ns/resin"/>
                </xmlfile>
            </when>
            <perform>
                <iteration>
                    <classification issue-display-mode="all" title="Resin Web Application Descriptor" effort="3" category-id="mandatory">
                        <description>An Resin specific file defining an application configuration. Such a file may define URL paths, internal resin ids, root directory path etc.
                            This is Resin specific and needs to be migrated to web.xml or jboss-web.xml
                        </description>
                        <link
                            title="JBoss EAP web descriptor"
                            href="https://access.redhat.com/documentation/en-us/JBoss_Enterprise_Application_Platform/6.4/html/Security_Guide/jboss-webxml_Configuration_Reference.html"
                            />
                        <tag>configuration</tag>
                        <tag>resin</tag>
                    </classification>
                </iteration>
            </perform>
        </rule>
    </rules>
</ruleset>
