[windup-dev] Windup 2.0 - Custom rule creation

Akash Prajapati akash.prajapati at tcs.com
Mon Apr 13 02:23:58 EDT 2015


Hello Team

I'm trying to learn WindUp 2.0 (  windup-distribution-2.1.0.A ) for custom 
rule creations and I tried writing it. but when I show the report.

Here is the snipprt which I created for custom rule. Could you please help 
on this, where am I wrong ?

This file is put under 
<WINDUP_2.0>/rules/new-ext-weblogic-config.windup.xml


<?xml version="1.0"?>
<ruleset xmlns="http://windup.jboss.org/v1/xml" id="XmlFileMappings11">
        <!-- The phase in which to run the rules -->
        <!--
    <phase></phase>
        -->
    <rules>
        <rule id="weblogic_rule_1">
                        <when>
                                <javaclass 
references="weblogic.servlet.annotation.WLServlet" as="default">
                                        <location>ANNOTATION</location>
                                </javaclass>
                        </when>
                        <perform>
                                <hint message="Replace the proprietary 
WebLogic @WLServlet annotation with the Java EE 6 standard @WebServlet 
annotation." effort="2">
                                        <link href="
https://access.redhat.com/articles/1249423" description="Migrate WebLogic 
Proprietary Servlet Annotations" />
                                        <lineitem message="Proprietary 
WebLogic @WLServlet annotation found in file."/>
                                </hint>
                        </perform>
                </rule>
 
                <rule id="weblogic_rule_2">
                        <when>
                                <javaclass 
references="weblogic.servlet.annotation.WLFilter" as="default">
                                        <location>ANNOTATION</location>
                                </javaclass>
                        </when>
                        <perform>
                                <hint message="Replace the proprietary 
WebLogic @WLFilter annotation with the Java EE 6 standard @WebFilter 
annotation." effort="2">
                                        <link href="
https://access.redhat.com/articles/1249423" description="Migrate WebLogic 
Proprietary Filter Annotations" />
                                        <lineitem message="Proprietary 
WebLogic @WLFilter annotation found in file."/>
                                </hint>
                        </perform>
                </rule>
 
      </rules>
</ruleset>



Rule
Statistics
Executed?
Failed?
Failure Cause


addRule() 
.when(And.all(JavaClass.references(weblogic.servlet.annotation.WLServlet) 
.at([ANNOTATION]).as(default)) ) .perform(Iteration.over(?).perform(Hint 
.withText("Replace the proprietary WebLogic @WLServlet annotation with the 
Java E E 6 standard @WebServlet 
annotation.").withEffort(2).with([org.jboss.windup 
.reporting.config.Link at 150e590])) ) 
withId("GeneratedID_XmlFileMappings11_1")
Vertices Created: 0
Edges Created: 0
Vertices Removed: 0
Edges Removed: 0
no
no

addRule() 
.when(And.all(JavaClass.references(weblogic.servlet.annotation.WLFilter) 
.at([ANNOTATION]).as(default)) ) .perform(Iteration.over(?).perform(Hint 
.withText("Replace the proprietary WebLogic @WLFilter annotation with the 
Java EE 6 standard @WebFilter 
annotation.").withEffort(2).with([org.jboss.windup 
.reporting.config.Link at f8f29])) ) 
withId("GeneratedID_XmlFileMappings11_2")
Vertices Created: 0
Edges Created: 0
Vertices Removed: 0
Edges Removed: 0
no
no



Thanks in advance!

Thanks
Akash Prajapati
Mailto: akash.prajapati at tcs.com
____________________________________________
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/windup-dev/attachments/20150413/4dbffe6d/attachment-0001.html 


More information about the windup-dev mailing list