Making open source more inclusive
Red Hat is committed to replacing problematic language in our code, documentation, and web properties. We are beginning with these four terms: master, slave, blacklist, and whitelist. Because of the enormity of this endeavor, these changes will be implemented gradually over several upcoming releases. For more details, see our CTO Chris Wright’s message.
1. Introduction
1.1. About the Rules Development Guide
This guide is for engineers, consultants, and others who want to create custom XML-based rules for Migration Toolkit for Applications ({ProductShortName}) tools.
For more information, see the Introduction to the Migration Toolkit for Applications for an overview and the CLI Guide for details.
To contribute to the {ProductShortName} source code base or provide Java-based rule add-ons, see the Core Development Guide.
1.1.1. Use of <{ProductShortName}_HOME>
in this guide
This guide uses the <{ProductShortName}_HOME>
replaceable variable to denote the path to your {ProductShortName} installation. The installation directory is the mta-cli-5.2.1.Final
directory where you extracted the {ProductShortName} .zip
file.
|
Note
|
For Windows operating systems, you must extract the {ProductShortName} |
When you encounter <{ProductShortName}_HOME>
in this guide, replace it with the actual path to your {ProductShortName} installation.
1.2. About {ProductShortName} rules
The Migration Toolkit for Applications ({ProductShortName}) contains rule-based migration tools that analyze the APIs, technologies, and architectures used by the applications you plan to migrate. In fact, the {ProductShortName} analysis process is implemented using {ProductShortName} rules. {ProductShortName} uses rules internally to extract files from archives, decompile files, scan and classify file types, analyze XML and other file content, analyze the application code, and build the reports.
{ProductShortName} builds a data model based on the rule execution results and stores component data and relationships in a graph database, which can then be queried and updated as needed by the migration rules and for reporting purposes.
{ProductShortName} rules use the following rule pattern:
when(condition) perform(action) otherwise(action)
{ProductShortName} provides a comprehensive set of standard migration rules out-of-the-box. Because applications may contain custom libraries or components, {ProductShortName} allows you to write your own rules to identify use of components or software that may not be covered by the existing ruleset.
2. Getting started with rules
You can get started creating custom {ProductShortName} rules by creating a rule or by reviewing the quickstarts.
2.1. Creating your first XML rule
This section guides you through the process of creating and testing your first {ProductShortName} XML-based rule. This assumes that you have already installed {ProductShortName}. See the CLI Guide for installation instructions.
In this example, you will write a rule to discover instances where an application defines a jboss-web.xml
file containing a <class-loading>
element and provide a link to the documentation that describes how to migrate the code.
Creating the directory structure for the rule
Create a directory structure to contain your first rule and the data file to use for testing.
$ mkdir -p /home/<USER_NAME>/migration-rules/rules $ mkdir -p /home/<USER_NAME>/migration-rules/data
This directory structure will also be used to hold the generated {ProductShortName} reports.
Creating data to test the rule
-
Create a
jboss-web.xml
file in the/home/<USER_NAME>/migration-rules/data/
subdirectory. -
Copy in the following content.
<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 4.2//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_2.dtd"> <jboss-web> <class-loading java2ClassLoadingCompliance="false"> <loader-repository> seam.jboss.org:loader=@projectName@ <loader-repository-config>java2ParentDelegation=false</loader-repository-config> </loader-repository> </class-loading> </jboss-web>
Creating the rule
{ProductShortName} XML-based rules use the following rule pattern:
when(condition) perform(action) otherwise(action)
-
In the
/home/<USER_NAME>/migration-rules/rules/
directory, create a file namedJBoss5-web-class-loading.windup.xml
that contains the following content:<?xml version="1.0"?> <ruleset id="<UNIQUE_RULESET_ID>" xmlns="http://windup.jboss.org/schema/jboss-ruleset" 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> <!-- Ruleset Description --> </description> <dependencies> <!-- Ruleset Dependencies --> </dependencies> <sourceTechnology id="<SOURCE_ID>" versionRange="<SOURCE_VERSION_RANGE>"/> <targetTechnology id="<TARGET_ID>" versionRange="<TARGET_VERSION_RANGE>"/> <tag>Reviewed-2015-05-01</tag> </metadata> <rules> <rule id="<UNIQUE_RULE_ID>"> <when> <!-- Test for a condition here --> </when> <perform> <!-- Perform an action --> </perform> </rule> </rules> </ruleset>
NoteThe XML file name must include the
.windup.xml
or.mta.xml
extension. Otherwise, {ProductShortName} does not evaluate the new rule. -
Add a unique identifier for the ruleset and rule:
-
Replace
<UNIQUE_RULESET_ID>
with an appropriate ruleset ID, for example,JBoss5-web-class-loading
. -
Replace
<UNIQUE_RULE_ID>
with an appropriate rule ID, for example,JBoss5-web-class-loading_001
.
-
-
Add the following ruleset add-on dependencies:
<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>
-
Add the source and target technologies:
-
Replace
<SOURCE_ID>
witheap
. -
Replace
<TARGET_ID>
witheap
.
-
-
Set the source and target technology versions.
-
Replace
<SOURCE_VERSION_RANGE>
with(4,5)
. -
Replace
<TARGET_VERSION_RANGE>
with(6,)
.
See the Apache Maven version range specification for more information.
-
-
Complete the
when
condition. Because this rule tests for a match in an XML file,xmlfile
is used to evaluate the files.To match on the
class-loading
element that is a child ofjboss-web
, use the xpath expressionjboss-web/class-loading
.<when> <xmlfile matches="jboss-web/class-loading" /> </when>
-
Complete the
perform
action for this rule.-
Add a classification with a descriptive title and a level of effort of
1
. -
Provide a hint with an informative message and a link to documentation that describes the migration details.
<perform> <iteration> <classification title="JBoss Web Application Descriptor" effort="1"/> <hint title="JBoss Web XML class-loading element is no longer valid"> <message> The class-loading element is no longer valid in the jboss-web.xml file. </message> <link href="https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.4/html-single/Migration_Guide/index.html#Create_or_Modify_Files_That_Control_Class_Loading_in_JBoss_Enterprise_Application_Platform_6" title="Create or Modify Files That Control Class Loading in JBoss EAP 6"/> </hint> </iteration> </perform>
-
The rule is now complete and should look like the following example.
<?xml version="1.0"?>
<ruleset id="JBoss5-web-class-loading"
xmlns="http://windup.jboss.org/schema/jboss-ruleset"
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 looks for the class-loading element in a jboss-web.xml file, which is no longer valid in JBoss EAP 6
</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>
<sourceTechnology id="eap" versionRange="(4,5)"/>
<targetTechnology id="eap" versionRange="[6,)"/>
</metadata>
<rules>
<rule id="JBoss5-web-class-loading_001">
<when>
<xmlfile matches="jboss-web/class-loading" />
</when>
<perform>
<iteration>
<classification title="JBoss Web Application Descriptor" effort="1"/>
<hint title="JBoss Web XML class-loading element is no longer valid">
<message>
The class-loading element is no longer valid in the jboss-web.xml file.
</message>
<link href="https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.4/html-single/Migration_Guide/index.html#Create_or_Modify_Files_That_Control_Class_Loading_in_JBoss_Enterprise_Application_Platform_6" title="Create or modify files that control class loading in JBoss EAP 6"/>
</hint>
</iteration>
</perform>
</rule>
</rules>
</ruleset>
Installing the rule
An {ProductShortName} rule is installed by placing the rule into the appropriate directory.
Copy the JBoss5-web-class-loading.windup.xml
file to the <{ProductShortName}_HOME>/rules/
directory.
$ cp /home/<USER_NAME>/migration-rules/rules/JBoss5-web-class-loading.windup.xml <{ProductShortName}_HOME>/rules/
Testing the rule
Open a terminal and execute the following command, passing the test file as an input argument and a directory for the output report.
$ <{ProductShortName}_HOME>/bin/mta-cli --sourceMode --input /home/<USER_NAME>/migration-rules/data --output /home/<USER_NAME>/migration-rules/reports --target eap:6
You should see the following result.
Report created: /home/<USER_NAME>/migration-rules/reports/index.html Access it at this URL: file:///home/<USER_NAME>/migration-rules/reports/index.html
Reviewing the reports
Review the report to be sure that it provides the expected results. For a more detailed walkthrough of {ProductShortName} reports, see the Review the reports section of the {ProductShortName} CLI Guide.
-
Open
/home/<USER_NAME>/migration-rules/reports/index.html
in a web browser. -
Verify that the rule executed.
-
From the main landing page, click the Rule providers execution overview link to open the Rule Providers Execution Overview.
-
Find the
JBoss5-web-class-loading_001
rule and verify that its Status? isCondition met
and its Result? issuccess
.Figure 1. Test rule execution
-
-
Verify that the rule matches the test data:
-
From the main landing page, click the name of the application or input folder, which is
data
in this example. -
Click the Application Details report link.
-
Click the jboss-web.xml link to view the Source Report.
You can see that the
<class-loading>
line is highlighted, and the hint from the custom rule is shown inline.Figure 2. Rule matchThe top of the file lists the classifications for matching rules. You can use the link icon to view the details for that rule. Notice that in this example, the
jboss-web.xml
file matched on another rule (JBoss web application descriptor (jboss-web.xml)
) that produced1
story point. This, combined with the1
story point from our custom rule, brings the total story points for this file to2
.
-
2.2. Reviewing the Migration Toolkit for Applications quickstarts
The Migration Toolkit for Applications quickstarts provide working examples of how to create custom Java-based rule add-ons and XML rules. You can use them as a starting point for creating your own custom rules.
Each quickstart has a README.adoc
file that contains instructions for that quickstart.
You can download a .zip
file of the latest version of the quickstarts. If you prefer to work with the source code, you can fork and clone the windup-quickstarts
project repository.
Downloading the latest quickstart
You can download the latest release of a quickstart.
-
Launch a browser and navigate to https://github.com/windup/windup-quickstarts/releases.
-
Click the latest release to download the
.zip
file to your local file system. -
Extract the archive files to a local directory.
You can review the quickstart
README.adoc
file.
Forking and cloning the quickstart GitHub project
You can fork and clone the Quickstart Github project on your local machine.
-
You must have
git
client installed.
-
Click Fork on the Migration Toolkit for Applications quickstart GitHub page to create the project in your own Git. The forked GitHub repository URL should look like this:
https://github.com/<YOUR_USER_NAME>/windup-quickstarts.git
. -
Clone the Migration Toolkit for Applications quickstart repository to your local file system:
$ git clone https://github.com/<YOUR_USER_NAME>/windup-quickstarts.git
This creates a
windup-quickstarts
directory on your local file system. -
Navigate to the newly created directory:
$ cd windup-quickstarts/
-
To retrieve the latest code updates, add the remote
upstream
repository so that you can fetch changes to the original forked repository:$ git remote add upstream https://github.com/windup/windup-quickstarts.git
-
Download the latest files from the
upstream
repository:$ git fetch upstream
3. Creating XML rules
3.1. XML rule structure
This section describes the basic structure of XML rules. All XML rules are defined as elements within rulesets. For more details, see the {ProductShortName} XML rule schema.
3.1.1. Rulesets
A ruleset is a group of one or more rules that targets a specific area of migration. This is the basic structure of the <ruleset>
element.
-
<ruleset id="<UNIQUE_RULESET_ID>">: Defines this as an {ProductShortName} ruleset and gives it a unique ruleset ID.
-
<metadata>: The metadata about the ruleset.
-
<description>: The description of the ruleset.
-
<dependencies/>: The rule add-ons required by this ruleset.
-
<sourceTechnology/>: The source technology.
-
<targetTechnology/>: The target technology.
-
<overrideRules/>: Setting to
true
indicates that rules in this ruleset override rules with the same ID from the core ruleset distributed with {ProductShortName}.  This isfalse
by default.
-
-
<rules>: A set of individual rules.
-
<rule id="<UNIQUE_RULE_ID>">: Defines the rule and gives it a unique ID. It is recommended to include the ruleset ID as part of the rule ID, for example,
<UNIQUE_RULESET_ID_UNIQUE_RULE_ID>
. One or more rules can be defined for a ruleset.-
<when>: The conditions to match on.
-
<perform>: The action to be performed when the rule condition is matched.
-
<otherwise>: The action to be performed when the rule condition is not matched. This element takes the same child elements as the
<perform>
element. -
<where>: A string pattern defined as a parameter, which can be used elsewhere in the rule definition.
-
-
<file-mapping/>: Maps an extension to a graph type.
-
<package-mapping/>: Maps from a package pattern (regular expression) to a organization name.
-
-
3.1.2. Predefined rules
{ProductShortName} provides predefined rules for common migration requirements. These core {ProductShortName} rules are located in the {ProductShortName} installation at <{ProductShortName}_HOME>/rules/migration-core/
.
The following is an example of a core {ProductShortName} rule that matches on a proprietary utility class.
<?xml version="1.0"?>
<ruleset xmlns="http://windup.jboss.org/schema/jboss-ruleset" id="weblogic" 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 WebLogic proprietary classes and constructs that may require individual attention when migrating to JBoss EAP 6+.
</description>
<dependencies>
<addon id="org.jboss.windup.rules,windup-rules-javaee,2.0.1.Final" />
<addon id="org.jboss.windup.rules,windup-rules-java,2.0.0.Final" />
</dependencies>
<sourceTechnology id="weblogic" />
<targetTechnology id="eap" versionRange="[6,)" />
<tag>reviewed-2015-06-02</tag>
<tag>weblogic</tag>
</metadata>
<rules>
...
<rule id="weblogic-02000">
<when>
<javaclass references="weblogic.utils.StringUtils.{*}" />
</when>
<perform>
<hint title="WebLogic StringUtils usage" effort="1" category-id="mandatory">
<message>Replace with the `StringUtils` class from Apache Commons.</message>
<link href="https://commons.apache.org/proper/commons-lang/" title="Apache Commons Lang" />
<tag>weblogic</tag>
</hint>
</perform>
</rule>
...
</rules>
</ruleset>
3.2. Creating a basic XML rule
This section describes how to create an {ProductShortName} XML rule. This assumes that you already have {ProductShortName} installed. See the {ProductShortName} CLI Guide for installation instructions.
3.2.1. Creating a basic XML rule template
{ProductShortName} XML rules consist of conditions and actions and use the following rule pattern:
when(condition)
perform(action)
otherwise(action)
Create a file with the following contents, which is the basic syntax for XML rules.
|
Important
|
The XML file name must include the |
<?xml version="1.0"?>
<ruleset id="unique-ruleset-id"
xmlns="http://windup.jboss.org/schema/jboss-ruleset"
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>
<!-- Metadata about the rule including a description,
source technology, target technology, and any
add-on dependencies -->
</metadata>
<rules>
<rule id="unique-ruleset-id-01000">
<when>
<!-- Test a condition... -->
</when>
<perform>
<!-- Perform this action when condition is satisfied -->
</perform>
<otherwise>
<!-- Perform this action when condition is not satisfied -->
</otherwise>
</rule>
<rules>
</ruleset>
3.2.2. Creating the ruleset metadata
The XML ruleset metadata
element provides additional information about the ruleset such as a description, the source and target technologies, and add-on dependencies. The metadata also allows for specification of tags, which allow you to provide additional information about a ruleset.
<metadata>
example<ruleset id="unique-ruleset-id"
xmlns="http://windup.jboss.org/schema/jboss-ruleset"
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 is the description.
</description>
<dependencies>
<addon id="org.jboss.windup.rules,windup-rules-javaee,2.0.1.Final"/>
<addon id="org.jboss.windup.rules,windup-rules-java,2.0.0.Final"/>
</dependencies>
<sourceTechnology id="weblogic" versionRange="(10,12]"/>
<sourceTechnology id="ejb" versionRange="(2,3]"/>
<targetTechnology id="eap" versionRange="(5,6]"/>
<targetTechnology id="ejb" versionRange="(2,3]"/>
<tag>require-stateless</tag>
<tag>require-nofilesystem-io</tag>
<executeAfter>AfterRulesetId</executeAfter>
<executeBefore>BeforeRulesetId</executeBefore>
</metadata>
<rules>
...
</rules>
</ruleset>
3.2.3. Creating a rule
Individual rules are contained within the <rules>
element. They comprise one or more when
conditions and perform actions.
See the XML rule schema for valid rule syntax.
Creating a <when>
condition
The XML rule <when>
element tests for a condition. The following is a list of valid <when>
conditions.
| Element | Description |
|---|---|
<and> |
The standard logical and operator. |
<filecontent> |
Find strings or text within files, for example, properties files. |
<file-mapping> |
Define file names to internal stored File model. |
<javaclass> |
Test for a match in a Java class. |
<javaclass-ignore> |
Exclude javaclass which you would like to ignore in processing discovery. |
<not> |
The standard logical not operator. |
<or> |
The standard logical or operator. |
<package-mapping> |
Define package names to organization or libraries. |
<project> |
Test for project characteristics, such as dependencies. |
<true> |
Always match. |
<xmlfile> |
Test for a match in an XML file. |
The specific syntax is dependent on whether you are creating a rule to evaluate Java class, an XML file, a project, or file content.
Creating a <perform>
action
The XML rule <perform>
element performs the action when the condition is met. Operations allowed in this section of the rule include the classification of application resources, in-line hints for migration steps, links to migration information, and project line item reporting. The following is a list of valid <perform>
actions.
| Element | Description |
|---|---|
<classification> |
This operation adds metadata that you want to apply to the entire file. For example, if the Java Class is a JMS Message Listener, you can add a Classification with the title "JMS Message Listener" that includes information that applies to the entire file. You can also set an effort level for the entire file. |
<hint> |
This operation adds metadata to a line within the file. This provides a hint or inline information about how to migrate a section of code. |
<iteration> |
This specifies to iterate over an implicit or explicit variable defined within the rule. |
<lineitem> |
This provides a high-level message that is displayed in the application overview page. |
<link> |
This provides an HTML link to additional information or documentation about the migration task. |
<xslt> |
This specifies how to transform an XML file. |
3.3. XML rule syntax
3.3.1. <when>
syntax
Conditions allowed in the when
portion of a rule must extend GraphOperation and currently include evaluation of Java classes, XML files, projects, and file content. Because XML rules are modeled after the Java-based rule add-ons, links to JavaDocs for the related Java classes are provided for a better understanding of how they behave.
The complete XML rule schema is located here: http://windup.jboss.org/schema/windup-jboss-ruleset.xsd.
The following sections describe the more common XML when
rule conditions.
-
<javaclass> condition syntax
-
<xmlfile> condition syntax
-
<project> condition syntax
-
<filecontent> condition syntax
-
<file> condition syntax
-
<has-hint> condition syntax
-
<has-classification> condition syntax
-
<graph-query> condition syntax
-
<dependency> condition syntax
By default, if more than one when
rule condition is provided, then all conditions must be met for the rule to match.
<javaclass> syntax
Summary
Use the <javaclass>
element to find imports, methods, variable declarations, annotations, class implementations, and other items related to Java classes. For a better understanding of the <javaclass>
condition, see the JavaDoc for the JavaClass class.
The following is an example of a rule that tests for WebLogic-specific Apache XML packages:
<rule id="weblogic-03000">
<when>
<javaclass references="weblogic.apache.xml.{*}" />
</when>
<perform>
<hint title="WebLogic Specific Apache XML Package" effort="1" category-id="mandatory">
<message>
Code using this package should be replaced with code using the org.apache.xml package from [Apache
Xerces](http://xerces.apache.org/).
</message>
</hint>
</perform>
</rule>
Construct a <javaclass> element
| Attribute name | Type | Description | ||
|---|---|---|---|---|
references |
CLASS_NAME |
The package or class name to match on. Wildcard characters can be used. This attribute is required.
references="weblogic.apache.xml.{*}" |
||
matchesSource |
STRING |
An exact regex to match. This is useful to distinguish hard-coded strings. This attribute is required. matchesSource="log4j.logger" |
||
as |
VARIABLE_NAME |
A variable name assigned to the rule so that it can be used as a reference in later processing. See the as="MyEjbRule" |
||
from |
VARIABLE_NAME |
Begin the search query with the filtered result from a previous search identified by its from="MyEjbRule" |
||
in |
PATH_FILTER |
Filter input files matching this regex (regular expression) naming pattern. Wildcard characters can be used. in="{*}File1" |
| Child Element | Description |
|---|---|
<location> |
The location where the reference was found in a Java class. Location can refer to annotations, field and variable declarations, imports, and methods. For the complete list of valid values, see the JavaDoc for TypeReferenceLocation.
|
<annotation-literal> |
Match on literal values inside of annotations. The following example matches on
Note that in this case, the |
<annotation-type> |
Match on a particular annotation type. You can supply subconditions to be matched against the annotation elements. The below example would match on a
|
<annotation-list> |
Match on an item in an array within an annotation. If an array index is not specified, the condition will be matched if it applies to any item in the array. You can supply subconditions to be matched against this element. The below example would match on
Note that in this case, the |
<xmlfile> syntax
Summary
Use the <xmlfile>
element to find information in XML files. For a better understanding of the <xmlfile>
condition, see the JavaDoc for the XmlFile class.
The following is an example of a rule that tests for an XML file:
<rule id="<UNIQUE_RULE_ID>"> <when> <xmlfile matches="/w:web-app/w:resource-ref/w:res-auth[text() = 'Container']"> <namespace prefix="w" uri="http://java.sun.com/xml/ns/javaee"/> </xmlfile> </when> <perform> <hint title="Title for Hint from XML"> <message>Container Auth</message> </hint> <xslt description="Example XSLT Conversion" extension="-converted-example.xml" template="/exampleconversion.xsl"/> </perform> </rule>
Construct an <xmlfile> element
| Attribute name | Type | Description |
|---|---|---|
matches |
XPATH |
Match on an XML file condition. matches="/w:web-app/w:resource-ref/w:res-auth[text() = 'Container']" |
xpathResultMatch |
XPATH_RESULT_STRING |
Return results that match the given regex. <xmlfile matches="//foo/text()" xpathResultMatch="Text from foo."/> |
as |
VARIABLE_NAME |
A variable name assigned to the rule so that it can be used as a reference in later processing. See the as="MyEjbRule" |
in |
PATH_FILTER |
Used to filter input files matching this regex (regular expression) naming pattern. Wildcard characters can be used. in="{*}File1" |
from |
VARIABLE_NAME |
Begin the search query with the filtered result from a previous search identified by its from="MyEjbRule" |
public-id |
PUBLIC_ID |
The DTD public-id regex. public-id="public" |
matches
custom functionsThe matches
attribute may use several built-in custom XPath functions,
which may have useful side effects, like setting the matched value on the rule variables stack.
| Function | Description |
|---|---|
|
Match a XPath expression against a string, possibly containing {ProductShortName} parameterization placeholders. matches="windup:matches(//foo/@class, '{javaclassname}'" This will match all |
| Child element | Description |
|---|---|
<namespace> |
The namespace referenced in XML files. This element contains two optional attributes: The
|
<project> syntax
Summary
Use the <project>
element to query the Maven POM file for the project characteristics. For a better understanding of the <project>
condition, see the JavaDoc for the Project class.
The following is an example of a rule that checks for a JUnit dependency version between 2.0.0.Final and 2.2.0.Final.
<rule id="UNIQUE_RULE_ID">
<when>
<project>
<artifact groupId="junit" artifactId="junit" fromVersion="2.0.0.Final" toVersion="2.2.0.Final"/>
</project>
</when>
<perform>
<lineitem message="The project uses junit with the version between 2.0.0.Final and 2.2.0.Final"/>
</perform>
</rule>
Construct a <project> element
The <project>
element is used to match against the project’s Maven POM file. You can use this condition to query for dependencies of the project. It does not have any attributes itself.
| Child element | Description |
|---|---|
<artifact> |
Subcondition used within |
| Attribute name | Type | Description |
|---|---|---|
groupId |
PROJECT_GROUP_ID |
Match on the project |
artifactId |
PROJECT_ARTIFACT_ID |
Match on the project |
fromVersion |
FROM_VERSION |
Specify the lower version bound of the artifact. For example |
toVersion |
TO_VERSION |
Specify the upper version bound of the artifact. For example |
<filecontent> syntax
Summary
Use the <filecontent>
element to find strings or text within files, for example, a line in a Properties file. For a better understanding of the <filecontent>
condition, see the JavaDoc for the FileContent class.
Construct a <filecontent> element
| Attribute name | Type | Description |
|---|---|---|
pattern |
String |
Match the file contents against the provided parameterized string. This attribute is required. |
filename |
String |
Match the file names against the provided parameterized string. |
as |
VARIABLE_NAME |
A variable name assigned to the rule so that it can be used as a reference in later processing. See the as="MyEjbRule" |
from |
VARIABLE_NAME |
Begin the search query with the filtered result from a previous search identified by its from="MyEjbRule" |
<file> syntax
Summary
Use the <file>
element to find the existence of files with a specific name, for example, an ibm-webservices-ext.xmi
file. For a better understanding of the <file>
condition, see the JavaDoc for the File class.
Construct a <file> element
| Attribute name | Type | Description |
|---|---|---|
filename |
String |
Match the file names against the provided parameterized string. This attribute is required. |
as |
VARIABLE_NAME |
A variable name assigned to the rule so that it can be used as a reference in later processing. See the as="MyEjbRule" |
from |
VARIABLE_NAME |
Begin the search query with the filtered result from a previous search identified by its Example: from="MyEjbRule" |
<has-hint> syntax
Summary
Use the <has-hint>
element to test whether a file or line has a hint already associated with it. It is primarily used to prevent firing if a hint already exists, or to implement rules for default execution when no other conditions apply. For a better understanding of the <has-hint>
condition, see the JavaDoc for the HasHint class.
The following is an example of a rule that checks to see if a hint exists for an IBM JMS destination message, and if not includes it.
<rule id="websphere-jms-eap7-03000">
<when>
<javaclass references="{package}.{prefix}{type}Message" />
</when>
<perform>
<iteration>
<when>
<not>
<has-hint />
</not>
</when>
<perform>
<hint title="IBM JMS destination message" effort="1" category-id="mandatory">
<message>
JMS `{package}.{prefix}{type}Message` messages represent the actual data passed through JMS destinations. This reference should be
replaced with the Java EE standard API `javax.jms.{type}Message`.
</message>
<link href="https://docs.oracle.com/javaee/7/tutorial/jms-concepts003.htm#sthref2271" title="Java EE 7 JMS Tutorial - Message API" />
<tag>jms</tag>
<tag>websphere</tag>
</hint>
</perform>
</iteration>
</perform>
<where param="type">
<matches pattern="(Text|Stream|Object|Map|Bytes)?" />
</where>
<where param="prefix">
<matches pattern="(JMS|MQe|MQ)" />
</where>
<where param="package">
<matches pattern="com.ibm(\..*)?\.jms" />
</where>
</rule>
Construct a <has-hint>
The <has-hint>
element is used to determine if a hint exists for a file or line. It does not have any child elements.
| Attribute name | Type | Description |
|---|---|---|
message |
String |
An optional argument allowing you to match the hint against the provided message string. |
<has-classification> syntax
Summary
Use the <has-classification>
element to test whether a file or line has a classification. It is primarily used to prevent firing if a classification already exists, or to implement rules for default execution when no other conditions apply. For a better understanding of the <has-classification>
condition, see the JavaDoc for the HasClassification class.
Construct a <has-classification>
The has-classification
element is used to determine if a specified classification exists. It does not have any child elements.
| Attribute name | Type | Description |
|---|---|---|
title |
String |
An optional title to match the classification against. |
<graph-query> syntax
Summary
Use the <graph-query>
element to search the generated graph for any elements. This element is primarily used to search for specific archives. For a better understanding of the <graph-query>
condition, see the JavaDoc for the QueryHandler class.
The following is an example of a rule that tests to determine if any ehcache
packages are found.
<rule id="embedded-cache-libraries-01000">
<when>
<graph-query discriminator="JarArchiveModel">
<property name="fileName" searchType="regex">.*ehcache.*\.jar$</property>
</graph-query>
</when>
<perform>
<classification title="Caching - Ehcache embedded library" category-id="cloud-mandatory" effort="5">
<description>
The application embeds an Ehcache library.
Cloud readiness issue as potential state information that is not persisted to a backing service.
</description>
</classification>
<technology-tag level="INFORMATIONAL">Ehcache (embedded)</technology-tag>
</perform>
</rule>
Construct a <graph-query>
| Attribute Name | Type | Description |
|---|---|---|
discriminator |
MODEL_TYPE |
The type of model to use for searching. This can be any valid model; however, it is recommended to use the |
as |
VARIABLE_NAME |
A variable name assigned to the rule so that it can be used as a reference in later processing. See the
|
from |
VARIABLE_NAME |
Begin the search query with the filtered result from a previous search identified by its
|
| Property Name | Type | Description |
|---|---|---|
name |
String |
The name of the attribute to match against within the chosen model. When using any file-based models it is recommended to match on |
type |
property-type |
Defines the expected type of property, either |
searchType |
property-search-type |
Defines how the condition is matched. If set to |
<dependency> syntax
Summary
Use the <dependency>
element to search dependencies defined within the application’s POM file to determine whether they are supported by the target runtime.
The following is an example of a rule that checks for all artifacts belonging to the org.springframework.boot
group that have a version up to, and including, 1.6.0.
<rule id="springboot-00001">
<!-- rule condition, when it could be fired -->
<when>
<dependency groupId="org.springframework.boot" artifactId="{*}" toVersion="1.6.0" />
</when>
<!-- rule operation, what to do if it is fired -->
<perform>
<hint title="Unsupported version of Spring Boot" effort="3" category-id="mandatory">
<message>Spring Boot has to be updated to Spring Boot 2.0 before being able to be migrated to a version supported by Red Hat Runtimes</message>
<link href="https://access.redhat.com/articles/3349341" title="RHOAR Spring Boot Supported Configurations" />
<link href="https://access.redhat.com/articles/3348731" title="RHOAR Component Details Overview" />
<link href="https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Migration-Guide" title="Spring Boot 2.0 Migration Guide" />
</hint>
</perform>
</rule>
3.3.2. <perform>
syntax
Operations available in the perform
section of the rule include the classification of application resources, in-line hints for migration steps, links to migration information, and project lineitem reporting. Because XML rules are modeled after the Java-based rule add-ons, links to JavaDocs for the related Java classes are provided for a better understanding of how they behave.
You can view the complete XML rule schema.
The following sections describe the more common XML rule perform actions.
<classification> syntax
Summary
The <classification>
element is used to identify or classify application resources that match the rule. It provides a title that is displayed in the report, a level of effort, and it can also provide links to additional information about how to migrate this resource classification. For a better understanding of the <classification>
action, see the JavaDoc for the Classification class.
The following is an example of a rule that classifies a resource as a WebLogic EAR application deployment descriptor file.
<rule id="XmlWebLogicRules_10vvyf">
<when>
<xmlfile as="default" matches="/*[local-name()='weblogic-application']"></xmlfile>
</when>
<perform>
<iteration>
<classification title="Weblogic EAR Application Descriptor" effort="3"/>
</iteration>
</perform>
</rule>
<classification> element attributes
| Attribute name | Type | Description |
|---|---|---|
title |
STRING |
The title given to this resource. This attribute is required. title="JBoss Seam Components" |
effort |
BYTE |
The level of effort assigned to this resource. effort="2" |
category-id |
STRING |
A reference to a category as defined in category-id="mandatory" |
of |
VARIABLE_NAME |
Create a new classification for the given reference. of="MySeamRule" |
<classification> child elements
| Child element | Description |
|---|---|
<link> |
Provides a link URI and text title for additional information.
|
<tag> |
Provides additional custom information for the classification.
|
<description> |
Description of this resource
|
<link> syntax
Summary
The <link>
element is used in classifications or hints to provide links to informational content. For a better understanding of the <link>
action, see the JavaDoc for the Link class.
The following is an example of a rule that creates links to additional information.
<rule id="SeamToCDIRules_2fmb">
<when>
<javaclass references="org.jboss.seam.{*}" as="default"/>
</when>
<perform>
<iteration>
<classification title="SEAM Component" effort="1">
<link href="http://www.seamframework.org/Seam3/Seam2ToSeam3MigrationNotes" title="Seam 2 to Seam 3 Migration Notes"/>
<link href="http://docs.jboss.org/weld/reference/latest/en-US/html/example.html" title="JSF Web Application Example"/>
<link href="http://docs.jboss.org/weld/reference/latest/en-US/html/contexts.html" title="JBoss Context Documentation"/>
<link href="http://www.andygibson.net/blog/tutorial/cdi-conversations-part-2/" title="CDI Conversations Blog Post"/>
</classification>
</iteration>
</perform>
</rule>
<link> element attributes
| Attribute Name | Type | Description |
|---|---|---|
href |
URI |
The URI for the referenced link. href="https://access.redhat.com/articles/1249423" |
title |
STRING |
A title for the link. title="Migrate WebLogic Proprietary Servlet Annotations" |
<hint> syntax
Summary
The <hint>
element is used to provide a hint or inline information about how to migrate a section of code. For a better understanding of the <hint>
action, see the JavaDoc for the Hint class.
The following is an example of a rule that creates a hint.
<rule id="WebLogicWebServiceRules_8jyqn">
<when>
<javaclass references="weblogic.wsee.connection.transport.http.HttpTransportInfo.setUsername({*})" as="default">
<location>METHOD</location>
</javaclass>
</when>
<perform>
<iteration>
<hint title="Proprietary web-service" category-id="mandatory" effort="3">
<message>Replace proprietary web-service authentication with JAX-WS standards.</message>
<link href="http://java-x.blogspot.com/2009/03/invoking-web-services-through-proxy.html" title="JAX-WS Proxy Password Example"/>
</hint>
</iteration>
</perform>
</rule>
<hint> element attributes
| Attribute name | Type | Description |
|---|---|---|
title |
STRING |
Title this hint using the specified string. This attribute is required. title="JBoss Seam Component Hint" |
category-id |
STRING |
A reference to a category as defined in category-id="mandatory" |
in |
VARIABLE_NAME |
Create a new Hint in the FileLocationModel resolved by the given variable. in="Foo" |
effort |
BYTE |
The level of effort assigned to this resource. effort="2" |
<hint> child elements
| Child element | Description |
|---|---|
<message> |
A message describing the migration hint.
|
<link> |
Identify or classify links to informational content.
|
<tag> |
Define a custom tag for this
|
<quickfix> |
Contains information to be used by the {ProductShortName} plugin to perform quick fixes when the rule condition is met.
|
<xslt> syntax
Summary
The <xslt>
element specifies how to transform an XML file. For a better understanding of the <xslt>
action, see the JavaDoc for the XSLTTransformation class.
The following is an example of rule that defines an XSLT action.
<rule id="XmlWebLogicRules_6bcvk">
<when>
<xmlfile as="default" matches="/weblogic-ejb-jar"/>
</when>
<perform>
<iteration>
<classification title="Weblogic EJB XML" effort="3"/>
<xslt title="JBoss EJB Descriptor (Windup-Generated)" template="transformations/xslt/weblogic-ejb-to-jboss.xsl" extension="-jboss.xml"/>
</iteration>
</perform>
</rule>
<xslt> element attributes
| Attribute Name | Type | Description |
|---|---|---|
title |
STRING |
Sets the title for this XSLTTransformation in the report. This attribute is required. title="XSLT Transformed Output" |
of |
STRING |
Create a new transformation for the given reference. of="testVariable_instance" |
extension |
STRING |
Sets the extension for this XSLTTransformation. This attribute is required. extension="-result.html" |
template |
STRING |
Sets the XSL template. This attribute is required. template="simpleXSLT.xsl" |
effort |
BYTE |
The level of effort required for the transformation. |
<xslt> child elements
| Child element | Description |
|---|---|
<xslt-parameter> |
Specify XSLTTransformation parameters as property value pairs
|
<lineitem> syntax
Summary
The <lineitem>
element is used to provide general migration requirements for the application, such as the need to replace deprecated libraries or the need to resolve potential class loading issues. This information is displayed on the project or application overview page. For a better understanding of the <lineitem>
action, see the JavaDoc for the LineItem class.
The following is an example of a rule that creates a lineitem message.
<rule id="weblogic_servlet_annotation_1000">
<when>
<javaclass references="weblogic.servlet.annotation.WLServlet" as="default">
<location>ANNOTATION</location>
</javaclass>
</when>
<perform>
<hint effort="1">
<message>Replace the proprietary WebLogic @WLServlet annotation with the Java EE 6 standard @WebServlet annotation.</message>
<link href="https://access.redhat.com/articles/1249423" title="Migrate WebLogic Proprietary Servlet Annotations" />
<lineitem message="Proprietary WebLogic @WLServlet annotation found in file."/>
</hint>
</perform>
</rule>
<lineitem> element attributes
| Attribute Name | Type | Description |
|---|---|---|
message |
STRING |
A lineitem message. message="Proprietary code found." |
<iteration> syntax
Summary
The <iteration>
element specifies to iterate over an implicit or explicit variable defined within the rule. For a better understanding of the <iteration>
action, see the JavaDoc for the Iteration class.
The following is an example of a rule that performs an iteration.
<rule id="jboss-eap5-xml-19000">
<when>
<xmlfile as="jboss-app" matches="/jboss-app"/>
<xmlfile as="jboss-app-no-DTD" matches="/jboss-app" public-id=""/>
</when>
<perform>
<iteration over="jboss-app">
<classification title="JBoss application Descriptor" effort="5"/>
</iteration>
<iteration over="jboss-app-no-DTD">
<classification title="JBoss application descriptor with missing DTD" effort="5"/>
</iteration>
<iteration over="jboss-app-no-DTD">
<xslt title="JBoss application descriptor - JBoss 5 (Windup-generated)" template="transformations/xslt/jboss-app-to-jboss5.xsl" extension="-jboss5.xml"/>
</iteration>
</perform>
</rule>
<iteration> element attributes
| Attribute name | Type | Description |
|---|---|---|
over |
VARIABLE_NAME |
Iterate over the condition identified by this VARIABLE_NAME. over="jboss-app" |
<iteration> child elements
| Child Element | Description |
|---|---|
<iteration> |
Child elements include a |
3.3.3. <where>
syntax
You can define parameters that specify a matching pattern to be used in other elements of an XML rule. This can help simplify the patterns for complex matching expressions.
Use the <where>
element to define a parameter. Specify the parameter name using the param
attribute and supply the pattern using the <matches>
element. This parameter can then be referenced elsewhere in the rule definition using the syntax {<PARAM_NAME>}
.
You can view the complete XML rule schema.
The following example rule defines a parameter named subpackage
that specifies a pattern of (activeio|activemq)
.
<rule id="generic-catchall-00600">
<when>
<javaclass references="org.apache.{subpackage}.{*}">
</javaclass>
</when>
<perform>
...
</perform>
<where param="subpackage">
<matches pattern="(activeio|activemq)" />
</where>
</rule>
The pattern defined by subpackage
will then be substituted in the <javaclass>
references
attribute. This causes the rule to match on org.apache.activeio.*
and org.apache.activemq.*
packages.
3.4. Adding a rule to the Migration Toolkit for Applications
A Migration Toolkit for Applications rule is installed by copying the rule to the appropriate {ProductShortName} folder. {ProductShortName} scans for rules, which are files with the .windup.xml
or .mta.xml
extension in the following locations:
-
Directory specified by the
--userRulesDirectory
argument on the {ProductShortName} command line. -
<{ProductShortName}_HOME>/rules/
directory.<{ProductShortName}_HOME>
is the directory where you install and run the Migration Toolkit for Applications executable. -
${user.home}/.mta/rules/
directory. This directory is created by {ProductShortName} the first time it is run. it contains rules, add-ons, and the {ProductShortName} log.NoteIn a Windows operating system, the rules are located in
\Documents and Settings\<USER_NAME>\.mta\rules\
or\Users\<USER_NAME>\.mta\rules\
.
4. Testing XML rules
After you have created an XML rule, you should create a test rule to ensure that it works.
4.1. Creating a test rule
Test rules are created using a process similar to the process for creating a test rule, with the following differences:
-
Test rules should be placed in a
tests/
directory beneath the rule to be tested. -
Any data, such as test classes, should be placed in a
data/
directory beneath thetests/
directory. -
Test rules should use the
.mta.test.xml
extension. -
These rules use the structure defined in the Test XML Rule Structure.
In addition, it is recommended to create a test rule that follows the name of the rule it tests. For instance, if a rule were created with a filename of proprietary-rule.mta.xml
, the test rule should be called proprietary-rule.mta.test.xml
.
4.1.1. Test XML rule structure
All test XML rules are defined as elements within ruletests
which contain one or more rulesets
. For more details, see the {ProductShortName} XML rule schema.
A ruletest is a group of one or more tests that targets a specific area of migration. This is the basic structure of the <ruletest>
element.
-
<ruletest id="<RULE_TOPIC>-test">
: Defines this as a unique {ProductShortName} ruletest and gives it a unique ruletest id.-
<testDataPath>
: Defines the path to any data, such as classes or files, used for testing. -
<sourceMode>
: Indicates if the passed in data only contains source files. If an archive, such as an EAR, WAR, or JAR, is in use, then this should be set tofalse
. Defaults totrue
. -
<rulePath>
: The path to the rule to be tested. This should end in the name of the rule to test. -
<ruleset>
: Rulesets containing the logic of the test cases. These are identical to the ones defined in Rulesets.
-
4.1.2. Test XML rule syntax
In addition to the tags in the standard XML rule syntax, the following when
conditions are commonly used for creating test rules:
-
<not>
-
<iterable-filter>
-
<classification-exists>
-
<hint-exists>
In addition to the tags in the standard perform action
syntax, the following perform
conditions are commonly used as actions in test rules:
-
<fail>
<not> syntax
Summary
The <not>
element is the standard logical not operator, and is commonly used to perform a <fail>
if the condition is not met.
The following is an example of a test rule that fails if only a specific message exists at the end of the analysis.
<ruletest xmlns="http://windup.jboss.org/schema/jboss-ruleset"
id="proprietary-servlet-test" 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">
<testDataPath>data/</testDataPath>
<rulePath>../proprietary-servlet.mta.xml</rulePath>
<ruleset>
<rules>
<rule id="proprietary-servlet-01000-test">
<when>
<!--
The <not>
will perform a logical not operator on the elements within.
-->
<not>
<!--
The defined <iterable-filter>
has a size of 1
. This rule will only match on a single instance of the defined hint.
-->
<iterable-filter size="1">
<hint-exists message="Replace the proprietary @ProprietaryServlet annotation with the Java EE 7 standard @WebServlet annotation*" />
</iterable-filter>
</not>
</when>
<!--
This <perform>
element is only executed if the previous <when>
condition is false.
This ensures that it only executes if there is not a single instance of the defined hint.
-->
<perform>
<fail message="Hint for @ProprietaryServlet was not found!" />
</perform>
</rule>
</rules>
</ruleset>
</ruletest>
The <not>
element has no unique attributes or child elements.
<iterable-filter> syntax
Summary
The <iterable-filter>
element counts the number of times a condition is verified. For additional information, see the IterableFilter class.
The following is an example that looks for four instances of the specified message.
<ruletest xmlns="http://windup.jboss.org/schema/jboss-ruleset"
id="proprietary-servlet-test" 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">
<testDataPath>data/</testDataPath>
<rulePath>../proprietary-servlet.mta.xml</rulePath>
<ruleset>
<rules>
<rule id="proprietary-servlet-03000-test">
<when>
<!--
The <not>
will perform a logical not operator on the elements within.
-->
<not>
<!--
The defined <iterable-filter>
has a size of 4
. This rule will only match on four instances of the defined hint.
-->
<iterable-filter size="4">
<hint-exists message="Replace the proprietary @ProprietaryInitParam annotation with the Java EE 7 standard @WebInitParam annotation*" />
</iterable-filter>
</not>
</when>
<!--
This <perform>
element is only executed if the previous <when>
condition is false.
In this configuration, it only executes if there are not four instances of the defined hint.
-->
<perform>
<fail message="Hint for @ProprietaryInitParam was not found!" />
</perform>
</rule>
</rules>
</ruleset>
</ruletest>
The <iterable-filter>
element has no unique child elements.
<iterable-filter> element attributes
| Attribute Name | Type | Description |
|---|---|---|
size |
integer |
The number of times to be verified. |
<classification-exists> syntax
The <classification-exists>
element determines if a specific classification title has been included in the analysis. For additional information, see the ClassificationExists class.
|
Important
|
When testing for a message that contains special characters, such as |
The following is an example that searches for a specific classification title.
<ruletest xmlns="http://windup.jboss.org/schema/jboss-ruleset"
id="proprietary-servlet-test" 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">
<testDataPath>data/</testDataPath>
<rulePath>../weblogic.mta.xml</rulePath>
<ruleset>
<rules>
<rule id="weblogic-01000-test">
<when>
<!--
The <not>
will perform a logical not operator on the elements within.
-->
<not>
<!--
The defined <classification-exists>
is attempting to match on the defined title.
This classification would have been generated by a matching <classification title="WebLogic scheduled job" .../>
rule.
-->
<classification-exists classification="WebLogic scheduled job" />
</not>
</when>
<!--
This <perform>
element is only executed if the previous <when>
condition is false.
In this configuration, it only executes if there is not a matching classification.
-->
<perform>
<fail message="Triggerable not found" />
</perform>
</rule>
</rules>
</ruleset>
</ruletest>
The <classification-exists>
has no unique child elements.
<classification-exists> element attributes
| Attribute Name | Type | Description |
|---|---|---|
classification |
String |
The |
in |
String |
An optional argument that restricts matching to files that contain the defined filename. |
<hint-exists> syntax
The <hint-exists>
element determines if a specific hint has been included in the analysis. It searches for any instances of the defined message, and is typically used to search for the beginning or a specific class inside of a <message>
element. For additional information, see the HintExists class.
|
Important
|
When testing for a message that contains special characters, such as |
The following is an example that searches for a specific hint.
<ruletest xmlns="http://windup.jboss.org/schema/jboss-ruleset"
id="proprietary-servlet-test" 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">
<testDataPath>data/</testDataPath>
<rulePath>../weblogic.windup.xml</rulePath>
<ruleset>
<rules>
<rule id="weblogic-eap7-05000-test">
<when>
<!--
The <not>
will perform a logical not operator on the elements within.
-->
<not>
<!--
The defined <hint-exists>
is attempting to match on the defined message.
This message would have been generated by a matching <message>
element on the <hint>
condition.
-->
<hint-exists message="Replace with the Java EE standard method .javax\.transaction\.TransactionManager\.resume\(Transaction tx\)." />
</not>
</when>
<!--
This <perform>
element is only executed if the previous <when>
condition is false.
In this configuration, it only executes if there is not a matching hint.
-->
<perform>
<fail message="Note to replace with standard TransactionManager.resume is missing!" />
</perform>
</rule>
</rules>
</ruleset>
</ruletest>
The <hint-exists>
element has no unique child elements.
<hint-exists> element attributes
| Attribute Name | Type | Description |
|---|---|---|
message |
String |
The |
in |
String |
An optional argument that restricts matching to |
<fail> syntax
The <fail>
element reports the execution as a failure and displays the associated message. It is commonly used in conjunction with the <not>
condition to display a message only if the conditions are not met.
The <fail>
element has no unique child elements.
<fail> element attributes
| Attribute Name | Type | Description |
|---|---|---|
message |
String |
The message to be displayed. |
4.2. Manually testing an XML rule
You can run an XML rule against your application file to test it:
$ <{ProductShortName}_HOME>/bin/mta-cli [--sourceMode] --input <INPUT_ARCHIVE_OR_FOLDER> --output <OUTPUT_REPORT_DIRECTORY> --target <TARGET_TECHNOLOGY> --packages <PACKAGE_1> <PACKAGE_2> <PACKAGE_N>
You should see the following result:
Report created: <OUTPUT_REPORT_DIRECTORY>/index.html Access it at this URL: file:///<OUTPUT_REPORT_DIRECTORY>/index.html
More examples of how to run {ProductShortName} are located in the Migration Toolkit for Applications CLI Guide.
4.3. Testing the rules by using JUnit
Once a test rule has been created, it can be analyzed as part of a JUnit test to confirm that the rule meets all criteria for execution. The WindupRulesMultipleTests
class in the {ProductShortName} rules repository is designed to test multiple rules simultaneously, and provides feedback on any missing requirements.
-
Fork and clone the {ProductShortName} XML rules. The location of this repository will be referred to as <RULESETS_REPO>.
-
Create a test XML rule.
The following instructions detail creating a JUnit test using the Red Hat CodeReady Studio. When using a different IDE it is recommended to consult your IDE’s documentation for instructions on creating a JUnit test.
-
Import the {ProductShortName} rulesets repository into your IDE.
-
Copy the custom rules, along with the corresponding tests and data, into
</path/to/RULESETS_REPO>/rules-reviewed/<RULE_NAME>/
. This should create the following directory structure.Directory structure├── rules-reviewed/ (Root directory of the rules found within the project) │ ├── <RULE_NAME>/ (Directory to contain the newly developed rule and tests) │ │ ├── <RULE_NAME>.mta.xml (Custom rule) │ │ ├── tests/ (Directory that contains any test rules and data) │ │ │ ├── <RULE_NAME>.mta.test.xml (Test rule) │ │ │ └── data/ (Optional directory to contain test rule data)
-
Select Run from the top menu bar.
-
Select Run Configurations… from the drop down that appears.
-
Right-click JUnit from the options on the left side and select New.
-
Enter the following:
-
Name: A name for your JUnit test, such as
WindupRulesMultipleTests
. -
Project: Ensure this is set to
windup-rulesets
. -
Test class: Set this to
org.jboss.windup.rules.tests.WindupRulesMultipleTests
.
-
-
Select the Arguments tab, and add the
-DrunTestsMatching=<RULE_NAME>
VM argument. For instance, if your rule name wascommunity-rules
, then you would add-DrunTestsMatching=community-rules
as seen in the following image. -
Click Run in the bottom right corner to begin the test.
Once the execution completes the results will be available for analysis. If all tests passed, then the test rule is correctly formatted; otherwise, it is recommended to address each of the issues raised in the test failures.
4.4. About validation reports
Validation reports provide details about test rules and failures and contain the following sections:
-
Summary
This section contains the total number of tests executed and reports the number of errors and failures. It displays the total success rate and the time taken, in seconds, for the report to be generated.
-
Package List
This section contains the number of tests executed for each package and reports the number of errors and failures. It displays the success rate and the time taken, in seconds, for each package to be analyzed.
A single package named
org.jboss.windup.rules.tests
is displayed unless additional test cases have been defined. -
Test Cases
This section describes the test cases. Each failure includes a Details section that can be expanded to show the stack trace for the assertion, including a human-readable line indicating the source of the error.
4.4.1. Creating a validation report
You can create a validation report for your custom rules.
-
You must fork and clone the {ProductShortName} XML rules.
-
You must have one or more test XML rules to validate.
-
Navigate to the local
windup-rulesets
repository. -
Create a directory for your custom rules and tests:
windup-rulesets/rules-reviewed/myTests
. -
Copy your custom rules and tests to the
windup-rulesets/rules-reviewed/<myTests>
directory. -
Run the following command from the root directory of the
windup-rulesets
repository:$ mvn -Dtest=WindupRulesMultipleTests -DrunTestsMatching=<myTests> clean <myReport>:report (1) (2)
-
Specify the directory containing your custom rules and tests. If you omit the
-DrunTestsMatching
argument, the validation report will include all the tests and take much longer to generate. -
Specify your report name.
The validation report is created in the
windup-rulesets/target/site/
repository. -
4.4.2. Validation report error messages
Validation reports contain errors encountered while running the rules and tests.
The following table contains error messages and how to resolve the errors.
| Error message | Description | Resolution |
|---|---|---|
No test file matching rule |
This error occurs when a rule file exists without a corresponding test file. |
Create a test file for the existing rule. |
Test rule Ids <RULE_NAME> not found! |
This error is thrown when a rule exists without a corresponding ruletest. |
Create a test for the existing rule. |
XML parse fail on file <FILE_NAME> |
The syntax in the XML file is invalid, and unable to be parsed successfully by the rule validator. |
Correct the invalid syntax. |
Test file path from |
No files are found in the path defined in the |
Create the path defined in the |
The rule with id="<RULE_ID>" has not been executed. |
The rule with the provided id has not been executed during this validation. |
Ensure that a test data file exists that matches the conditions defined in the specified rule. |
5. Overriding rules
You can override core rules distributed with {ProductShortName} or even custom rules. For example, you can change the matching conditions, effort, or hint text for a rule. This is done by making a copy of the original rule, marking it as a rule override, and making the necessary adjustments.
You can disable a rule by creating a rule override with an empty <rule>
element.
5.1. Overriding a rule
You can override a core or custom rule.
-
Copy the XML file that contains the rule you want to override to the custom rules directory.
Custom rules can be placed in
<{ProductShortName}_HOME>/rules
,${user.home}/.mta/rules/
, or a directory specified by the--userRulesDirectory
command-line argument. -
Edit the XML file so that it contains only the
<rule>
elements for the rules that you want to override.NoteRules from the original ruleset that are not overridden by the new ruleset are executed as normal.
-
Ensure that you keep the same rule and ruleset IDs. When you copy the original rule XML, this ensures that the IDs match.
-
Add the
<overrideRules>true</overrideRules>
element to the ruleset metadata. -
Update the rule definition.
You can change anything in the rule definition. The new rule overrides the original rule in its entirety.
The following rule override example changes the effort
of the weblogic-02000
rule in the weblogic
ruleset from 1
to 3
:
<?xml version="1.0"?>
<ruleset id="weblogic"
xmlns="http://windup.jboss.org/schema/jboss-ruleset"
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"> (1)
<metadata>
...
<overrideRules>true</overrideRules> (2)
</metadata>
<rules>
<rule id="weblogic-02000" xmlns="http://windup.jboss.org/schema/jboss-ruleset"> (3)
<when>
<javaclass references="weblogic.utils.StringUtils.{*}"/>
</when>
<perform>
<hint effort="3" category-id="mandatory" title="WebLogic StringUtils Usage"> (4)
<message>Replace with the StringUtils class from Apache Commons.</message>
<link href="https://commons.apache.org/proper/commons-lang/" title="Apache Commons Lang"/>
<tag>weblogic</tag>
</hint>
</perform>
</rule>
</rules>
</ruleset>
-
Ensure that the
ruleset id
matches the originalruleset id
. -
Add
<overrideRules>true</overrideRules>
to the<metadata>
section. -
Ensure that the
rule id
matches the originalrule id
. -
Updated
effort
.
When you run {ProductShortName}, this rule overrides the original rule with the same rule ID. You can verify that the new rule was used by viewing the contents of the Rule Provider Executions Overview.
5.2. Disabling a rule
To disable a rule, create a rule override definition with an empty <rule>
element according to the following example:
<?xml version="1.0"?>
<ruleset id="weblogic"
xmlns="http://windup.jboss.org/schema/jboss-ruleset"
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>
...
<overrideRules>true</overrideRules>
</metadata>
<rules>
<rule id="weblogic-02000" xmlns="http://windup.jboss.org/schema/jboss-ruleset">
(1)
</rule>
</rules>
</ruleset>
-
The
<rule>
element is empty so that theweblogic-02000
rule in theweblogic
ruleset is disabled.
6. Using custom rule categories
You can create custom rule categories and assign {ProductShortName} rules to them.
|
Note
|
Although {ProductShortName} processes rules with the legacy |
Adding a custom category
You can add a custom category to the rule category file.
-
Edit the rule category file, which is located at
<{ProductShortName}_HOME>/rules/migration-core/core.windup.categories.xml
. -
Add a new
<category>
element and fill in the following parameters:-
id
: The ID that {ProductShortName} rules use to reference the category. -
priority
: The sorting priority relative to other categories. The category with the lowest value is displayed first. -
name
: The display name of the category. -
description
: The description of the category.Custom rule category example<?xml version="1.0"?> <categories> ... <category id="custom-category" priority="20000"> <name>Custom Category</name> <description>This is a custom category.</description> </category> </categories>
This category is ready to be referenced by {ProductShortName} rules.
-
Assigning a rule to a custom category
You can assign a rule to your new custom category.
In your {ProductShortName} rule, update the category-id
field as in the following example.
<rule id="rule-id">
<when>
...
</when>
<perform>
<hint title="Rule Title" effort="1" category-id="custom-category">
<message>Hint message.</message>
</hint>
</perform>
</rule>
If this rule condition is met, incidents identified by this rule use your custom category. The custom category is displayed on the dashboard and in the Issues report.
Appendix A: Reference material
A.1. About rule story points
A.1.1. What are story points?
Story points are an abstract metric commonly used in Agile software development to estimate the level of effort needed to implement a feature or change.
The Migration Toolkit for Applications uses story points to express the level of effort needed to migrate particular application constructs, and the application as a whole. It does not necessarily translate to man-hours, but the value should be consistent across tasks.
A.1.2. How story points are estimated in rules
Estimating the level of effort for the story points for a rule can be tricky. The following are the general guidelines {ProductShortName} uses when estimating the level of effort required for a rule.
| Level of Effort | Story Points | Description |
|---|---|---|
Information |
0 |
An informational warning with very low or no priority for migration. |
Trivial |
1 |
The migration is a trivial change or a simple library swap with no or minimal API changes. |
Complex |
3 |
The changes required for the migration task are complex, but have a documented solution. |
Redesign |
5 |
The migration task requires a redesign or a complete library change, with significant API changes. |
Rearchitecture |
7 |
The migration requires a complete rearchitecture of the component or subsystem. |
Unknown |
13 |
The migration solution is not known and may need a complete rewrite. |
A.1.3. Task category
In addition to the level of effort, you can categorize migration tasks to indicate the severity of the task. The following categories are used to group issues to help prioritize the migration effort.
- Mandatory
-
The task must be completed for a successful migration. If the changes are not made, the resulting application will not build or run successfully. Examples include replacement of proprietary APIs that are not supported in the target platform.
- Optional
-
If the migration task is not completed, the application should work, but the results may not be optimal. If the change is not made at the time of migration, it is recommended to put it on the schedule soon after your migration is completed. An example of this would be the upgrade of EJB 2.x code to EJB 3.
- Potential
-
The task should be examined during the migration process, but there is not enough detailed information to determine if the task is mandatory for the migration to succeed. An example of this would be migrating a third-party proprietary type where there is no directly compatible type.
- Information
-
The task is included to inform you of the existence of certain files. These may need to be examined or modified as part of the modernization effort, but changes are typically not required. An example of this would be the presence of a logging dependency or a Maven
pom.xml
.
For more information on categorizing tasks, see Using custom rule categories.
A.2. Additional resources
A.2.1. Reviewing existing {ProductShortName} XML rules
{ProductShortName} XML-based rules are located on GitHub at the following location: https://github.com/windup/windup-rulesets/tree/master/rules-reviewed.
You can fork and clone the {ProductShortName} XML rules on your local machine.
Rules are grouped by target platform and function. When you create a new rule, it is helpful to find a rule that is similar to the one you need and use it as a starting template.
New rules are continually added, so it is a good idea to check back frequently to review the updates.
Forking and cloning the Migration Toolkit for Applications XML rules
The Migration Toolkit for Applications windup-rulesets
repository provides provide working examples of how to create custom Java-based rule add-ons and XML rules. You can use them as a starting point for creating your own custom rules.

-
Click the
Fork
link on the Migration Toolkit for Applications Rulesets GitHub page to create the project in your own Git. The forked GitHub repository URL created by the fork should look like this:https://github.com/<YOUR_USER_NAME>/windup-rulesets.git
. -
Clone your Migration Toolkit for Applications rulesets repository to your local file system:
$ git clone https://github.com/<YOUR_USER_NAME>/windup-rulesets.git
-
This creates and populates a
windup-rulesets
directory on your local file system. Navigate to the newly created directory, for example$ cd windup-rulesets/
-
If you want to be able to retrieve the latest code updates, add the remote
upstream
repository so you can fetch any changes to the original forked repository.$ git remote add upstream https://github.com/windup/windup-rulesets.git
-
Get the latest files from the
upstream
repository.$ git fetch upstream
A.2.2. Resources
-
{ProductShortName} Javadoc: http://windup.github.io/windup/docs/latest/javadoc
-
{ProductShortName} forums: https://developer.jboss.org/en/windup
-
{ProductShortName} Jira issue trackers
-
Core {ProductShortName}: https://issues.redhat.com/projects/WINDUP
-
{ProductShortName} Rules: https://issues.redhat.com/projects/WINDUPRULE
-
-
{ProductShortName} mailing list<EMAIL_ADDRESS>-
{ProductShortName} IRC channel: Server FreeNode (
irc.freenode.net
), channel#windup
(transcripts)
Revised on 2021-12-06 11:34:10 +0200


{{ template "htmlbegin" . }} {{ template "dashboardbegin" . }}
You are about to delete the resource server {{ .resourceServer.Name }} with {{.resourceServer.Id}}
You must accept the risk to delete the resource server. Beware this is a non recoverable action. Meaning we cannot restore the resource server once deleted. All information will be lost. Stay safe.


The idea behind Micro Frontends is to think about a website or web app as a composition of features which are owned by independent teams.
Each team has a distinct area of business or mission it cares about and specializes in. A team is cross functional and develops its features end-to-end, from database to user interface.
To evaluate the feasibility of using micro front end for ISM.


Content security policy
The content security policy field specifies which types of content can be loaded and executed by the application.
If this field is not set, no content security policy is enforced. By default, this means that a Crosswalk application can load scripts and objects from any host (via
At the same time, you may want to tighten Crosswalk's security to restrict the application to loading scripts only from that domain and from the app. (The default Crosswalk configuration allows loading scripts from any remote host.)
In these cases, you can explicitly specify the CSP, whitelisting resources from the application itself and from known domains:
"csp": "script-src 'self' https://cdn.crosswalk-project.org/; object-src 'self'"
This only allows scripts to be downloaded from the application itself or from
https:\/\/cdn.crosswalk-project.org/
. Note that you can only use arbitrary URLs with the "https://" scheme; or "http://" URLs which refer to "localhost" or "<IP_ADDRESS>". The latter may be useful if you have your own server running on the same machine as the application.Enable the use of
eval()
inside scriptsThe following CSP (recommended above as the minimum policy):
"csp": "script-src 'self'; object-src 'self'"
disables the use of "unsafe" JavaScript. This means that any calls to
eval()
will not be allowed.In most cases, the recommendation is to avoid
eval()
at all costs, as it can be a vector for Cross-Site Scripting attacks. These can be particularly dangerous in the context of an application which has privileged access to system resources (the way a Crosswalk application does).However, you may find yourself in a situation where you are trying to use a third party library which depends on
eval()
; or in a situation where usingeval()
is the most sensible and pragmatic solution. In these situations, you may decide that it is appropriate to relax the content security policy to alloweval()
to be invoked.You can allow the use of
eval()
by adding'unsafe-eval'
to the CSP, as follows:"csp": "script-src 'self' 'unsafe-eval'; object-src 'self'"
Enable inline JavaScript
In some situations, you may want to incorporate inline JavaScript in an HTML file via

This is usually not necessary, as you can often put the script into an external file instead and reference it via the
src
attribute:
But there are occasionally cases where you may want to inline a script (e.g. for performance reasons).
If you have inline JavaScript and have specified a
csp
, you may find that you get this warning:Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution.
The quickest solution is to add the
'unsafe-inline'
keyword:"csp": "script-src 'self' 'unsafe-inline'; object-src 'self'"
Inline scripts should now execute.


A collection of visualization examples leveraging the data and APIs of CivicData.com and Boulder County, CO Building Permit BLDS data.
These examples were built with:
Built by: Seth Axthelm.
Code available on GitHub.


After manufacturing heating equipment for over fifty years, we know what it takes to produce high quality products that are affordable and reliable. Now with our Capri Plus range of condensing boilers, with a 2 year guarantee as standard, we believe anyone can have an industry leading product at an affordable cost.
As a result of becoming stockist, you will receive:
So, if you want to be a part of our rapidly expanding approved stockist network, please enter your details below and a member of our team will contact you.


The world-wide phenomena of the hour of code is coming to an end. JLS has coded 17,000 Lines of code! Keep it up JLS! Computers teacher Mrs. Willis has not yet finished counting, but so far, that 17,000! Some of this years most popular games are, LightBot, Minecraft Build-A-Game, And Moana has been a real hit after the disney movie. Students in Mrs. Willis’s Computer class have been exclusively teaching 5th graders how to code, as well as devoting their time to helping JLS students at lunch. Students have been coming everyday to code at lunch, and since there aren't near enough computers, some people have shared 1 computer for 4 people! Nice sharing JLS!
If you are in 8th grade, you probably heard of this. Our first final. Students have been freaking out over studying, and that's a good thing. Some have not been studying whatsoever. SPECIAL INTERVIEW; Students saying what they think about the math final.
“It was da scary and da death” - Jeaston
“I think i did very well” - Bryce


Per guest prepare six peaces of vinegar with pressed ground beef for dessert.
Per guest prepare four tablespoons of red wine with warmed ghee for dessert.


{% extends 'frontend/layouts/base.html' %} {% block content %} {% load static %} {% load humanize %} {% load widget_tweaks %} {% include 'frontend/layouts/header_ad.html' %}
We've emailed you instructions for setting your password, if an account exists with the email you entered. You should receive them shortly. If you don't receive an email, please make sure you've entered the address you registered with, and check your spam folder.


Positive Reinforment Shaming Activity Tracker
We support you, but you can do better!
Select a runner


Before Change
ax = my_frame.subplot_imshow(0, 0, image, normalize=True)
normed = ((image - np.min(image)) / np.max(image))
assert ((ax.get_array() - normed) < 0.000001).all(), "RGB subplot image was not normalized."
def test_01_05_imshow_log_normalized(self):
"""Make sure the image drawn by imshow is log normalized."""
image = np.zeros((100, 100))
After Change
ax = my_frame.subplot_imshow(0, 0, image, normalize=True)
normed = ((image - np.min(image)) / np.max(image))
shown_im = ax.get_array().astype(float) / 255.0
np.testing.assert_almost_equal(normed, shown_im, decimal=2)
def test_01_05_imshow_log_normalized(self):
"""Make sure the image drawn by imshow is log normalized."""


INEC presents Certificate of Return to Bello Thursday
by https://www.facebook.com/CheerfulpraiseJames Azania, Lokoja
The Independent National Electoral Commission (INEC) is to present the Kogi State governor, Alhaji Yahaya Bello, with his certificate of return on Thursday having won last Saturday’s governorship election in the state.
The INEC in a release Wednesday, in Lokoja, said that the presentation of the certificate of return to the winner of the November 16 governorship election, Alhaji Yahaya Adoza Bello, will take place at 11am, at the Mahmood Yakubu Collation Centre, INEC Office, Lokoja.


Interview with Darkness about his qualification into Copa America Season 3
Read More!
Happy to announce the addition of KilleR to the Roster


Summarize for You!
Text to Summarize
The text you would like to have summarized.
Summary Length
The length in sentences you want the summarized result to be.
Summarize!
Summarized Text


UP govt orders return of power staff's provident fund invested in DHFL
The government order issued by Principal Secretary (Power) Arvind Kumar said all legal options would be explored for the recovery of the money
by Press Trust of IndiaThe Uttar Pradesh Government on Saturday night issued an order ensuring the return of state power employees' provident fund invested in scam-hit housing fiance company DHFL.
The government order issued by Principal Secretary (Power) Arvind Kumar said all legal options would be explored for the recovery of the money.
Over Rs 2,600 crore of the power employees' provident fund (PF) was reportedly invested in the scam-hit Dewan Housing Finance Corporation Limited (DHFL), prompting the state government to order a CBI probe.
The order issued on Saturday also spelled out ways and means that will be adopted for ensuring the return of the employees' money.
Earlier this week, employees of Uttar Pradesh Power Corporation Limited (UPPCL) had observed a 48-hour protest against the PF scam and had sought a government guarantee for the safe return of their money.


I'm an IT professional with over 24 years of diverse experience that includes application development, enterprise architecture, strategic planning and portfolio governance, business process design, investment optimization, and third party vendor technical relationship oversight.
I have an innovation mindset and love to explore and prototype new technologies for business and customer benefit.
Technical Skills
I view my key strengths as the following:
Personal
I'm (almost) a Florida native, having moved from the midwest just after High school and completing my BS Computer Science at Florida Atlantic University.
I love the Ocean and am an avid Kayaker, as well as Scuba Diver - helping lead a local dive club called Kayuba.
My other interests include 3D modeling/rendering, motorcycling (Harley Deuce), playing guitar, and traveling.
Currently
I'm very engaged in both Virtual Reality, as well as Voice computing. Using Oculus Rift/Unity3D, I created the first VR demos for American Express to demonstrate use cases in eLearning as well as virtual Architecture (building) walkthroughs.
I'm proud to be one of the first (1000) Amazon "Alexa" skill developers, having developed "The Music Man" for Amazon Echo customers. "The Music Man" is written in Java, hosted in AWS/Lambda, and leverages a third party "Songkick" API to allow users to query where their favorite musical
artists are playing next, or the calendar of events coming to a local venue.


Sweet Free Stuff
///////////////////////////////////////////
Free Doritos Loaded 2 Pack at 7-Eleven
Posted: 06 Mar 2015 01:21 PM PST
http://feedproxy.google.com/&edburner&utm_medium=email
Download their mobile app then go to the scan and save section to redeem.
Don’t push redeem until you are ready to use the coupon because it’s only
good for 15 minutes after that. Expires 4/30. Free Doritos Loaded 2 Pack at
7-Eleven
The post Free Doritos Loaded 2 Pack at 7-Eleven appeared first on Sweet
Free Stuff.
///////////////////////////////////////////
Free Fireball Whisky Swag
Posted: 06 Mar 2015 01:00 PM PST
http://feedproxy.google.com/&edburner&utm_medium=email
Free Fireball Whisky Swag
The post Free Fireball Whisky Swag appeared first on Sweet Free Stuff.
///////////////////////////////////////////
Free Hormel REV a.m. Wrap at Kroger & Affiliate Stores
Posted: 06 Mar 2015 03:52 AM PST
http://feedproxy.google.com/&edburner&utm_medium=email
Load the coupon to your shoppers card today only (3/6) and use by 3/21.
Free Hormel REV a.m. Wrap at Kroger Affiliate Stores
The post Free Hormel REV a.m. Wrap at Kroger Affiliate Stores appeared
first on Sweet Free Stuff.
///////////////////////////////////////////
25 FREE Pampers Gifts to Grow Points
Posted: 06 Mar 2015 01:15 AM PST
http://feedproxy.google.com/&edburner&utm_medium=email
To login please click here and enter the code: FB87CNEQ45KKK14 for 15 more
points. Also go here and scroll down the page and click the Ive read it
button for 10 more points. (If you need to register, click here to sign up
and receive 100 points!) The Pampers Gifts to Grow Rewards Program rewards
you for choosing Pampers diapers, []
The post 25 FREE Pampers Gifts to Grow Points appeared first on Sweet Free
Stuff.
///////////////////////////////////////////
Free Dark Chocolate YORK Peppermint Pattie
Posted: 05 Mar 2015 11:05 PM PST
http://feedproxy.google.com/&edburner&utm_medium=email
Save 100% when you buy ONE (1) Dark Chocolate YORK Peppermint Pattie
(1.4oz. only). Expires 3/8/15. Free Dark Chocolate YORK Peppermint Pattie
The post Free Dark Chocolate YORK Peppermint Pattie appeared first on Sweet
Free Stuff.
///////////////////////////////////////////
Free Healthy Product Samples
Posted: 05 Mar 2015 09:01 PM PST
http://feedproxy.google.com/&edburner&utm_medium=email
FREE Healthy Product Samples
The post Free Healthy Product Samples appeared first on Sweet Free Stuff.
///////////////////////////////////////////
Free Reeses Product Coupon
Posted: 05 Mar 2015 09:00 PM PST
http://feedproxy.google.com/&edburner&utm_medium=email
Free Reese’s Product Coupon
The post Free Reese’s Product Coupon appeared first on Sweet Free Stuff.
///////////////////////////////////////////
Earn Cash and Prizes for Scanning your Purchases - NCP
Posted: 05 Mar 2015 09:00 PM PST
http://feedproxy.google.com/&edburner&utm_medium=email
Earn Free Cash and Prizes from Nielsen Home Scan Consumer Panel Click Here
to Sign up! As a panel member, they will provide you with a hand-held
scanner. Every time you or members of your household shop, youll use the
scanner to scan the barcodes on all of your purchases. Then, once a week,
youll []
The post Earn Cash and Prizes for Scanning your Purchases – NCP appeared
first on Sweet Free Stuff.
///////////////////////////////////////////
Free Diabetic Recipe Book
Posted: 05 Mar 2015 09:00 PM PST
http://feedproxy.google.com/&edburner&utm_medium=email
Free Diabetic Recipe Book
The post Free Diabetic Recipe Book appeared first on Sweet Free Stuff.


Demos how to edit node titles with - dblclick - Shift + click - [F2] - [Enter] (on Mac)
jquery.dynatree.js project home Link to this page Example Browser View source code


Thank you for allowing me to join the Krate team, even if for a short while.I've never had a boss as organized and awesome as you. The complete opposite of micromanager you really allowed me to grow, with the team and as a developer. I owe you lunch, where I'll probably ask a lot of questions.
Batch exports. Ohhhh batch exports how I love thee! Thank you for all the extra knowlege in Photoshop, Fireworks or anything else. While I'm not a designer, I now know that I won't drown in the potentially cofusing tools that designesr live in. I also owe you for the motivation to make some good lunches.
Little did you know, I sometimes got nervous when working on a project. Maybe it wasn't up to Krate standards or I was writing something incorrectly. Your calm vibes and easy-going outlook on development proved to me that every problem has solution and there is never a reason to panic. And worst case scenario, copy and paste.
I owe you many baked goods. Thanks for taking time out of your day to help me learn the beginnings of Git or the MailChimp integration we did with Washington Square Park. You'll be proud to know that I'm Git-ing pretty well now!  Just not so sure I'll be vim worthy, yet.
You taught me far more than I ever imagined and at least one-third of my time was spent at your desk talking about the latest CSS3 specs or experimenting on the finer moments in front-end development. I've never met a more curious developer, which in my opinion is the best quality someone can have. You made it clear that code fluency didn't finish a project, but the will to satisfy your curiosity in a new language, work-flow or technique is what makes a project great. If I'm one-tenth as curious as you are I'll be happy.
Since I don't speak dog I'm hoping Jamie can translate with treats and/or hugs. You made those troubling IE days easier to stomach with the impromptu petting sessions.


Novaseq VS 4000
Data are from NRG projects.
How:
- Took a sample that have been sequenced on 4000 twice, compare the overlapping reads and detect variations between the two batch of data (potential errors)
- Took a sample that have been sequenced on 4000 and NovaSeq, compare the overlapping reads and detect variations between the two batch of data (potential errors)
Result:
For each compariation, the number of reads generated for both batches are similar.
The true error rate would be half of the error_rate showing in the table.
| Type |
Overlap |
error_rate, per bp |
| 4000 VS 4000 |
65% |
0.00026 |
| 4000 VS Novaseq |
72% |
0.00014 |
| Novaseq VS Novaseq |
69% |
0.00019 |


Victoria Sponge Cake
Summary
Named after Queen Victoria, who was known to enjoy a slice with her afternoon tea, this treat is often referred to simply as "sponge cake".
- Preparation time: less than 30 mins.
- Cooking time: 10 to 30 mins.
- Yields: 1 Cake.
- Serves: approximately 8 people.
Ingredients
- 125g/4oz butter or margarine, softened
- 125g/4oz caster sugar
- 2 medium eggs
- 125g/4oz self raising flour
Method
- Heat the oven to 180C/350F/Gas 4.
- Line two 18cm/7in cake tins with baking parchment
- Cream the butter and the sugar together until pale.
- Beat in the eggs.
- Sift over the flour and fold in using a large metal spoon.
- Divide the mixture between the cake tins and gently spread out with a spatula. Bake for 20-25 minutes until an inserted skewer comes out clean.
- Allow to stand for 5 minutes before turning on to a wire rack to cool.
- Sandwich the cakes together with jam, lemon curd or whipped cream and berries or just enjoy on its own.


Example index.html. Use /goledger and arg for the command line arguments. Output will be in the browser.


SACP Congress To Follow Up On Implementation Of Resolutions
by NG EditorThe South African Communist Party (SACP) plans to start its special national congress on Monday with discussions focussing on whether the party is prepared to contest the next general elections and if its leaders are permitted to serve in cabinet.
The congress is planning to review the pmplemtation of resolutions taken since the SACP’s national congress two years ago. SACP’s spokesperson Alex Mashilo said there were a number of issues that would be discussed at the congress.
“Congress will pay attention to the reality prevailing at the current moment. Unemployment has risen, poverty and inequality remain entrenched,” he said.
“The resolution called for the reconfiguration of the alliance and the SACP to lead a process to establish a popular left front. What the special national congress will do is to assess progress in the implementation of that resolution,” he said.


Giving Token is a decentralized application with ethereum smart contract or more popularly called erc20.
Giving Token has been supported by popular wallets on your computer, your smartphone, or websites like Mew, Metamask, Trustwallet, Imtoken and other erc20 wallets.
One of the most popular uses for Giving Token is "tipping" fellow internet-goers who create or share great content. Think of it as a more meaningful "like" or upvote, with real value that can be used all across the internet.
Token suply 75,000,000,000 GIVING
Team & Advisor 7%
Reserve 15%
Premium members 30%
Community Campaign 50%
So what are you waiting for? Start using Giving Token today!
Getting started


O.k. so me and 2 other friends decide to do some shrooms, for me like the 10th time, and for them the first. We're all between 23-26 years old. Roughly 2.5 eighths in weight of some killer goodness steamed in tea, then drank and ate what-ever was in the tea.
Location: Forest in Illinois
O.k. so this is like April/May 05' and we're wearing jackets, we have beer, and a nice sized boom-box with a bunch of weird psychedelic CD's, mostly new age weird experimental stuff and meditation CD's) So we just ingested the shrooms before entering the forest, roughly 10 minutes in, we can all feel it kicking in faster than usual. About a mile in, it hit me so hard that I couldn't walk anymore, neither could the others.....so we stopped at a huge fallen tree where we sat.
O.k. everythings cool, we put on this weird experimental tape that I found in a 2nd hand store...no titles...just really weird music. The usual happens, fluidity, it felt and looked as if I had crystal fluid glasses on because my vision was fine but felt like looking through a cartoonish type translucent lense. This was new. THIS TAPE is incredible, it was shocking to hear this type of oddness. Everything's good, until the inevitable!!!!!!!!!
About 30 minutes into the trip.  I look to my left, and my one buddy is intently staring into the woods with his flashlight, as if he sees something. I tell myself....he's a funny 1st timer, I look at my other buddy and he's staring in the opposite direction at something as well. I'm thinking to myself, these amateurs, until I quickly realize 2 balls of light 1 red and one white floating in between the tree's close to each other but separate movements real slow. My 1 buddy was staring at them, and I quickly scanned my mental vault on all my previous experiences, never finding any oddities like this. Since I was a seasoned tripper, I never ever found myself seeing outside self sustained illogical forms with their own personality, at least not on shrooms and never to a point where we're all seeing the same thing.
 I follow his stare to find that there are some kind of entities hiding behind the tree's in the other direction and making noises by stepping over twigs and leaves, also roughly 40-50 yards off. So I do two things. First I ask the buddy what he sees in the tree line and he points to the 2 balls of light still floating in between the branches. I then ask the other buddy what is he seeing, and he mentions the strange beings hiding behind the tree's. He points one out as it moves from behind one tree to behind another tree closer to us, and we all see it move, roughly 5 feet high and odd shaped, slender, and definitely not a person.
The adventure begins. I could sense an evil energy or presence from these beings and so could the others. We decide to leave and as we try to make it back to the path, we find ourselves skipping time, and no matter which route we tried, we always ended up back where we started from. The time skipping went something like, I would mention something like 'is this the right way?' as I stepped on a twig cracking it, then instantly, we're back to that same moment of me asking the same question, snapping the same twig. Instantely we all stop and ask ourselves if time just skipped. Logically we come to the conclusion that it's illogical, but quickly fin ourselves repeating various skips and always ending up in the same original place. We decide it's no use, we must be in a time warp.
As we sat back down on the log, we could see that there were now close to 20-30 of them, and we were starting to see flashes of dark red lights that would come on and illuminate roughly 10 foot diameter circles of areas in the forest. This happened 3-4 times around us...maybe 10 yards away. This area was illuminated as if someone turned on a red light bulb, but we could never find the light bulb or source of the light. They would stay illuminated for roughly 5-10 seconds and would scan the ground area for 1-2 yards.
Earlier in the trip a 4th friend was supposed to join us and said that he would drop by to see how were doing and have a beer. We roughly remembered that he was dropping by soon, as luck would have it, he calls just when we make the realization of this time warp and red illuminations. He's in the forest and walking toward us so we direct him over the phone. Finally he finds us and we tell him everything. As we're telling him the story, the 4 of us (one of us is not shrooming) still see a bunch of something in the distance (a litlle further now than previously) and we hear an evil shriek laugh above in the tree lines, clearly not the sound of 2 tree's rubbing against each other. It was an intelligent laugh. The 4th non-shroomin dude is like, 'I'm outta here, follow me since I know the way out.'
I couldn't walk. Something was keeping me there and my mind was skipping time again. I told them I'll be right there because I still had to grab my boom-box and beers, but by the time I picked them up, the 3 of them were out of site. I yelled to them, and they yelled back, 'Just run over here.' I tried and still trying to follow their voices time kept skipping and I kept ending up in the same place. That was it. I stayed and had to figure out what to do next.
So I'm standing up in the middle of the original spot, and as I look, I can clearly see these evil demonic looking dragon type beings closing in on me and all around me. It seemed like hundreds of them as far as I can see. 50 yards, then 40, then 30, then 20. It begins to rain on me and thunder a little. I make a realization that I'm going to have to fight my way out of here, my only chance of survival. I took my leather bomber off and started stretching my arms and back for battle. I felt extra strength and made a realization that I should pray for divine intervention.
They close in so tightly that I can see the white of their eyes, faces distorted and dragon like, each one with a different look to it. As I prayed and began to spin around in circles trying to anticipate which one would lunge first, my next realization was to really ask God for a favor. Under my breath I asked God to help me out in this situation and I asked with as much faith as I could muster.
Then instantly, the sound of a train, since there is a train yard close by. But this one was extremely loud. The rain stopped and while I did not know what was going on, I noticed these demons were moving back a little. Instinctly I knew God was sending some-one to help me. I actually thought I was going to meet Christ or some arch-angel to get me through this. I waited for the arrival, when lo and behold, I hear my buddy in the distance yelling out for me. 'Where you at?????' 'I'm over here'........So he meets up with me and the first thing he says is.....'just look down, donít even look at them and follow me.' I asked him if he knew the way out and he obliged. At this point the trip is over for the both of us, but we still see 'them' amongst the trees as we make our way back.
Since that day, the 3 of them don't even want to discuss this day. While we have all shroomed after, they have purposefully tried to etch this out of their memories. Still I get it out of them every once in a while. Small details here and there. After extensive research, I found out that...this particular area was the scene of 3 dead bodies of young boys back in the 70's called the famous Schuessler murders. Also these areas are rich with cult activities from the last 4 decades. I am now changed and obsessed with God over this one experience.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


{# Template for any scripted graphics, i.e. D3 charts #} {% extends 'base.html' %} {% from 'macros/prose.html' import prose %} {% block content %}
Start creating graphics by copying graphic.html and/or graphic-static.html, both located in the templates/ folder, and pasting it in the app/ folder at the top level. You can make as many graphics as you need. Feel free to rename the files!
graphic.html is set up for graphics involving JavaScript
graphic-static.html is set up for static graphics (HTML tables, Adobe Illustrator graphics)
All of our graphics are set up to fetch text and other attributes from a Google Doc. Here's the template for that. You'll need to make a copy of this template and swap out the template's file ID with your copy's file ID in project.config.js, in the files property. Then, run npm run data:fetch and you'll see your text in the templates.
For more documentation on the kit, check out the README and our kit setup guide.


Connecting to server...
Connect to :3753
No devices currently connected.
Zephyr supplies REST and WebSocket (Socket.IO) APIs. Check out the wiki for the latest documentation.


A tool to analyze Twitter users using sentiment analysis to determine where a user falls on a scale of opinionated versus factualness, and whether their attitude is more positive, or more negative. Compare Twitter users' emotional/factual bias. Compare 2 users to each other, or see which of 2 users a 3rd user is more aligned with. (Advanced version)