<?xml version="1.0"?>
<ruleset xmlns="http://windup.jboss.org/schema/jboss-ruleset" id="mvc"
         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 MVC libraries.
        </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" />
        </dependencies>
    </metadata>
    <rules>
        <rule id="mvc-01000">
            <when>
                <file filename="{*}wicket{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - Apache Wicket" category-id="information" effort="0">
                    <description>The application embeds an Apache Wicket library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">Apache Wicket</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-01100">
            <when>
                <file filename="{*}struts{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - Apache Struts" category-id="information" effort="0">
                    <description>The application embeds an Apache Struts library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">Apache Struts</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-01200">
            <when>
                <file filename="{*}spring-webmvc{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - Spring MVC" category-id="information" effort="0">
                    <description>The application embeds a Spring MVC library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">Spring MVC</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-01210">
            <when>
                <javaclass references="org.springframework.web.servlet.mvc.Controller">
                    <location>ANNOTATION</location>
                </javaclass>
            </when>
            <perform>
                <classification title="Embedded library - Spring MVC" category-id="information" effort="0">
                    <description>The application embeds a Spring MVC library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">Spring MVC</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-01220">
            <when>
                <or>
                    <!-- Spring component declared in source code condition -->
                    <project>
                        <artifact groupId="org.springframework" artifactId="spring-webmvc"/>
                    </project>    
                    <project>
                        <artifact groupId="org.springframework" artifactId="spring-webflux"/>
                    </project>
                    <!-- Spring Boot component declared in source code condition -->
                    <project>
                        <artifact groupId="org.springframework.boot" artifactId="spring-boot-starter-webflux"/>
                    </project>
                    <!-- Spring component in compiled application condition -->
                    <dependency groupId="org.springframework" artifactId="spring-webflux"/>
                </or>
            </when>
            <perform>
                <classification title="Embedded library - Spring MVC" category-id="information" effort="0">
                    <description>The application embeds a Spring MVC library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">Spring MVC</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-01300">
            <when>
                <file filename="{*}gwt{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - GWT" category-id="information" effort="0">
                    <description>The application embeds a GWT library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">GWT</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-01400">
            <when>
                <file filename="{*}myfaces{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - MyFaces" category-id="information" effort="0">
                    <description>The application embeds a MyFaces library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">MyFaces</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-01500">
            <when>
                <file filename="{*}richfaces{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - RichFaces" category-id="information" effort="0">
                    <description>The application embeds a RichFaces library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">RichFaces</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-01600">
            <when>
                <file filename="{*}jsf{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - JSF" category-id="information" effort="0">
                    <description>The application embeds a JSF library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">JSF</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-01700">
            <when>
                <file filename="{*}tapestry{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - Apache Tapestry" category-id="information" effort="0">
                    <description>The application embeds an Apache Tapestry library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">Apache Tapestry</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-01800">
            <when>
                <file filename="{*}stripes{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - Stripes" category-id="information" effort="0">
                    <description>The application embeds a Stripes library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">Stripes</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-01900">
            <when>
                <file filename="{*}spark{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - Spark" category-id="information" effort="0">
                    <description>The application embeds a Spark library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">Spark</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-02000">
            <when>
                <file filename="{*}vaadin{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - Vaadin" category-id="information" effort="0">
                    <description>The application embeds a Vaadin library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">Vaadin</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-02100">
            <when>
                <file filename="{*}grails{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - Grails" category-id="information" effort="0">
                    <description>The application embeds a Grails library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">Grails</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-02200">
            <when>
                <file filename="{*}play{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - Play" category-id="information" effort="0">
                    <description>The application embeds a Play library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">Play</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-02300">
            <when>
                <or>
                    <file filename="adf-settings.xml"/>
                    <file filename="adfc-config.xml"/>
                </or>
            </when>
            <perform>
                <classification title="Embedded library - Oracle ADF" category-id="information" effort="0">
                    <description>The application embeds an Oracle ADF library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">Oracle ADF</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-02400">
            <when>
                <file filename="{*}primefaces{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - PrimeFaces" category-id="information" effort="0">
                    <description>The application embeds a PrimeFaces library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">PrimeFaces</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-02500">
            <when>
                <file filename="{*}jslt{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - JSTL" category-id="information" effort="0">
                    <description>The application embeds a JSTL library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">JSTL</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-02600">
            <when>
                <file filename="{*}openfaces{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - OpenFaces" category-id="information" effort="0">
                    <description>The application embeds an OpenFaces library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">OpenFaces</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-02700">
            <when>
                <file filename="{*}jfreechart{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - JFreeChart" category-id="information" effort="0">
                    <description>The application embeds a JFreeChart library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">JFreeChart</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-02800">
            <when>
                <file filename="{*}bootsfaces{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - BootsFaces" category-id="information" effort="0">
                    <description>The application embeds a BootsFaces library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">BootsFaces</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-02900">
            <when>
                <file filename="{*}icefaces{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - ICEfaces" category-id="information" effort="0">
                    <description>The application embeds an ICEfaces library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">ICEfaces</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-03000">
            <when>
                <file filename="{*}babbageFaces{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - BabbageFaces" category-id="information" effort="0">
                    <description>The application embeds a BabbageFaces library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">BabbageFaces</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-03100">
            <when>
                <file filename="{*}portlet{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - Portlet" category-id="information" effort="0">
                    <description>The application embeds a Portlet library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">Portlet</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-03200">
            <when>
                <file filename="{*}angularFaces{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - AngularFaces" category-id="information" effort="0">
                    <description>The application embeds an AngularFaces library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">AngularFaces</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-03300">
            <when>
                <file filename="{*}liferay-faces{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - LiferayFaces" category-id="information" effort="0">
                    <description>The application embeds a LiferayFaces library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">LiferayFaces</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-03400">
            <when>
                <file filename="{*}liferay{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - Liferay" category-id="information" effort="0">
                    <description>The application embeds a Liferay library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">Liferay</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-03500">
            <!-- Check! -->
            <when>
                <file filename="{*}butterfaces{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - ButterFaces" category-id="information" effort="0">
                    <description>The application embeds a Larmic ButterFaces library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">ButterFaces</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-03600">
            <when>
                <file filename="{*}highfaces{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - HighFaces" category-id="information" effort="0">
                    <description>The application embeds a HighFaces library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">HighFaces</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-03700">
            <when>
                <file filename="{*}tiefaces{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - TieFaces" category-id="information" effort="0">
                    <description>The application embeds a TieFaces library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">TieFaces</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-03800">
            <when>
                <file filename="{*}omnifaces{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - OmniFaces" category-id="information" effort="0">
                    <description>The application embeds an OmniFaces library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">OmniFaces</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-03900">
            <when>
                <file filename="{*}uberfire{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - UberFire" category-id="information" effort="0">
                    <description>The application embeds an UberFire library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">UberFire</technology-tag>
            </perform>
        </rule>
        <!-- Template engines (not really MVC) -->
        <rule id="mvc-04000">
            <when>
                <file filename="{*}velocity{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - Apache Velocity" category-id="information" effort="0">
                    <description>The application embeds an Apache Velocity library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">Velocity</technology-tag>
            </perform>
        </rule>

        <rule id="mvc-04100">
            <when>
                <file filename="{*}thymeleaf{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - Thymeleaf" category-id="information" effort="0">
                    <description>The application embeds a Thymeleaf library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">Thymeleaf</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-04200">
            <when>
                <file filename="{*}freemarker{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - Apache FreeMarker" category-id="information" effort="0">
                    <description>The application embeds an Apache FreeMarker library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">FreeMarker</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-04300">
            <when>
                <file filename="{*}stringtemplate{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - ANTLR StringTemplate" category-id="information" effort="0">
                    <description>The application embeds an ANTLR StringTemplate library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">ANTLR StringTemplate</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-04400">
            <when>
                <file filename="{*}handlebars{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - Handlebars" category-id="information" effort="0">
                    <description>The application embeds a Handlebars library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">Handlebars</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-04500">
            <when>
                <file filename="{*}jmustache{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - JMustache" category-id="information" effort="0">
                    <description>The application embeds a JMustache library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">JMustache</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-04600">
            <when>
                <file filename="jamon-{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - Jamon" category-id="information" effort="0">
                    <description>The application embeds a Jamon library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">Jamon</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-04700">
            <when>
                <file filename="{*}twirl{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - Twirl" category-id="information" effort="0">
                    <description>The application embeds a Twirl library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">Twirl</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-04800">
            <when>
                <file filename="{*}scalate{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - Scalate" category-id="information" effort="0">
                    <description>The application embeds a Scalate library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">Scalate</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-04900">
            <when>
                <file filename="{*}rythm-engine{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - Rythm Template Engine" category-id="information" effort="0">
                    <description>The application embeds a Rythm Template Engine library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">Rythm Template Engine</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-05000">
            <when>
                <file filename="{*}trimou-core{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - Trimou" category-id="information" effort="0">
                    <description>The application embeds a Trimou library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">Trimou</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-05100">
            <when>
                <file filename="{*}velocity{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - Jetbrick Template" category-id="information" effort="0">
                    <description>The application embeds a Jetbrick Template library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">Jetbrick Template</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-05200">
            <when>
                <file filename="{*}chunk-templates{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - Chunk Templates" category-id="information" effort="0">
                    <description>The application embeds a Chunk Templates library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">Chunk Templates</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-05300">
            <when>
                <file filename="{*}jsilver{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - JSilver" category-id="information" effort="0">
                    <description>The application embeds a JSilver library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">JSilver</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-05400">
            <when>
                <file filename="{*}watertemplate-engine{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - Water Template Engine" category-id="information" effort="0">
                    <description>The application embeds a Water Template Engine library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">Water Template Engine</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-05500">
            <when>
                <file filename="{*}ickenham{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - Ickenham" category-id="information" effort="0">
                    <description>The application embeds an Ickenham library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">Ickenham</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-05600">
            <when>
                <file filename="{*}mixer{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - Mixer" category-id="information" effort="0">
                    <description>The application embeds a Mixer library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">Mixer</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-05700">
            <when>
                <file filename="{*}webmacro{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - Webmacro" category-id="information" effort="0">
                    <description>The application embeds a Webmacro library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">Webmacro</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-05800">
            <when>
                <file filename="{*}dvsl{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - DVSL" category-id="information" effort="0">
                    <description>The application embeds a DVSL library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">DVSL</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-05900">
            <when>
                <file filename="{*}snippetory{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - Snippetory Template Engine" category-id="information" effort="0">
                    <description>The application embeds a Snippetory Template Engine library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">Snippetory Template Engine</technology-tag>
            </perform>
        </rule>
        <rule id="mvc-06000">
            <when>
                <file filename="{*}anakia{*}.jar"/>
            </when>
            <perform>
                <classification title="Embedded library - Anakia" category-id="information" effort="0">
                    <description>The application embeds an Anakia library.</description>
                </classification>
                <technology-tag level="INFORMATIONAL">Anakia</technology-tag>
            </perform>
        </rule>
    </rules>
</ruleset>
