diff --git a/docs/Core-Development-Guide.adoc b/docs/Core-Development-Guide.adoc
new file mode 100644
index 0000000000..763e98ea3f
--- /dev/null
+++ b/docs/Core-Development-Guide.adoc
@@ -0,0 +1,115 @@
+[[Core-Development-Guide]]
+=== Windup Core Development Guide
+
+This guide is for developers who plan to contribute source code updates
+or core rule add-ons to the Windup 2.0 project.
+
+==== Overview
+
+* xref:What-is-Windup[What is Windup]?
+* xref:Features-of-Windup-2.0[Features of Windup 2.0]
+* xref:About-the-WINDUP_HOME-Variable[About the WINDUP_HOME Variable]
+
+==== Get Started
+
+Before you begin to contribute to Windup, take a quick tour to see how to use it.
+
+* xref:Install-and-Configure-Maven[Install and Configure Maven]
+* xref:Dev-Get-the-Windup-Source-Code[Get the Windup Source Code]
+* xref:Dev-Build-Windup-from-Source[Build Windup from Source]
+* xref:Dev-Execute-Windup-Built-from-Source[Execute Windup Built from Source]
+* xref:Review-the-Report[Review the Report]
+
+==== Developer Contributing Information
+
+* xref:Dev-Development-Guidelines-and-Conventions[Developer Guidelines and Conventions]
+* xref:Dev-Submit-Code-Updates-to-the-Windup-Project[Submit Code Updates to the Windup Project]
+
+==== Understand the Windup Architecture and Structure
+
+* xref:Windup-Processing-Overview[Windup Processing Overview]
+* xref:Windup-Architectural-Components[Windup Architectural Components]
+* xref:Dev-Windup-Project-Structure[Windup Project Structure]
+
+==== Rules and Rulesets
+
+* xref:Windup-Processing-Overview.adoc[Windup Processing Overview]
+* xref:Rules-Rule-Execution-Lifecycle[Rules Execution Lifecyle]
+* xref:Rules-Rule-Story-Points[Rule Story Points]
+* xref:Rules-Difference-Between-XML-based-and-Java-based-Rules[Difference Between XML-based and Java-based Rules]
+
+==== Create and Test Java Rule Add-ons
+
+* xref:Rules-Java-based-Rule-Structure[Java-based Rule Structure]
+* xref:Rules-Basic-Rule-Execution-Flow-Patterns[Basic Rule Execution Flow Patterns]
+* xref:Rules-Create-a-Basic-Java-based-Rule-Add-on[Create a Basic Java-based Rule Add-on]
+* xref:Rules-Create-an-Advanced-Ruleset[Create an Advanced Ruleset]
+
+==== Create and Test XML Rules
+
+* xref:Rules-Create-a-Basic-XML-Rule[Create a Basic XML Rule]
+
+* xref:Rules-Test-a-Basic-XML-Rule-in-Windup[Test an XML Rule in Windup]
+
+==== Debugging and Troubleshooting
+
+* xref:Dev-Debugging-and-Profiling[Debugging and Profiling]
+* xref:Dev-Troubleshooting[Troubleshooting]
+
+==== Developer topics
+
+* xref:Dev-Windup-Bootstrap[Bootstrap]
+* xref:Dev-Classloading-Notes[Classloading Notes]
+* xref:Dev-Connect-to-the-Graph-via-Rexster[Connect to the Graph via Rexster]
+* xref:Dev-Decompiling[Decompiling]
+* xref:Dev-Dependencies[Dependencies]
+* xref:Dev-Frames-Extensions[Frames Extensions]
+* xref:Dev-Internal-API-Features[Internal API Features]
+* xref:Dev-Logging[Logging]
+* xref:Dev-Variables-Stack[Variables Stack]
+* xref:Dev-Port-WindRide-Functionality-to-Windup[Port WindRide Functionality to Windup]
+* xref:Dev-Git-Rebasing[Git Rebasing]
+* xref:Dev-Releasing-Windup[Releasing Windup]
+
+==== Rules topics
+
+* xref:Rules-Available-Rules-Utilities[Available Utilities]
+* xref:Dev-Concepts-and-Philosophy[Concepts and Philosophy]
+* xref:Rules-Creating-Rule-Operations[Creating Rules Operations]
+* xref:Rules-Rulesets[Rulesets]
+** xref:Ruleset-Java-Basic-Ruleset[Java Basic Ruleset]
+** xref:Ruleset-Java-Classifications-and-Inline-Hints[Ruleset Java Classifications and Inline Hints]
+** xref:Ruleset-Java-EE-Apps[Java EE Apps Ruleset]
+** xref:Ruleset-Java-EE-Servers[Java EE Servers Ruleset]
+** xref:Ruleset-Reporting[Reporting Ruleset]
+* xref:Ruleset-XML[XML Ruleset]
+* xref:Rules-Windup-Models[Windup Models]
+* xref:Rules-Create-Java-Queries[Create Java Queries]
+* xref:Rules-Rules-Metadata[Rules Metadata]
+* xref:Rules-Rules-Operations[Rules Operations]
+** xref:Rules-Ops-Reporting-Classification[Rules Ops: Reporting: Classification]
+** xref:Rules-Ops-Reporting-Hint[Rules Ops: Reporting: Hint]
+** xref:Rules-Ops-Reporting-TypeReference[Rules Ops: Reporting: TypeReference]
+** xref:Rules-Ops-Xml-XsltTrasformation[Rules Ops: XML: XSLT Transformation]
+* xref:Rules-Java-based-Rule-Structure[Java-Based Rule Structure]
+
+==== Wiki and Product Documentation
+
+* xref:About-the-Windup-Wiki[About the Windup Wiki]
+* xref:Dev-Add-Images-to-the-Windup-Wiki[Add Images to the Windup Wiki]
+* xref:Dev-Create-Windup-JavaDoc[Create Windup JavaDoc]
+* xref:Dev-Windup-Documentation-Process[Windup Documentation Process]
+
+==== Additional Resources
+
+* xref:Review-the-Windup-Quickstarts[Review the Windup Quickstarts]
+* xref:Get-Involved[Get Involved] - We need your feedback!
+* xref:Known-Issues[Known Issues]
+* xref:Report-Issues-with-Windup[Report Issues with Windup]
+
+==== Appendix
+
+* xref:Glossary[Glossary of Terms]
+* xref:Dev-Windup-Project-Information[Windup Project Information] - Github
+repository, IRC, Mailing lists, ...
+
diff --git a/docs/Core-Development-Guide.asciidoc b/docs/Core-Development-Guide.asciidoc
deleted file mode 100644
index 4a23ca1197..0000000000
--- a/docs/Core-Development-Guide.asciidoc
+++ /dev/null
@@ -1,97 +0,0 @@
-[[Core-Development-Guide]]
-=== Windup Core Development Guide
-
-This guide is for developers who plan to contribute source code updates
-or core rule add-ons to the Windup 2.0 project.
-
-==== Overview
-
-* link:What-is-Windup[What is Windup]?
-* link:Features-of-Windup-2.0[Features of Windup 2.0]
-* link:Get-Involved[Get Involved] - We need your feedback!
-* link:Dev-Windup-Project-Information[Windup Project Information] - Github
-repository, IRC, Mailing lists, ...
-* link:Report-Issues-with-Windup[Report Issues with Windup]
-* link:About-the-WINDUP_HOME-Variable[About the WINDUP_HOME Variable]
-
-==== Get Started
-* link:Install-and-Configure-Maven[Install and Configure Maven]
-* link:Dev-Get-the-Windup-Source-Code[Get the Windup Source Code]
-* link:Dev-Build-Windup-from-Source[Build Windup from Source]
-* link:Dev-Execute-Windup-Built-from-Source[Execute Windup Built from Source]
-* link:Review-the-Report[Review the Report]
-
-==== Developer Contributing Information
-
-* link:Dev-Development-Guidelines-and-Conventions[Developer Guidelines and Conventions]
-* link:Dev-Submit-Code-Updates-to-the-Windup-Project[Submit Code Updates to the Windup Project]
-
-==== Understand the Windup Architecture and Structure
-
-* link:Windup-Processing-Overview[Windup Processing Overview]
-* link:Windup-Architectural-Components[Windup Architectural Components]
-* link:Dev-Windup-Project-Structure[Windup Project Structure]
-
-==== Rules and Rulesets
-
-* link:Rules-Rule-Execution-Lifecycle[Rules Execution Lifecyle]
-* link:Rules-Rule-Story-Points[Rule Story Points]
-
-
-==== Debugging and Troubleshooting
-
-* link:Dev-Debugging-and-Profiling[Debugging and Profiling]
-* link:Dev-Troubleshooting[Troubleshooting]
-
-==== Developer topics
-
-* link:Dev-Windup-Bootstrap[Bootstrap]
-* link:Dev-Classloading-Notes[Classloading Notes]
-* link:Dev-Connect-to-the-Graph-via-Rexster[Connect to the Graph via Rexster]
-* link:Dev-Decompiling[Decompiling]
-* link:Dev-Dependencies[Dependencies]
-* link:Dev-Frames-Extensions[Frames Extensions]
-* link:Dev-Internal-API-Features[Internal API Features]
-* link:Dev-Logging[Logging]
-* link:Dev-Variables-Stack[Variables Stack]
-* link:Dev-Port-WindRide-Functionality-to-Windup[Port WindRide Functionality to Windup]
-* link:Dev-Git-Rebasing[Git Rebasing]
-* link:Dev-Releasing-Windup[Releasing Windup]
-
-==== Rules topics
-
-* link:Rules-Available-Rules-Utilities[Available Utilities]
-* link:Dev-Concepts-and-Philosophy[Concepts and Philosophy]
-* link:Rules-Creating-Rule-Operations[Creating Rules Operations]
-* link:Rules-Rulesets[Rulesets]
-** link:Ruleset-Java-Basic-Ruleset[Java Basic Ruleset]
-** link:Ruleset-Java-Classifications-and-Inline-Hints[Ruleset Java Classifications and Inline Hints]
-** link:Ruleset-Java-EE-Apps[Java EE Apps Ruleset]
-** link:Ruleset-Java-EE-Servers[Java EE Servers Ruleset]
-** link:Ruleset-Reporting[Reporting Ruleset]
-* link:Ruleset-XML[XML Ruleset]
-* link:Rules-Windup-Models[Windup Models]
-* link:Rules-Create-Java-Queries[Create Java Queries]
-* link:Rules-Rules-Metadata[Rules Metadata]
-* link:Rules-Rules-Operations[Rules Operations]
-** link:Rules-Ops-Reporting-Classification[Rules Ops: Reporting: Classification]
-** link:Rules-Ops-Reporting-Hint[Rules Ops: Reporting: Hint]
-** link:Rules-Ops-Reporting-TypeReference[Rules Ops: Reporting: TypeReference]
-** link:Rules-Ops-Xml-XsltTrasformation[Rules Ops: XML: XSLT Transformation]
-* link:Rules-Java-based-Rule-Structure[Java-Based Rule Structure]
-
-==== Wiki and Product Documentation
-
-* link:About-the-Windup-Wiki[About the Windup Wiki]
-* link:Dev-Add-Images-to-the-Windup-Wiki[Add Images to the Windup Wiki]
-* link:Dev-Create-Windup-JavaDoc[Create Windup JavaDoc]
-* link:Dev-Windup-Documentation-Process[Windup Documentation Process]
-
-==== Additional Resources
-
-* link:Review-the-Windup-Quickstarts[Review the Windup Quickstarts]
-* link:Known-Issues[Known Issues]
-* link:Glossary[Glossary]
-
-* link:Glossary[Glossary of Terms]
-
diff --git a/docs/Dev-Add-Images-to-the-Windup-Wiki.adoc b/docs/Dev-Add-Images-to-the-Windup-Wiki.adoc
index 9b74c08e45..bbe55ba9ab 100644
--- a/docs/Dev-Add-Images-to-the-Windup-Wiki.adoc
+++ b/docs/Dev-Add-Images-to-the-Windup-Wiki.adoc
@@ -1,6 +1,8 @@
[[Dev-Add-Images-to-the-Windup-Wiki]]
=== Add Images to the Windup Wiki
+:imagesdir: images
+
* Fork https://github.com/windup/windup/wiki
* Clone the Windup Wiki into a `windup.wiki/` directory using the SSH clone URL:
@@ -32,15 +34,19 @@
git push origin HEAD:master
-* Test the new image in a page on your own Wiki.
+* Test the new image in a page on your own Wiki. Don't forget to add the `:imagesdir: images` directive to the beginning of the page to point to the images directory.
- image:images/IMAGE_NAME.png[New Image]
+ image:IMAGE_NAME.png[New Image]
+
For example:
+
-image:images/windup-logo-large.png[Windup Logo]
+:imagesdir: images
+
+==== My Image
+
+image:/windup-logo-large.png[Windup Logo]
* If it works, push the image to the upstream repository
diff --git a/docs/Dev-Customer-Portal-Tags.adoc b/docs/Dev-Customer-Portal-Tags.adoc
new file mode 100644
index 0000000000..4448f78341
--- /dev/null
+++ b/docs/Dev-Customer-Portal-Tags.adoc
@@ -0,0 +1,57 @@
+=== Customer Portal Tags
+
+_This is a work in progress, so please feel free to update this page with new tag suggestions!_
+
+==== Tags Needed For Most Articles
+
+The following is a list and description of tags that currently exist on the Customer Portal that we should use when writing Windup migration articles for the Customer Portal.
+
+windup:: All Windup articles should use this tag so we can quickly find all the Windup articles.
+
+migration:: All Windup articles should use this tag so a search includes the articles.
+
+jboss-eap:: Migration material for JBoss EAP platforms.
+
+weblogic:: Migration material related to WebLogic.
+
+websphere:: Migration material related to WebLogic.
+
+java:: Java related issues
+
+==== Additional Tags That are Available
+
+api::
+archive::
+authentication::
+classloading::
+configuration::
+database::
+deployment::
+ejb::
+jboss_cache::
+jboss_clustering::
+jboss_security::
+jboss_remoting::
+jboss_transactions::
+jbossweb::
+jca::
+jms::
+jndi::
+jpa::
+jsf::
+ldap::
+load_balancing::
+mbean::
+messaging::
+webservices::
+ws-security:: Web Service security
+
+
+==== Questions
+
+. What other tags do we need?
+. Do we need version specific tags? For example, 'jboss-eap-5', 'jboss-eap-6', 'websphere-8', 'weblogic-10'.
+.. If so, do we go into point releases like 'jboss-eap-6.2', 'websphere-8.5' or 'weblogic-12cR2'?
+.. Would it be better just to add a bunch of release numbers like '6', '6.1', '6.2', '8', etc. and use them with a product tag to create more flexibility?
+
+
diff --git a/docs/Dev-How-to-Write-a-Rule-Test.adoc b/docs/Dev-How-to-Write-a-Rule-Test.adoc
new file mode 100644
index 0000000000..38b388919b
--- /dev/null
+++ b/docs/Dev-How-to-Write-a-Rule-Test.adoc
@@ -0,0 +1,205 @@
+[[Dev-How-to-Write-a-Rule-Test]]
+=== How to Write a Rule Test
+
+.DRAFT
+
+Generally, you can test a rule in one of the following ways.
+
+. Call `perform()` on the given `GraphContext`,
+. Execute Windup using `WindupExecutor`.
+
+Examples of both are below.
+
+==== Follow These Steps to Create a Test
+
+. Create an Arquillian test with a `@Deployment` method.
++
+[source,java]
+----
+@RunWith(Arquillian.class)
+public class MyTest extends AbstractTestCase
+{
+ @Deployment
+ @Dependencies({
+ })
+ public static ForgeArchive getDeployment() {
+ return ShrinkWrap.create(ForgeArchive.class)
+ ...;
+ }
+}
+----
+. Add all the Windup add-ons needed for the rule.
+* Failure to add all necessary dependencies will lead to WARNINGs from Furnace.
+* Transitive dependencies declared by the add-on POM file are loaded automatically, so you should be safe adding the add-ons you use in your code.
+* Remember to add the dependencies to the `pom.xml` file, otherwise Furnace will throw
+a misleading error "Could not find a version for `org.foo:bar`".
++
+[source,java]
+----
+@Dependencies({
+ @AddonDependency(name = "org.jboss.windup.graph:windup-graph"),
+ ...
+})
+...
+ ForgeArchive archive = ShrinkWrap.create(ForgeArchive.class)
+ ...
+ .addAsAddonDependencies(
+ AddonDependencyEntry.create("org.jboss.windup.graph:windup-graph"),
+ ...
+ );
+----
+. Add the test classes to the archive.
++
+This can be tricky because failure to add all test classes can lead to cryptic errors from JBoss Modules, which does not tell you which class was not found. To avoid problems, here are few tips:
+
+* Do not use ShrinkWrap's `.addPackage(...)`. That can lead to duplicated classes since test classes sometimes use the same package name as the tested classes. Also, during refactoring, classes move around but the packages stay the same. It is preferable to add specific classes using the `addClasses(...)` method. +
+Duplicated classes cause problems like same class being treated as different (e.g. when using `class.getAnnotation()`).
+* Do not reuse helper classes between tests. A test should be totally independent. If you use e.g. some rules from implementation, even just when you really need any class, and that is moved, your test starts failing. Also, do not use other test's classes. We recommend to create a package for your test and have everything in it.
+* Test isolated features instead of few big test aiming many features at once.
++
+[source,java]
+----
+ForgeArchive archive = ShrinkWrap.create(ForgeArchive.class)
+ ...
+ .addBeansXML()
+ .addClasses(FooModel.class, TestRuleProvider)
+ //.addPackage(MyRuleTest.class.getPackage())
+ .addAsResource(new File("src/test/resources/reports"))
+ .addAsAddonDependencies(
+ AddonDependencyEntry.create("org.jboss.windup.graph:windup-graph"),
+ ...
+ );
+----
+. `@Inject GraphContext`
+
+For rules testing, we will have a special harness in the future.
+
+==== Test Examples
+
+[source,java]
+----
+@RunWith(Arquillian.class)
+public class MapInPropertiesTest
+{
+ @Deployment
+ @Dependencies({
+ @AddonDependency(name = "org.jboss.windup.graph:windup-graph"),
+ @AddonDependency(name = "org.jboss.windup.utils:utils"),
+ @AddonDependency(name = "org.jboss.forge.furnace.container:cdi")
+ })
+ public static ForgeArchive getDeployment()
+ {
+ ForgeArchive archive = ShrinkWrap.create(ForgeArchive.class)
+ .addBeansXML()
+ .addPackage("org.jboss.windup.graph.typedgraph.mapinprops")
+ .addAsAddonDependencies(
+ AddonDependencyEntry.create("org.jboss.windup.graph:windup-graph"),
+ AddonDependencyEntry.create("org.jboss.windup.utils:utils"),
+ AddonDependencyEntry.create("org.jboss.forge.furnace.container:cdi")
+ );
+ return archive;
+ }
+
+ @Inject private GraphContext context;
+
+ @Test public void testMapHandling() throws Exception {
+ ....
+ }
+}
+----
+
+A test which builds it's own runtime environment:
+
+[source,java]
+----
+@RunWith(Arquillian.class)
+public class FreeMarkerIterationOperationTest extends AbstractTestCase
+{
+ @Deployment
+ @Dependencies({
+ @AddonDependency(name = "org.jboss.windup.config:windup-config"),
+ @AddonDependency(name = "org.jboss.windup.graph:windup-graph"),
+ @AddonDependency(name = "org.jboss.windup.reporting:windup-reporting"),
+ @AddonDependency(name = "org.jboss.forge.furnace.container:cdi")
+ })
+ public static ForgeArchive getDeployment()
+ {
+ ForgeArchive archive = ShrinkWrap.create(ForgeArchive.class)
+ .addBeansXML()
+ .addClass(AbstractTestCase.class)
+ .addClass(FreeMarkerOperationRuleProvider.class)
+ .addAsResource(new File("src/test/resources/reports"))
+ .addAsAddonDependencies(
+ AddonDependencyEntry.create("org.jboss.windup.config:windup-config"),
+ AddonDependencyEntry.create("org.jboss.windup.graph:windup-graph"),
+ AddonDependencyEntry.create("org.jboss.windup.reporting:windup-reporting"),
+ AddonDependencyEntry.create("org.jboss.forge.furnace.container:cdi")
+ );
+ return archive;
+ }
+
+ @Inject
+ private GraphContext context;
+ @Inject
+ private FreeMarkerOperationRuleProvider provider;
+
+ private Path tempFolder;
+
+ @Test
+ public void testApplicationReportFreemarker() throws Exception
+ {
+ GraphRewrite event = new GraphRewrite(context);
+ DefaultEvaluationContext evaluationContext = createEvalContext(event);
+ fillData(context);
+
+ Configuration configuration = provider.getConfiguration(context);
+
+ RuleSubset.evaluate(configuration).perform(event, evaluationContext);
+
+ Path outputFile = tempFolder.resolve(provider.getOutputFilename());
+ String results = FileUtils.readFileToString(outputFile.toFile());
+ Assert.assertEquals("Test freemarker report", results);
+ }
+
+ private void fillData(final GraphContext context) throws Exception
+ {
+ WindupConfigurationModel cfgModel = context.getFramed().addVertex(null, WindupConfigurationModel.class);
+ ...
+
+ ApplicationReportModel appReportModel = context.getFramed().addVertex(null, ApplicationReportModel.class);
+ ...
+ }
+
+ private DefaultEvaluationContext createEvalContext(GraphRewrite event)
+ {
+ final Variables varStack = Variables.instance(event);
+ final DefaultEvaluationContext evaluationContext = new DefaultEvaluationContext();
+ final DefaultParameterValueStore values = new DefaultParameterValueStore();
+ evaluationContext.put(ParameterValueStore.class, values);
+ event.getRewriteContext().put(Variables.class, varStack);
+ return evaluationContext;
+ }
+}
+----
+
+TO_DO: TBD:
+
+[source,java]
+----
+Query.find(FileModel.class).piped( new QueryGremlinCriterion() {
+ @Override
+ public void query( GraphRewrite event, GremlinPipeline pipeline ) {
+ pipeline...
+ }
+})
+----
+
+Test a subset of Rules
+
+See
+https://github.com/lincolnthree/windup/tree/WINDUP-133/rules/app/java/src/test/java/org/jboss/windup/rules/java
+(TBD)
+
+==== What is the Module (add-on) _DEFAULT_? What does it's classloader see?
+
+That is the module of the current Forge Test Case. It is created on-the-fly for the purpose of a test.
\ No newline at end of file
diff --git a/docs/Dev-Jenkins-Setup.adoc b/docs/Dev-Jenkins-Setup.adoc
new file mode 100644
index 0000000000..a7ea1fc001
--- /dev/null
+++ b/docs/Dev-Jenkins-Setup.adoc
@@ -0,0 +1,63 @@
+[[Dev-Jenkins-Setup]]
+=== Jenkins Setup
+
+Windup team has a Jenkins instance on OpenStack.
+
+This is the description of how to set it up.
+
+==== Requirements
+
+* Instance size: c3.mxlarge or bigger
+* System: RHEL 7 GA Guest
+
+==== Procedure To Set It Up
+
+. Get a RHN account. Your organization should give you one.
+. Add your keys to OpenStack
+. Login to the machine - user is `cloud-user`
+. `sudo su -`
+. `subscription-manager register --auto-attach`
+. `subscription-manager repos` - pick some repo(s) to use.
++
+----
+subscription-manager repos --enable=rhel-7-server-htb-rpms
+subscription-manager repos --enable=rhel-7-server-optional-rpms
+subscription-manager repos --enable=rhel-7-server-rpms/7Server
+subscription-manager repos --enable=rhel-7-server-rt-beta-rpms
+subscription-manager repos --enable=rhel-7-server-rt-htb-rpms
+subscription-manager repos --enable=rhel-7-server-rt-rpms
+subscription-manager repos --enable=rhel-ha-for-rhel-7-server-eus-rpms
+subscription-manager repos --enable=rhel-ha-for-rhel-7-server-htb-rpms
+subscription-manager repos --enable=rhel-ha-for-rhel-7-server-rpms
+subscription-manager repos --enable=rhel-lb-for-rhel-7-server-htb-rpms
+subscription-manager repos --enable=rhel-rs-for-rhel-7-server-eus-rpms
+subscription-manager repos --enable=rhel-rs-for-rhel-7-server-htb-rpms
+subscription-manager repos --enable=rhel-rs-for-rhel-7-server-rpms
+subscription-manager repos --enable=rhel-sap-for-rhel-7-server-rpms
+
+yum install -y java-1.7.0-openjdk java-1.7.0-openjdk-devel
+yum install -y wget git unzip mc lsof
+
+subscription-manager repos \
+--enable rhel-server-7-ose-beta-rpms \
+--enable jb-eap-6.3-for-rhel-7-server-source-rpms \
+--enable jb-eap-6-for-rhel-7-server-source-rpms \
+--enable jb-ews-2-for-rhel-7-server-rpms
+
+yum update -y
+
+wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
+rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
+yum install -y jenkins
+----
+
+. `service jenkins start` # or stop or restart
+. Install Maven 3.2.5
++
+----
+wget http://apache.miloslavbrada.cz/maven/maven-3/3.3.1/binaries/apache-maven-3.3.1-bin.zip
+unzip -q apache-maven-3.3.1-bin.zip
+mkdir /sw
+mv apache-maven-3.3.1 /sw/maven-3.3.1
+ln -s /sw/maven-3.3.1/bin/mvn /usr/bin/mvn
+----
\ No newline at end of file
diff --git a/docs/Dev-Release-Checklist.adoc b/docs/Dev-Release-Checklist.adoc
new file mode 100644
index 0000000000..1dde3dfe3a
--- /dev/null
+++ b/docs/Dev-Release-Checklist.adoc
@@ -0,0 +1,15 @@
+[[Dev-Release-Checklist]]
+=== Windup Release Checklist
+
+* Build & upload artifacts
+* Update `...` in:
+ * windup-rulesets
+ * windup-quickstats (each pom.xml separatedly)
+ * windup-distribution
+* Build & upload the distribution zip
+* Javadoc to windup/windup, branch gh-pages
+* HTML single-page docs to windup/windup, branch gh-pages
+* Announce to mailing lists (windup-users@lists.jboss.org, jboss-migration@redhat.com)
+* Mark the version as released in Jira
+* Push the unresolved issues to the next version
+* Roll out the barrels & celebrate
\ No newline at end of file
diff --git a/docs/Dev-Rule-Documentation-Tracker.adoc b/docs/Dev-Rule-Documentation-Tracker.adoc
new file mode 100644
index 0000000000..035ac7b50c
--- /dev/null
+++ b/docs/Dev-Rule-Documentation-Tracker.adoc
@@ -0,0 +1,5 @@
+=== Rule Documentation Tracker
+
+The content for this page has been moved to Google Docs: https://docs.google.com/spreadsheets/d/19xaibv1xZr1L3ss256A9ak08oqg-zFxuvzlmOHiMtHw/edit#gid=1133431410
+
+The list of available Kbase articles is located here: https://access.redhat.com/search/browse/articles#?&col=portal_articles&language=All&portal_language=en&portal_tag=windup
\ No newline at end of file
diff --git a/docs/Dev-Rule-Metadata-and-API-Discrepancies.adoc b/docs/Dev-Rule-Metadata-and-API-Discrepancies.adoc
new file mode 100644
index 0000000000..18c76b3032
--- /dev/null
+++ b/docs/Dev-Rule-Metadata-and-API-Discrepancies.adoc
@@ -0,0 +1,52 @@
+[[Dev-Rule-Metadata-and-API-Discrepancies]]
+=== Rule Metadata and API Discrepancies
+
+.DRAFT
+
+These are notes about technical debt, which will probably never be removed.
+
+==== API
+
+ public void perform(GraphRewrite event, EvaluationContext evCtx)
+
+Why do we need both event and evaluation context? I think we don't, they could be merged.
+What is an "event"? The name doesn't fit.
+
+ GraphContext#setOptions()
+
+What is this? Is it really related to graph?
+
+
+==== Metadata
+
+ Object cat = event.getRewriteContext().get(RuleMetadata.CATEGORY);
+
+What does it do in `RewriteContext`? That should be bound to `Rule(Provider)`, not a context.
+More, this metadata needs the executor to run, wheares other like `getExecuteAfter()` don't.
+
+Data stored to `RewriteContext` e.g. in `enhanceMetadatadata()` go to rules, not to `RuleProvider`s.
+This leads to every rule having a `contextMap` where identical values are referenced.
+
+They are under:
+
+ context.map[WindupRuleMetadata].providersToRules[?RuleProvider][?].contextMap
+ [CATEGORY] = "java,security"
+ [RULE_PROVIDER] = ...
+ [ORIGIN] = ...
+
+Why does `enhanceMetadata(Context rewriteCtx)` get a `rewrite.Context`? Why not some `RuleProvider`-related object?
+
+==== GraphRewrite event
+
+The event object is actually not an event. It does not bear any aspects of any event. It is a context. As such, it would be practical to have it injected by CDI, from appropriate scope - in this case, application scope.
+
+[source,java]
+------------------
+@Override
+public void beforeExecution(GraphRewrite event)
+{
+ LOG.info("Registered " + ArchiveIdentificationGraphChangedListener.class.getSimpleName()
+ + "- Archives will be identified automatically.");
+ event.getGraphContext().getGraph().addListener(new ArchiveIdentificationGraphChangedListener(event));
+}
+------------------
diff --git a/docs/Dev-Team-Meeting.adoc b/docs/Dev-Team-Meeting.adoc
new file mode 100644
index 0000000000..7453cf6c03
--- /dev/null
+++ b/docs/Dev-Team-Meeting.adoc
@@ -0,0 +1,25 @@
+[Dev-Team-Meeting]
+=== Team Meeting
+
+==== When and Where?
+Wednesday at #windup @ Freenode.org
+
+Eventually with a videochat session.
+
+==== IRC bot meeting commands
+
+----
+#startmeeting
+(16:03:01) jbott: Useful Commands: #action #agreed #help #info #idea #link #topic.
+#chair lincolnthree ozizka jsightler mbriskar
+#topic Agenda
+#addtopic Status Reports
+#addtopic Priorities
+
+#nexttopic
+#info ...
+#action
+#idea
+
+#endmeeting
+----
\ No newline at end of file
diff --git a/docs/Dev-Test-Logging.adoc b/docs/Dev-Test-Logging.adoc
new file mode 100644
index 0000000000..5089654bd8
--- /dev/null
+++ b/docs/Dev-Test-Logging.adoc
@@ -0,0 +1,66 @@
+[[Dev-Test-Logging]]
+=== Test Logging
+
+This section describes how to configure different logging utilities to control logging during unit and integration test execution. It also describes how to limit or increase the logging levels.
+
+==== JUL (java.util.logging)
+
+. Find your JRE using the command for your operating system.
++
+--------
+For Linux:
+ Command: $ readlink -f `which java`
+ Example result: `/usr/lib/jvm/java-7-openjdk-amd64/jre`.
+For Windows: C:> echo %JAVA_HOME%.
+ Example result: C:\Program Files\Java\jre7\
+--------
+. Add the following to the `JAVA_HOME/lib/logging.properties` file:
++
+--------
+# Valid levels are SEVERE, WARNING, INFO, FINE, FINER, FINEST, CONFIG
+
+# To enable windup debug logging
+org.jboss.windup.level = FINEST
+
+org.jboss.forge.level = WARNING
+# To prevent AddonLoader's "missing dependencies: ..."
+org.jboss.forge.furnace.impl.addons.level = OFF
+
+org.jboss.weld.level = WARNING
+org.jboss.weld.event.level = SEVERE
+org.jboss.weld.interceptor.util.InterceptionTypeRegistry.level = SEVERE
+
+#com.thinkaurelius.titan.diskstorage.level = SEVERE
+com.thinkaurelius.titan.level = SEVERE
+--------
+
+==== Slf4j (Weld, ...)
+
+--------
+-Dorg.slf4j.simpleLogger.defaultLogLevel=ERROR
+-Dorg.slf4j.simpleLogger.log.org.jboss.weld.event.ExtensionObserverMethodImpl=ERROR
+--------
+
+For details, see http://www.slf4j.org/apidocs/org/slf4j/impl/SimpleLogger.html.
+
+Add the following system properties to the http://maven.apache.org/surefire/maven-surefire-plugin/examples/system-properties.html[Maven Surefire] configuration:
+
+[source,xml]
+--------
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 2.17
+
+
+ ${testExcludeString}
+
+
+ ERROR
+ ERROR
+
+ -Xms512m -Xmx2048m -XX:MaxPermSize=512m
+
+
+--------
diff --git a/docs/Dev-Windup-Configuration.adoc b/docs/Dev-Windup-Configuration.adoc
new file mode 100644
index 0000000000..3ebc37db58
--- /dev/null
+++ b/docs/Dev-Windup-Configuration.adoc
@@ -0,0 +1,68 @@
+[[Dev-Windup-Configuration]]
+=== Windup Configuration
+
+This section describes the how Windup processes configuration arguments. Windup configuration handles of the following types of arguments.
+
+* Forge related arguments
+* Windup Core arguments
+* Windup Rules arguments
+
+== Forge related arguments
+
+Forge related arguments are those that process add-ons and affect Forge execution mode.
+
+* --install
+* --remove
+* --list
+* --addonDir
+* --immutableAddonDir
+* --batchMode
+* --evaluate
+* --debug
+* --version
+
+These arguments are handled in the Windup `Bootstrap` class.
+
+TO_DO: Link (to some Forge page?)
+
+== Windup Core arguments
+
+The following are Windup core arguments:
+
+* `--input` - `InputPathOption`
+* `--output` - `OutputPathOption`
+* `--offline` - `OfflineModeOption`
+* `--userRules` - `UserRulesDirectoryOption`
+* `--userIgnoreFiles` - `UserIgnoreFilesOption`
+
+==== Getting the arguments value
+You can either get a specific option
+
+-------
+WindupConfiguration.getOptionValue(OfflineModeOption.NAME)
+-------
+
+or iterate over all options:
+
+-------
+WindupConfiguration.getWindupConfigurationOptions()
+-------
+
+== Custom Arguments for Rules
+
+Additional arguments are made available to Windup rules using a special API. For more information about Windup rules arguments, see xref:Rules-Rule-Configuration[Rule Configuration].
+
+Each option is an implementation of http://windup.github.io/windup/docs/javadoc/latest/org/jboss/windup/config/WindupConfigurationOption.html[WindupConfigurationOption].
+
+Examples:
+
+* `org.jboss.windup.rules.apps.java.config.ScanPackagesOption`
+* `org.jboss.windup.rules.apps.java.config.ExcludePackagesOption`
+* `org.jboss.windup.rules.apps.java.config.SourceModeOption`
+
+===== Processing Argument Sequence
+
+When the user runs ./windup, the `Bootstrap` class intercepts the Forge arguments and processes them. The other arguments are passed to Windup, which processes them and then distributes them to the right place. During rule execution, the Windup rule arguments are accessed and evaluated.
+
+
+
diff --git a/docs/Dev-Windup-Web.adoc b/docs/Dev-Windup-Web.adoc
new file mode 100644
index 0000000000..f8cf1025c7
--- /dev/null
+++ b/docs/Dev-Windup-Web.adoc
@@ -0,0 +1,17 @@
+[Dev-Windup-Web]
+=== Windup Web
+
+.DRAFT
+
+Hosted by Red Hat / JBoss.org
+
+Source code is currently at https://github.com/windup/windup.jboss.org
+
+==== How to get access
+
+While hosted by Red Hat, the procedure is to send your ssh public key; After adding, you can log in the user `windup` to `filemgmt.jboss.org` and access `www_htdocs/windup`. (eng-ops)
+
+----
+sftp windup@filemgmt.jboss.org
+cd www_htdocs/windup
+----
\ No newline at end of file
diff --git a/docs/Execute-Windup.adoc b/docs/Execute-Windup.adoc
index 6a34468c67..56f201ea72 100644
--- a/docs/Execute-Windup.adoc
+++ b/docs/Execute-Windup.adoc
@@ -58,22 +58,24 @@ JBoss Windup, version [ 2.0.0-VERSION ] - JBoss, by Red Hat, Inc. [ http://windu
. The command to run Windup is `windup-migrate-app`.
-. The following is a list of the most commonly used command line arguments.
+. This command can take arbitrary options processed by different addons. The list of options in the core Windup distribution can be found in http://windup.github.io/windup/docs/latest/javadoc/org/jboss/windup/config/ConfigurationOption.html[Javadoc]. Most commonly used command line arguments are:
+
--input *INPUT_ARCHIVE_OR_FOLDER*:: This is the fully qualified application archive or source path.
+
---source-mode true (optional):: This argument is optional and is only required if the application to be evaluated contains source files rather than compiled binaries. The default value is `false`.
-+
--output *OUTPUT_REPORT_DIRECTORY*:: The fully qualified path to the folder that will contain the the report information produced by Windup.
+
NOTE: If the *OUTPUT_REPORT_DIRECTORY* directory exists and you do not specify the `--overwrite` argument, you are prompted to overwrite the contents. If you respond "y", it is deleted and recreated by Windup, so be careful not to specify an output directory that contains important information!
+
--overwrite (optional):: Specify this optional argument only if you are certain you want to force Windup to delete the existing *OUTPUT_REPORT_DIRECTORY*. The default value is `false`.
+
+--userRulesDirectory:: Points to a directory to load XML rules from. (Search pattern: *.windup.groovy and *.windup.xml)
++
--packages *PACKAGE_1*, *PACKAGE_2*, *PACKAGE_N* (optional):: This is a comma-delimited list of the packages to be evaluated by Windup.
+
--excludePackages *PACKAGE_1*, *PACKAGE_2*, *PACKAGE_N* (optional):: This is a comma-delimited list of the packages to be excluded by Windup.
++
+--source-mode true (optional):: This argument is optional and is only required if the application to be evaluated contains source files rather than compiled binaries. The default value is `false`.
. To evaluate an application archive, use the following syntax:
+
diff --git a/docs/Extend-Windup-Rules.adoc b/docs/Extend-Windup-Rules.adoc
new file mode 100644
index 0000000000..dfffdbf001
--- /dev/null
+++ b/docs/Extend-Windup-Rules.adoc
@@ -0,0 +1,6 @@
+[[Extend-Windup-Rules]]
+=== Extend Windup Rules
+
+.DRAFT
+
+This page is under construction. Check back later!
\ No newline at end of file
diff --git a/docs/Home.adoc b/docs/Home.adoc
new file mode 100644
index 0000000000..d74a69a777
--- /dev/null
+++ b/docs/Home.adoc
@@ -0,0 +1,47 @@
+= Welcome to Windup, JBoss Migration tool
+
+_NOTE: The Windup 2.x is still under development. If you
+want to contribute or participate in developer discussions, join us on
+the irc.freenode.net #windup channel or subscribe to the https://lists.jboss.org/mailman/listinfo/windup-dev[windup-dev
+mailing list]._
+
+// include::News.asciidoc[]
+
+== About Windup
+
+Windup 2.0 is a tool used to simplify Java application migrations. It is the
+sequel to the original Windup 0.7.x, which has moved to the
+https://github.com/windup/windup-legacy[windup-legacy] GitHub repository.
+
+* xref:What-is-Windup[What is Windup?] (also, Windup 2.0 vs. Windup 0.7.x)
+* xref:https://repository.jboss.org/nexus/service/local/artifact/maven/redirect?r=releases&g=org.jboss.windup&a=windup-distribution&v=LATEST&e=zip&c=offline[Download Latest Windup Release]
+* xref:Features-of-Windup-2.0[Features of Windup 2.0]
+* xref:Get-Involved[Get Involved] - We need your feedback!
+* xref:Known-Issues[Known Issues] - Review the known issues to find out how to work around problems.
+* xref:Report-Issues-with-Windup[Report Issues] - If you run into any problems executing Windup or understanding the instructions, please report it so we can make it better. (https://issues.jboss.org/browse/WINDUP[Quick link to Jira])
+
+== Windup Guides
+
+Windup documentation is organized into guides that target specific
+audiences.
+
+* xref:./User-Guide[Windup User Guide] is for engineers, consultants, or others who plan to use
+Windup to migrate applications or other components. For a single page HTML version, see the xref:http://windup.github.io/windup/docs/latest/html/WindupUserGuide.html[Windup User Guide].
+* xref:./Rules-Development-Guide[Windup Rules Development Guide] provides details for developers, consultants, and others who plan to create custom rule add-ons for the Windup 2.0 project. For a single page HTML version, see the xref:http://windup.github.io/windup/docs/latest/html/WindupRulesDevelopmentGuide.html[Windup Rules Development Guide].
+* xref:./Core-Development-Guide[Windup Core Development Guide] provides information for developers who plan to contribute source code updates or core rule add-ons to the Windup 2.0 project. For a single page HTML version, see the xref:http://windup.github.io/windup/docs/latest/html/WindupCoreDevelopmentGuide.html[Windup Core Development Guide].
+* xref:./Migration-Planning-Guide[Migration Planning Guide] is for developers, Project Managers, or IT managers who must
+interpret the Windup reports and develop a project plan.
+
+== Additional Resources
+
+* Windup documentation (generated from the Wiki documentation at the link above):
+** http://windup.github.io/windup/docs/latest/html/WindupUserGuide.html[Windup User Guide]
+** http://windup.github.io/windup/docs/latest/html/WindupRulesDevelopmentGuide.html[Windup Rules Development Guide]
+** http://windup.github.io/windup/docs/latest/html/WindupCoreDevelopmentGuide.html[Windup Core Development Guide]
+* Windup Javadoc: xref:http://windup.github.io/windup/docs/latest/javadoc[Windup JavaDoc]
+* Windup Forums: https://community.jboss.org/en/windup
+* Windup Issue Tracker: https://issues.jboss.org/browse/WINDUP
+* Windup Users Mailing List: windup-users@lists.jboss.org
+* Windup Developers Mailing List: windup-dev@lists.jboss.org
+* Windup Commits Mailing List: windup-commits@lists.jboss.org
+* Windup on Twitter: https://twitter.com/jbosswindup[@JBossWindup], https://twitter.com/search?q=%23windup%20OR%20%23jboss%20AND%20%23migration&src=typd[#windup OR #jboss AND #migration]
diff --git a/docs/Migration-Planning-Guide.adoc b/docs/Migration-Planning-Guide.adoc
new file mode 100644
index 0000000000..0f18cf94d3
--- /dev/null
+++ b/docs/Migration-Planning-Guide.adoc
@@ -0,0 +1,10 @@
+[[Migration-Planning-Guide]]
+=== Migration Planning Guide
+
+.DRAFT
+
+This guide is for developers, Project Managers, or IT managers who must
+interpret the Windup reports and develop a migration project plan.
+
+* xref:Migration-Planning-Process[Migration Planning Process]
+* xref:Review-the-Report[Review the Report]
diff --git a/docs/Migration-Planning-Guide.asciidoc b/docs/Migration-Planning-Guide.asciidoc
deleted file mode 100644
index c3125eec15..0000000000
--- a/docs/Migration-Planning-Guide.asciidoc
+++ /dev/null
@@ -1,6 +0,0 @@
-[[migration-planning-guide]]
-Migration Planning Guide
-~~~~~~~~~~~~~~~~~~~~~~~~
-
-This guide is for developers, Project Managers, or IT managers who must
-interpret the Windup reports and develop a migration project plan.
\ No newline at end of file
diff --git a/docs/Migration-Planning-Process.adoc b/docs/Migration-Planning-Process.adoc
new file mode 100644
index 0000000000..856f068f83
--- /dev/null
+++ b/docs/Migration-Planning-Process.adoc
@@ -0,0 +1,44 @@
+[[Migration-Planning-Process]]
+=== Migration Planning Process
+
+
+Before you attempt to migrate your application to JBoss Enterprise Application Platform 6, it helps to have an understanding of the process.
+
+Become familiar with Java Enterprise Edition 6::
+
+JBoss Enterprise Application Platform 6 is a fast, lightweight, powerful implementation of the Java Enterprise Edition 6 specification, so understanding Java EE 6 is a great place to start. If you are not familiar with Java EE 6, review the http://www.oracle.com/technetwork/java/javaee/tech/index.html[Java Enterprise Edition 6 documentation] and the http://docs.oracle.com/javaee/6/tutorial/doc/[Java EE 6 tutorial].
+
+Familiarize yourself with Red Hat JBoss Enterprise Application Platform 6::
+
+Documentation for JBoss EAP 6 is located on the Red Hat Customer Portal at https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/. The _Getting Started Guide provides a quick introduction to the product. The other guides provide detailed information on how to install, configure, and develop applications for Jboess EAP.
+
+Identify the current hardware and operating systems::
+
+This includes the operating systems and versions, number of processors, memory capacity, disk usage and capacity.
+
+Examine the existing application server and platform::
+
+Examine the existing application server and platform, including the operating systems, JVMs, databases, and web servers, and determine the equivalent capabilities in JBoss Enterprise Application Platform 6. The supported JBoss configurations can be found on the Customer Portal at https://access.redhat.com/support/configurations/jboss/.
+
+Examine and understand the existing application::
+
+Thoroughly examine the existing application. Be totally familiar with its architecture, functions, features and components. Inventory the technologies used by the application for database access, security, caching, clustering, and failover. Identify any dependencies on 3rd party software. In particular, note the proprietary APIs and features and determine the JBoss EAP or Java EE 6 equivalents.
+
+Review monitoring and administration procedures and tools::
+
+Perform a review of all monitoring and administration procedures and tools in place to identify any that may need modification or replacement to work with the JBoss Enterprise Application Platform.
+
+Have a backup plan in place::
+
+Before you begin, be sure to have a backup plan in place. This needs to not only the application source code, but must include any production data accessed by the application.
+Review resources available for the migration process::
+
+Resources include people, software, and hardware. Assess the skills of the development team that will be doing the work and plan for training or additional consulting help. Also be aware that additional hardware and other resources will be required during the migration process until the effort is completed.
+
+Prepare a migration plan::
+
+Develop a migration plan including a detailed roadmap and resources that will be needed.
+
+Execute the plan::
+
+Implement the strategic migration plan and employ implementation support strategies.
diff --git a/docs/Migration-Technology-Categories.adoc b/docs/Migration-Technology-Categories.adoc
new file mode 100644
index 0000000000..609f4951c2
--- /dev/null
+++ b/docs/Migration-Technology-Categories.adoc
@@ -0,0 +1,44 @@
+[[Migration-Technology-Categories]]
+=== Migration Technology Categories
+
+.DRAFT
+
+Windup rules categorize changes by technology to make it easier to understand the development and administration skill sets required for the migration effort.
+
+The following is a partial list of suggested technologies.
+
+CDI::
+
+CLUSTERING::
+
+CONFIGURATION:: Requires server configuration
+
+TRANSACTIONS:: Requires understanding of database transactions, SQL...
+
+DATASOURCE:: Requires knowledge of datasource configuration, JBDC Drivers.
+
+EJB3::
+
+JAVACLIENT::
+
+JAXRS::
+
+JMX::
+
+JNDI::
+
+JSF::
+
+LOGGING::
+
+REMOTING::
+
+SECURITY::
+
+SERVLET::
+
+THREADS::
+
+WEB::
+
+WEBSERVICES::
diff --git a/docs/News.adoc b/docs/News.adoc
new file mode 100644
index 0000000000..7c8ff3c8a6
--- /dev/null
+++ b/docs/News.adoc
@@ -0,0 +1,3 @@
+**2014-12-05** Windup 2.0.0.Beta6 released.
+
+**2014-12-22** Windup 2.0.0.Beta7 released.
\ No newline at end of file
diff --git a/docs/Performance-tuning.adoc b/docs/Performance-tuning.adoc
new file mode 100644
index 0000000000..24834cfe8a
--- /dev/null
+++ b/docs/Performance-tuning.adoc
@@ -0,0 +1,77 @@
+TO_DO: This page should link to the Rulesets pages, namely their configuration sections.
+
+# Performance tweaks
+
+#### All artifacts from Maven Central repository are ignored.
+Any jar that comes from Maven Central is omitted from unzipping and decompiling.
+The identity is verified by the archive's SHA1 hash.
+This functionality is provided by the xref:Ruleset-Java-Archives-Identification[_Java Archives Identification Ruleset_].
+
+#### Ignore custom Maven artifacts
+Maven artifacts can be excluded from unzipping and decompilation by declaring ignored artifacts coordinates in a file `~/.windup/conf/ignore/example.archive-ignore.txt`, using the following syntax:
+
+----
+::[:]
+----
+All values can use wildcards at the end. For example, `org.jboss.wildfly.*:*:*` will ignore all artifacts from groups whose groupId starts with `org.jboss.wildfly.`.
+
+Each line in the file is one pattern. All artifacts matched by these patterns will be ignored.
+
+
+#### Ignore Java Packages (and sub-packages)
+Windup may be configured to ignore packages during decompilation and analysis.
+
+When running windup via the command line, you may specify `--excludePackages com.foo` to exclude packages (and all sub-packages.)
+
+Ignored packages may also be configured via a text file with the naming convention `*.package-ignore.txt`.
+
+Windup looks for these files in multiple locations:
+
+ * `~/.windup/ignore/` folder
+ * `$WINDUP_HOME/ignore/` folder
+ * The folder/file specified by the `--userIgnorePath "/custom/ignore/folder/"` option
+
+**Example use case:** Imagine you want to ignore the packages com.acme, com.acme.roadrunner, etc. All you would need to do is create the following file in one of the ignore directories:
+
+[source,text]
+.~/.windup/ignore/example.package-ignore.txt
+----
+com.acme
+----
+
+#### Ignore Files
+Windup may be configured to ignore files during scanning and report generation. Ignored files may be configured via a text file with the naming convention `*.windup-ignore.txt`.
+
+Windup looks for these files in multiple locations:
+
+ * `~/.windup/ignore/` folder
+ * `$WINDUP_HOME/ignore/` folder
+ * The folder/file specified by the `--userIgnorePath "/custom/ignore/folder/"` option
+
+**Example use case:** Imagine you want to ignore the library "ant.jar". If you want to ignore this file globally (for example: every time you run windup regardless of where exactly is your windup installation is located), then you would simply create a file in the `~/.windup/ignore/` folder (this folder is shared for all the local windup instances). The file would be named "example.windup-ignore.txt", and should contain a single line: ".*ant.jar". To ignore for only a single windup installation located in `$WINDUP_HOME`, the file should be created in the `$WINDUP_HOME/ignore/` directory.
+
+[source,text]
+.~/.windup/ignore/example.windup-ignore.txt
+----
+.*ant.jar
+----
+
+[TIP]
+====
+You can use this same approach to ignore files of any type, not just archives. For example, we can also use this same technique to ignore Java source files matching a certain pattern.
+
+[source,text]
+.~/.windup/ignore/java.windup-ignore.txt
+----
+.*/org/example/.*/Example.*\.java
+.*DTO\.java
+----
+====
+
+_(Developers: see also `UserIgnorePathOption` and `GatherIgnoredFileNamesRuleProvider`.)_
+
+
+### Ignore Java files: By package
+
+Java files may also be excluded by package: This is functionality specific to the Java rule-set, and you should consult the xref:Ruleset-Java-Basic-Ruleset#configuration[`--packages`] user input option.
+
diff --git a/docs/Review-the-Report.adoc b/docs/Review-the-Report.adoc
index c1e86d69ac..a33373e032 100644
--- a/docs/Review-the-Report.adoc
+++ b/docs/Review-the-Report.adoc
@@ -1,6 +1,8 @@
[[Review-the-Report]]
=== Review the Report
+:imagesdir: images
+
==== About the Report
When you execute Windup, the report is generated in the `OUTPUT_REPORT_DIRECTORY` you specify for the `--output` argument in the command line. This output directory contains the following files and subdirectories:
@@ -19,7 +21,7 @@ The examples below use the https://github.com/windup/windup/blob/master/test-fil
Use your favorite browser to open the `index.html` file located in the output report directory. You should see something like the following:
-image:images/report-index-page.png[Report Index Page, 500]
+image:report-index-page.png[Report Index Page, 500]
Click on the link under the *Name* column to view the Windup application report page.
@@ -34,7 +36,7 @@ The first section of the application report page summarizes the migration effort
The following is an example of a Windup Application Report.
-image:images/report-javaee-ear-summary.png[Report Summary Page, 500]
+image:report-javaee-ear-summary.png[Report Summary Page, 500]
===== Archive Analysis Sections
@@ -61,7 +63,7 @@ Estimated Story Points:: Level of effort required for migrating the file.
The following is an example of the archive analysis summary section of a Windup Report. In this example, it's the analysis of the `WINDUP_SOURCE/test-files/jee-example-app-1.0.0.ear/jee-example-services.jar`.
-image:images/report-javaee-ear-03-services-jar.png[Report Archive Page, 500]
+image:report-javaee-ear-03-services-jar.png[Report Archive Page, 500]
===== File Analysis Pages
@@ -73,11 +75,11 @@ The analysis of the `jee-example-services.jar` lists the files in the JAR and th
In this example, warnings appear at the import of `weblogic.application.ApplicationLifecycleEvent` and report that the class is proprietary to WebLogic and must be removed.
-image:images/report-javaee-ear-file-detail-part1.png[File Detail - Part 1, 500]
+image:report-javaee-ear-file-detail-part1.png[File Detail - Part 1, 500]
Later in the code, warnings appear for the creation of the InitialContext and for the object name when registering and unregistering an MBeans
-image:images/report-javaee-ear-file-detail-part2.png[File Detail - Part 2, 500]
+image:report-javaee-ear-file-detail-part2.png[File Detail - Part 2, 500]
==== Additional Reports
@@ -87,7 +89,7 @@ Explore the Windup `OUTPUT_REPORT_DIRECTORY/reports` folder to find additional r
The `OUTPUT_REPORT_DIRECTORY/reports/windup_ruleproviders.html` page provides the list of rule providers that executed when running the Windup migration command against the application.
-image:images/report-javaee-ear-ruleprovider.png[RuleProvider Report, 500]
+image:report-javaee-ear-ruleprovider.png[RuleProvider Report, 500]
===== Rule Provider Execution Report
@@ -97,6 +99,6 @@ The `OUTPUT_REPORT_DIRECTORY/reports/windup_ruleproviders.html` page provides th
You can directly access the the file analysis report pages described above by browsing for them by name in the `OUTPUT_REPORT_DIRECTORY/reports/` directory. Because the same common file names can exist in multiple archives, for example "manifest.mf" or "web.xml", Windup adds a unique numeric suffix to each report file name.
-image:images/report-directory-file-list.png[Report Directory File List, 500]
+image:report-directory-file-list.png[Report Directory File List, 500]
diff --git a/docs/Rule-XML-Ruleset-Examples-Match-on-XMLFile.adoc b/docs/Rule-XML-Ruleset-Examples-Match-on-XMLFile.adoc
new file mode 100644
index 0000000000..43c2a40082
--- /dev/null
+++ b/docs/Rule-XML-Ruleset-Examples-Match-on-XMLFile.adoc
@@ -0,0 +1,40 @@
+[[Rule-XML-Ruleset-Examples-Match-on-XMLFile]]
+=== XML Ruleset Examples: Match on "xmlfile"
+
+.DRAFT
+
+
+[source,xml]
+----
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+----
+
+[source,xml]
+----
+
+
+
+
+
+
+
+
+
+
+
+----
diff --git a/docs/Rules-Basic-Rule-Execution-Flow-Patterns.adoc b/docs/Rules-Basic-Rule-Execution-Flow-Patterns.adoc
index 295b76ad7f..11dd41bc84 100644
--- a/docs/Rules-Basic-Rule-Execution-Flow-Patterns.adoc
+++ b/docs/Rules-Basic-Rule-Execution-Flow-Patterns.adoc
@@ -1,15 +1,10 @@
[[Rules-Basic-Rule-Execution-Flow-Patterns]]
=== Basic Rule Execution Flow Patterns
-TO_DO: Need some links to github to the respective example files.
+==== Single Operation - operation();
-==== operation(); - single operation
+No condition or iteration is needed. The following is an example of a single operation.
-When no iteration or condition is needed.
-
-Example: [CopyJavaConfigToGraphRuleProvider](rules-java/src/main/java/org/jboss/windup/rules/apps/java/config/CopyJavaConfigToGraphRuleProvider.java)
-
-[source,java]
--------
return ConfigurationBuilder.begin()
.addRule()
@@ -21,11 +16,14 @@ return ConfigurationBuilder.begin()
});
--------
+Windup source code example: https://github.com/windup/windup/blob/master/rules-java/impl/src/main/java/org/jboss/windup/rules/apps/java/config/CopyJavaConfigToGraphRuleProvider.java#L99-L101
-==== if( ... ){ operation(); } - single conditional operation
+The `copyConfigToGraph` GraphOperation used in the perform() above is defined before the rule.
+==== Single Conditional Operation - if( ... ){ operation()}
-[source,java]
+A single condition must be met. The following is an example of a single conditional operation.
+
--------
return ConfigurationBuilder.begin()
.addRule()
@@ -38,10 +36,11 @@ return ConfigurationBuilder.begin()
});
--------
+Windup source code example: https://github.com/windup/windup/blob/master/reporting/api/src/main/java/org/jboss/windup/reporting/rules/AttachApplicationReportsToIndexRuleProvider.java#L39-L41
-==== for( FooModel.class ){ ... } - Single iteration
+==== Single Iteration - for( FooModel.class ){ ... }
-For simple iterations, `IteratingRuleProvider` can be used, which makes the `perform` a bit less verbose:
+For simple iterations, you can extend the `IteratingRuleProvider` class to simplify the `perform` code.
[source,java]
--------
@@ -67,9 +66,9 @@ public class ComputeArchivesSHA512 extends IteratingRuleProvider
@Override public String toStringPerform() { return this.getClass().getSimpleName(); }
}
--------
+Windup source code example: https://github.com/windup/windup/blob/master/rules-java/api/src/main/java/org/jboss/windup/rules/apps/java/scan/provider/DiscoverArchiveManifestFilesRuleProvider.java
-
-==== if( ... ){ for( ... ) } - conditional iteration
+==== Conditional Iteration - if( ... ){ for( ... ) }
[source,java]
--------
@@ -82,12 +81,11 @@ return ConfigurationBuilder.begin()
.perform( ... )
)
--------
+Windup source code example: https://github.com/windup/windup/blob/master/rules-java-ee/addon/src/main/java/org/jboss/windup/rules/apps/javaee/rules/DiscoverEjbAnnotationsRuleProvider.java#L82-L93
+==== Iteration With a Condition - for( ... ){ if( ... ){ ... } }
-==== for( ... ){ if( ... ){ ... } } - iteration with a condition
-
-[source,java]
--------
return ConfigurationBuilder.begin()
.addRule()
@@ -111,11 +109,21 @@ return ConfigurationBuilder.begin()
.perform( ... )
--------
+Windup source code example: https://github.com/windup/windup/blob/master/reporting/impl/src/main/java/org/jboss/windup/reporting/rules/rendering/RenderReportRuleProvider.java#L46-L66
-==== for( ... ){ for( ... ) { ... } } - nested iterations
+==== Nested Iterations - for( ... ){ for( ... ) { ... } }
-[source,java]
--------
-
+.addRule()
+ .when(...)
+ .perform(Iteration //first iteration
+ .over("list_variable").as("single_var")
+ .perform(
+ Iteration.over("single_var") //second iteration
+ .perform(...).endIteration()
+ )
+ .endIteration()
+);
--------
+Windup source code example: https://github.com/windup/windup/blob/master/config/tests/src/test/java/org/jboss/windup/config/iteration/payload/IterationPayLoadPassTest.java#L183-L202
\ No newline at end of file
diff --git a/docs/Rules-Create-Custom-Reports.adoc b/docs/Rules-Create-Custom-Reports.adoc
new file mode 100644
index 0000000000..4ee6307436
--- /dev/null
+++ b/docs/Rules-Create-Custom-Reports.adoc
@@ -0,0 +1,19 @@
+[[Rules-Create-Custom-Reports]]
+=== Create Custom Reports
+
+.DRAFT
+
+Most custom rules use high-level operations distributed with Windup, such as `Hint`.
+Their results will appear in the report automatically - or better said, the respective rule will add it.
+
+When implemeting a brand new rule with your own conditions and operations, you also need to take care of adding the information to the report - either to some existing report (will appear as new box in one of report Windup creates), or create a new report (will appear as a new file in the output directory).
+
+This page describes how to do both.
+
+
+==== Add Information to an Existing Report
+
+==== Create a New Custom Report
+
+Something like `rules-java/src/main/resources/reports/templates/ignored_files.ftl` might be a good example.
+The report itself is created in CreateJavaIgnoredFilesReportRuleProvider.
\ No newline at end of file
diff --git a/docs/Rules-Create-a-Groovy-Rule-Add-on.adoc b/docs/Rules-Create-a-Groovy-Rule-Add-on.adoc
new file mode 100644
index 0000000000..bd5faec694
--- /dev/null
+++ b/docs/Rules-Create-a-Groovy-Rule-Add-on.adoc
@@ -0,0 +1,39 @@
+[[Rules-Create-a-Groovy-Rule-Add-on]]
+=== Create a Groovy Rule Add-on
+
+You can create a rule add-on using Java or a rule using XML or Groovy. This topic describes how to create a rule add-on using Groovy.
+
+==== Prerequisites
+
+* You should have already xref:Install-Windup[installed Windup].
+* Before you begin, you may also want to be familiar with the following documentation:
+** Windup rules are based on the ocpsoft *rewrite* project. You can find more information about ocpsoft *rewrite* here: http://ocpsoft.org/rewrite/
+** The JavaDoc for the Windup API is located here: http://windup.github.io/windup/docs/javadoc/latest/
+
+NOTE: Working examples of Groovy-based rules can be found in the Windup quickstarts GitHub repository located here: https://github.com/windup/windup-quickstarts
+
+==== Groovy Rule Add-on Example
+
+The following is an example of a Groovy rule add-on.
+
+--------
+ruleSet("ExampleBlacklistRule").setPhase(RulePhase.MIGRATION_RULES)
+
+ .addRule()
+ .when(
+ Query.find(JavaClassModel.class).as("javaClasses")
+ )
+ .perform(
+ Iteration.over("javaClasses").perform(
+ new GraphOperation () {
+ public void perform(GraphRewrite event, EvaluationContext context) {
+ // System.out.println("Performing rewrite operation")
+ }
+ }
+ )
+ )
+ .withMetadata(RuleMetadata.CATEGORY, "Java")
+--------
+
+NOTE: Windup only analyzes Groovy rule files with names ending in `.windup.groovy`. Be sure to name Groovy-based rules using this naming convention!
+
diff --git a/docs/Rules-Creating-Rule-Operations.adoc b/docs/Rules-Creating-Rule-Operations.adoc
index ff47c73ee8..5f934197f8 100644
--- a/docs/Rules-Creating-Rule-Operations.adoc
+++ b/docs/Rules-Creating-Rule-Operations.adoc
@@ -1,6 +1,8 @@
[[Rules-Creating-Rule-Operations]]
=== Creating Rule Operations
+:imagesdir: images
+
An operation is a task which can be invoked from within a rule.
It is created by extending GraphOperation.
@@ -11,8 +13,7 @@ public class FooOperation extends GraphOperation
{
@Override
public void perform(GraphRewrite event, EvaluationContext context)
- {
-
+ {
...
}
}
@@ -20,5 +21,5 @@ public class FooOperation extends GraphOperation
Existing operations:
-image:images/GraphOperationSubtypes.png["Existing operations"]
+image:GraphOperationSubtypes.png["Existing operations"]
diff --git a/docs/Rules-Development-Guide.adoc b/docs/Rules-Development-Guide.adoc
new file mode 100644
index 0000000000..08b6c309af
--- /dev/null
+++ b/docs/Rules-Development-Guide.adoc
@@ -0,0 +1,73 @@
+[[Rules-Development-Guide]]
+=== Rules Development Guide
+
+This guide is for engineers, consultants, or others who plan to create
+rules for Windup 2.0.
+
+==== General Windup Information
+
+* xref:What-is-Windup[What is Windup?]
+* xref:Features-of-Windup-2.0[Features of Windup 2.0]
+* xref:Get-Involved[Get Involved]
+* xref:Report-Issues-with-Windup[Report Issues with Windup]
+* xref:About-the-WINDUP_HOME-Variable[About the WINDUP_HOME Variable]
+
+==== Get Started with Windup
+
+* xref:Install-Windup[Install Windup]
+* xref:Execute-Windup[Execute Windup]
+* xref:Review-the-Report[Review the Report]
+
+==== Configure Your System for Java-based Rules
+
+If you plan to create Java-based rule add-ons, you must also do the following.
+
+* xref:Install-and-Configure-Maven[Install and Configure Maven]
+* xref:http://windup.github.io/windup/docs/javadoc/latest/[Windup API JavaDoc reference]: The JavaDoc can serve as a reference for creating Java-based rule add-ons.
+
+==== Understand the Rule Processing
+
+* xref:Windup-Processing-Overview[Windup Processing Overview]
+* xref:Rules-Rule-Execution-Lifecycle[Rule Execution Lifecycle]
+* xref:Rules-Rule-Story-Points[Rule Story Points]
+* xref:Rules-Difference-Between-XML-based-and-Java-based-Rules[
+Difference Between XML-based and Java-based Rules]
+
+==== Create and Test Java Rule Add-ons
+
+* xref:Rules-Java-based-Rule-Structure[Java-based Rule Structure]
+* xref:Rules-Basic-Rule-Execution-Flow-Patterns[Basic Rule Execution Flow Patterns]
+* xref:Rules-Create-a-Basic-Java-based-Rule-Add-on[Create a Basic Java-based Rule Add-on]
+* xref:Rules-Create-an-Advanced-Ruleset[Create an Advanced Ruleset]
+
+==== Create and Test XML Rules
+
+* xref:Rules-Create-a-Basic-XML-Rule[Create a Basic XML Rule]
+
+** xref:Rules-XML-Rule-When-Condition-Syntax[XML Rule - When Condition Syntax]
+** xref:Rules-XML-Rule-Perform-Action-Syntax[XML Rule - Perform Action Syntax]
+
+* xref:Rules-Test-a-Basic-XML-Rule-in-Windup[Test an XML Rule in Windup]
+
+==== Review the Report
+
+* xref:Review-the-Report[Review the Report]
+
+==== External Rule Examples
+
+* xref:Review-the-Windup-Quickstarts[Review the Windup Quickstarts]
+
+==== Debugging and Troubleshooting
+
+* xref:Dev-Debugging-and-Profiling[Debugging and Profiling]
+* xref:Dev-Troubleshoot-Windup-Issues[Troubleshoot Windup Issues]
+
+==== Additional Help
+
+* xref:Report-Issues-with-Windup[Report Issues with Windup]
+* xref:Glossary[Glossary of Terms]
+
+==== Appendix
+
+* xref:Windup-Architectural-Components[Windup Architectural Components]
+
diff --git a/docs/Rules-Development-Guide.asciidoc b/docs/Rules-Development-Guide.asciidoc
deleted file mode 100644
index 83fd59d6fb..0000000000
--- a/docs/Rules-Development-Guide.asciidoc
+++ /dev/null
@@ -1,73 +0,0 @@
-[[Rules-Development-Guide]]
-=== Rules Development Guide
-
-This guide is for engineers, consultants, or others who plan to create
-rules for Windup 2.0.
-
-==== General Windup Information
-
-* link:What-is-Windup[What is Windup?]
-* link:Features-of-Windup-2.0[Features of Windup 2.0]
-* link:Get-Involved[Get Involved]
-* link:Report-Issues-with-Windup[Report Issues with Windup]
-* link:About-the-WINDUP_HOME-Variable[About the WINDUP_HOME Variable]
-
-==== Get Started with Windup
-
-* link:Install-Windup[Install Windup]
-* link:Execute-Windup[Execute Windup]
-* link:Review-the-Report[Review the Report]
-
-==== Configure Your System for Java-based Rules
-
-If you plan to create Java-based rule add-ons, you must also do the following.
-
-* link:Install-and-Configure-Maven[Install and Configure Maven]
-* link:http://windup.github.io/windup/docs/javadoc/latest/[Windup API JavaDoc reference]: The JavaDoc can serve as a reference for creating Java-based rule add-ons.
-
-==== Understand the Rule Processing
-
-* link:Windup-Processing-Overview[Windup Processing Overview]
-* link:Rules-Rule-Execution-Lifecycle[Rule Execution Lifecycle]
-* link:Rules-Rule-Story-Points[Rule Story Points]
-* link:Rules-Difference-Between-XML-based-and-Java-based-Rules[
-Difference Between XML-based and Java-based Rules]
-
-==== Create and Test Java Rule Add-ons
-
-* link:Rules-Java-based-Rule-Structure[Java-based Rule Structure]
-* link:Rules-Basic-Rule-Execution-Flow-Patterns[Basic Rule Execution Flow Patterns]
-* link:Rules-Create-a-Basic-Java-based-Rule-Add-on[Create a Basic Java-based Rule Add-on]
-* link:Rules-Create-an-Advanced-Ruleset[Create an Advanced Ruleset]
-
-==== Create and Test XML Rules
-
-* link:Rules-Create-a-Basic-XML-Rule[Create a Basic XML Rule]
-
-** link:Rules-XML-Rule-When-Condition-Syntax[XML Rule - When Condition Syntax]
-** link:Rules-XML-Rule-Perform-Action-Syntax[XML Rule - Perform Action Syntax]
-
-* link:Rules-Test-a-Basic-XML-Rule-in-Windup[Test an XML Rule in Windup]
-
-==== Review the Report
-
-* link:Review-the-Report[Review the Report]
-
-==== External Rule Examples
-
-* link:Review-the-Windup-Quickstarts[Review the Windup Quickstarts]
-
-==== Debugging and Troubleshooting
-
-* link:Dev-Debugging-and-Profiling[Debugging and Profiling]
-* link:Dev-Troubleshoot-Windup-Issues[Troubleshoot Windup Issues]
-
-==== Additional Help
-
-* link:Report-Issues-with-Windup[Report Issues with Windup]
-* link:Glossary[Glossary of Terms]
-
-==== Appendix
-
-* link:Windup-Architectural-Components[Windup Architectural Components]
-
diff --git a/docs/Rules-Java-based-Rule-Structure.adoc b/docs/Rules-Java-based-Rule-Structure.adoc
index 4bda3d273f..029520356b 100644
--- a/docs/Rules-Java-based-Rule-Structure.adoc
+++ b/docs/Rules-Java-based-Rule-Structure.adoc
@@ -68,11 +68,17 @@ In the `.when()` part, the rule typically queries the graph, using the
Other way to fill a when part is subclassing the `GraphCondition`.
Actually, `Query` also implements it, and is only a convenient way to
create a condition.
+You can also use multiple conditions within one when() call using and().
+Example:
+----
+.when(Query.fromType(XmlMetaFacetModel.class).and(Query...))
+----
Last noticable but important feature is the ability to use
https://github.com/tinkerpop/gremlin/wiki[Gremlin] queries. See
http://gremlindocs.com/[Gremlin docs] for reference manual.
+
===== perform()
[source,java]
@@ -94,7 +100,7 @@ writes the findings into the graph.
For that, various operations are available. These are subclasses of
`GraphOperation`. You can also implement your own. See
-Rules-Operations[Rules Operations] for more info. Again, there are
+xref:Rules-Rules-Operations[Rules Operations] for more information. Again, there are
several convenient implementations for constructs like iteration
(`Iteration`).
@@ -122,7 +128,20 @@ several convenient implementations for constructs like iteration
====== Nested iterations
-TO_DO: Provide information about nested iterations
+An iteration is also an operation, so everywhere an operation is expected, you can freely put the Iteration. If the Iteration is put inside the perform method of another Iteration, we speak about nested iterations.
+An example of such nested iteration may be:
+----
+.addRule()
+ .when(...)
+ .perform(
+ Iteration.over("list_variable").as("single_var")
+ .perform(
+ Iteration.over("single_var") //second iteration
+ .perform(...).endIteration()
+ )
+ .endIteration()
+);
+----
====== otherwise
@@ -147,7 +166,16 @@ For more information, see http://ocpsoft.org/rewrite/[OCP Rewrite web].
===== Where
-TO_DO: Provide information about the where clause
+The where clause is used to provide information about used parameters within the rule. So for example if you have used a parameter in some condition like for example `JavaClass.references("{myMatch}")`, you may use the where clause to specify what the `myMatch` is like `.where("myMatch").matches("java.lang.String.toString\(.*\)")`.
+
+----
+.when(JavaClass.references("{myMatch}").at(TypeReferenceLocation.METHOD))
+.perform(...)
+.where("myMatch").matches("java.lang.String.toString\(.*\)")
+----
+
++
+Please note that within the where clause the regex is used in contrast to JavaClass.references() where a windup specific syntax is expected.
===== Metadata
@@ -165,4 +193,31 @@ and not actually used, is `RuleMetadata.CATEGORY`.
==== Available utilities
For a list of what key services and constructs can be used in the rule,
-see xref:Rules-Available-Rules-Utilities[Available Rules Utilities].
\ No newline at end of file
+see xref:Rules-Available-Rules-Utilities[Available Rules Utilities].
+
+===== Variable stack
+The communication between the conditions and operations is done using the variable stack that is filled with the output of the condition/s and then given to the Iteration to be processed.
+Within conditions, you can specify the name of the result iterable that is saved in the stack using `as()` method, the iteration can specify the iterable to iterate over using the `over()` method and even specify the name of for each processed single model of the result being processed.
+Example:
+
+----
+
+.addRule()
+ .when(Query...as("result_list"))
+ .perform(
+ Iteration.over("result_list").as("single_var")
+ ...
+ )
+);
+
+----
+The varstack may be accesed even from the second condition in order to narrow the result of the previous one. After that the iteration may choose which result it wants to iterate over (it is even possible to have multiple iterations listed in the perform, each of which may access different result saved in the variable stack).
+----
+.addRule()
+ .when(Query...as("result_list").and(Query.from("result_list")....as("second_result_list")))
+ .perform(
+ Iteration.over("second_result_list")
+ ...
+ )
+);
+----
\ No newline at end of file
diff --git a/docs/Rules-Rule-Configuration.adoc b/docs/Rules-Rule-Configuration.adoc
new file mode 100644
index 0000000000..6fedfc832c
--- /dev/null
+++ b/docs/Rules-Rule-Configuration.adoc
@@ -0,0 +1,40 @@
+[[Rules-Rule-Configuration]]
+=== Rule Configuration
+
+_How to pass configuration from user input to the rules._
+
+
+==== Configuration of Custom Rules
+
+The rules can be parametrized by user input (e.g. from a command line argument, like `--packages`).
+When creating a custom rule, you might need to allow the user to change the rule's behavior, or need some input from the user, like, a path to some directory, or address of some online service. This page shows how.
+
+For more information about how configuration is processed, see xref:Dev-Windup-Configuration[Windup Configuration].
+
+===== Getting the options from the options map:
+
+[source,java]
+--------
+GraphOperation copyConfigToGraph = new GraphOperation()
+{
+ @Override
+ public void perform(GraphRewrite event, EvaluationContext context)
+ {
+ Map config = event.getGraphContext().getOptionMap();
+ Boolean sourceMode = (Boolean) config.get(SourceModeOption.NAME);
+ @SuppressWarnings("unchecked")
+ List includeJavaPackages = (List) config.get(ScanPackagesOption.NAME);
+ @SuppressWarnings("unchecked")
+ List excludeJavaPackages = (List) config.get(ExcludePackagesOption.NAME);
+ ...
+--------
+
+Example: Java ruleset uses a model for its options
+[source,java]
+--------
+WindupJavaConfigurationModel javaCfg = WindupJavaConfigurationService.getJavaConfigurationModel(event
+ .getGraphContext());
+javaCfg.setSourceMode(sourceMode == null ? false : sourceMode);
+javaCfg.setScanJavaPackageList(includeJavaPackages);
+javaCfg.setExcludeJavaPackageList(excludeJavaPackages);
+--------
\ No newline at end of file
diff --git a/docs/Rules-Rules-Overview.adoc b/docs/Rules-Rules-Overview.adoc
new file mode 100644
index 0000000000..f94779a0a0
--- /dev/null
+++ b/docs/Rules-Rules-Overview.adoc
@@ -0,0 +1,33 @@
+[[Rules-Rules-Overview]]
+=== Rules Overview
+
+.DRAFT
+
+_This page is under construction_
+
+Ruleset:: A ruleset is a Forge add-on that contains one or more RuleProviders. The following Windup projects are rulesets.
+
+* rules-java-ee
+* rules-xml
+
+RuleProvider:: A RuleProvider is a class that implements one or more rules using the `.addRule()` method. The following are examples of legacy Java rules that are defined in `rules-java-ee` ruleset.
+
+* EjbConfig
+* JDKConfig
+* SeamToCDI
+
+Rule:: A piece of code that performs a single unit of work during the migration process. Depending on the complexity of the rule, it may or may not include configuration data. Extensive configuration information may be externalized into external configuration, for example, a custom XML file. The following is an example of a Java-based rule added to the `JDKConfig` RuleProvider class.
+
+[source,java]
+----
+.addRule()
+ .when(JavaClass.references("java.lang.ClassLoader$").at(TypeReferenceLocation.TYPE))
+ .perform(Classification.as("Java Classloader, must be migrated.")
+ .with(Link.to("Red Hat Customer Portal: How to get resources via the ClassLoader in a JavaEE application in JBoss EAP", "https://access.redhat.com/knowledge/solutions/239033"))
+ .withEffort(1))
+----
+
+Rules Metadata:: Information about whether a particular ruleset applies to a given situation. The metadata can include information about the source and target platform and frameworks.
+
+Rules Pipeline:: A collection of rules that feed information into the knowledge graph
+
diff --git a/docs/Rules-Test-a-Basic-XML-Rule-in-Windup.adoc b/docs/Rules-Test-a-Basic-XML-Rule-in-Windup.adoc
index 5076cb4e4d..06d6d5d4b0 100644
--- a/docs/Rules-Test-a-Basic-XML-Rule-in-Windup.adoc
+++ b/docs/Rules-Test-a-Basic-XML-Rule-in-Windup.adoc
@@ -3,15 +3,17 @@
==== Add the Rule to Windup
-A Windup rule is installed simply by copying the rule to the appropriate Windup folder. Windup scans for rules in the following locations:
+A Windup rule is installed simply by copying the rule to the appropriate Windup folder. Windup scans for rules in the following locations for files ending with `*.windup.groovy` and `*.windup.xml`:
-* The `WINDUP_HOME/rules/` folder.
+* The directory specified in the `--userRulesDirectory` option to the `windup-migrate-app`.
+
+* The `WINDUP_HOME/rules/` directory.
+
-This is the folder where you run the Windup executable. See xref:About-the-WINDUP_HOME-Variable[About the WINDUP_HOME Variable] for details.
+`WINDUP_HOME` is the directory where you run the Windup executable (see xref:About-the-WINDUP_HOME-Variable[here]).
-* The `${user.home}/.windup/rules/` folder.
+* The `${user.home}/.windup/rules/` directory.
+
-This folder is created by Windup the first time you execute Windup. It used to track rules and add-ons and to contains the Windup log.
+The `${user.home}/.windup` is a directory created by Windup at first run and contains rules, add-ons, and the Windup log.
+
--------
For Linux or Mac: ~/.windup/rules/
diff --git a/docs/Rules-Windup-Models.adoc b/docs/Rules-Windup-Models.adoc
index 823381ec4d..f7ea361ff2 100644
--- a/docs/Rules-Windup-Models.adoc
+++ b/docs/Rules-Windup-Models.adoc
@@ -1,13 +1,15 @@
[[Rules-Windup-Models]]
=== Windup Models
+:imagesdir: images
+
Windup models are the classes extending WindupVertexFrame.
They are used to model the data in the graph database to Java objects.
This is an overview of the most important models.
The complete and up-to-date list of models is in xref:http://windup.github.io/windup/docs/javadoc/latest/org/jboss/windup/graph/model/WindupVertexFrame.html[Javadoc].
-image:images/WindupModels-NbScreenshot.png[Windup Models Graphic]
+image:WindupModels-NbScreenshot.png[Windup Models Graphic]
==== Meta Models
@@ -21,6 +23,6 @@ FileModel ArchiveModel
==== Reporting Models
-==== Custom Models (coming from Addons)
+==== Custom Models (coming from add-ons)
See respective ruleset's documentation.
\ No newline at end of file
diff --git a/docs/Rules-XML-Rule-Construction.adoc b/docs/Rules-XML-Rule-Construction.adoc
new file mode 100644
index 0000000000..0277e6ffba
--- /dev/null
+++ b/docs/Rules-XML-Rule-Construction.adoc
@@ -0,0 +1,165 @@
+[[Rules-XML-Rule-Construction]]
+=== XML-Rule-Construction
+
+DRAFT!
+
+This section describes the basic construction of XML rules. All XML rules are defined as elements within rulesets. Rulesets also define the phase in which the rules are run.
+
+===== Ruleset Element
+
+A ruleset is a group of one or more rules that targets a specific area of migration. This is the basic construct for the `` element.
+
+* ****: This element defines this as a Windup ruleset.
+** ****: This element specifies when the ruleset should execute.
++
+See xref:Rules-Rule-Execution-Lifecycle[Rule Execution Lifecyle] for more information about rule phases.
+** ****: This element contains the individual rules.
+*** ****: This element is defines the rule.
++
+One or more rules can be defined for a ruleset.
+See xref:rule-elements[Rule Elements] in the following section for details on how to define `` elements.
+*** ****
+** ****
+* ****:
+
+
+[[rule-elements]]
+===== Rule Elements
+
+Rule elements follow the familiar construct:
+
+ when(condition)
+ perform(action)
+ otherwise
+ perform(action)
+
+The following section describes the more commonly used elements in a `**: This element defines the condition or conditions to match on.
+** ****: Match on a Java class.
++
+This element can have the following attributes:
++
+[cols="2*", options="header"]
+|===
+|Attribute
+|Description
+|references="CLASS_NAME"
+|Match on the fully qualified class name. Wildcards can be specified using `{*}` syntax. For example: "org.apache.commons.{*}"
+|in="FILE_NAME"
+|The file name
+|as="VARIABLE_NAME"
+|An optional variable name that can be used in later processing.
+|===
++
+This element can contain the following elements:
++
+[cols="2*", options="header"]
+|===
+|Element
+|Description
+|
+|The location where the reference was found in a Java source file, for example, in the IMPORT, ANNOTATION, METHOD, VARIABLE_DECLARATION. You can specify multiple locations. See the http://windup.github.io/windup/docs/javadoc/latest/org/jboss/windup/rules/apps/java/scan/ast/TypeReferenceLocation.html[TypeReferenceLocation] Javadoc for the full list of valid values.
+|===
++
+For more information, see the http://windup.github.io/windup/docs/latest/javadoc/org/jboss/windup/rules/apps/java/condition/JavaClass.html[JavaClass] JavaDoc.
+
+** ****: Match on an XML file. The following table lists some of the most commonly used attributes and elements.
++
+This element can have the following attributes:
++
+[cols="2*", options="header"]
+|===
+|Attribute
+|Description
+|matches="XPATH_PATH"
+|Match on the XPath, for example: "/w:web-app/w:resource-ref/w:res-auth[text() = 'Container']". Wildcards can be specified using `{*}` syntax.
+|in="FILE_NAME"
+|The file name
+|as="VARIABLE_NAME"
+|An optional variable name that can be used in later processing.
+|===
++
+This element can contain the following elements:
++
+[cols="2*", options="header"]
+|===
+|Element
+|Description
+|
+|The namespace prefix and URI
+|===
++
+For more information, see the http://windup.github.io/windup/docs/latest/javadoc/org/jboss/windup/rules/apps/xml/condition/XmlFile.html[XmlFile] JavaDoc.
+
+** ****: Match on a project. The following table lists some of the most commonly used attributes and elements. For more information, see the http://windup.github.io/windup/docs/latest/javadoc/org/jboss/windup/project/condition/Project.html[Project] JavaDoc.
+
+* ****
+
+* ****: This element is invoked when the condition is met.
+
+** ****: This child element of **perform** is used to create a `hint`
+This element can have the following attributes:
++
+[cols="2*", options="header"]
+|===
+|Attribute
+|Description
+|effort=LEVEL_OF_EFFORT
+|A level of effort assigned to this rule
+|message="MESSAGE"
+|The message ??
+|in="VARIABLE_NAME"
+|A variable to use for substitution.
+|title="Title"
+|The title ??.
+|===
++
+This element can contain the following elements:
++
+[cols="2*", options="header"]
+|===
+|Element
+|Description
+|
+|The message to display in the report.
+|
+|An HREF link and description for further information.
+|===
+
+** ****: This specifies how to transform the the specified XML file
+
+** ****: This child element of **perform** is used to log a message. It takes the attribute **message** to define the text message.
+
+* ****
+
+* The **** element is invoked when the condition is not met.
+
+==== Predefined Rules
+
+Windup provides some predefined rules for more common migration requirements, for example, mapping files from the source platform to target platform. The following is an example of the predefined "XmlFileMappings" rule.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/Rules-XML-Rule-When-Condition-Syntax.adoc b/docs/Rules-XML-Rule-When-Condition-Syntax.adoc
index ae08cbad19..acc1d201a8 100644
--- a/docs/Rules-XML-Rule-When-Condition-Syntax.adoc
+++ b/docs/Rules-XML-Rule-When-Condition-Syntax.adoc
@@ -125,20 +125,18 @@ namespace:: The namespace to referenced in XML files. This element contains 2 at
===== Summary
-Use the `project` element to find information in project files. For a better understanding of the `project` condition, see the JavaDoc for the http://windup.github.io/windup/docs/latest/javadoc/org/jboss/windup/project/condition/Project.html[Project] class.
+Use the `project` element to query for the project charateristics. For a better understanding of the `project` condition, see the JavaDoc for the http://windup.github.io/windup/docs/latest/javadoc/org/jboss/windup/project/condition/Project.html[Project] class.
-The following is an example of a rule that tests for an `xmlfile`.
+The following is an example of a rule that checks a rule is dependent on the junit in the version between 2.0.0.Final and 2.2.0.Final.
-
+
-
- Descriptive message
-
+
@@ -146,32 +144,29 @@ The following is an example of a rule that tests for an `xmlfile`.
====== project Element Attributes
-The `project` element does not have any attributes.
+The `project` element is used to match against the project as a whole. You can use this condition to query for dependencies of the project. It does not have any attributes itself.
====== project Element Child Elements
-artifact:: The namespace to referenced in XML files. This element contains the following attributes:
+artifact:: Subcondition used within `project` to query against project dependencies. This element contains the following attributes:
* groupId="PROJECT_GROUP_ID"
+
-Match on the project ``
+Match on the project `` of the dependency
* artifactId="PROJECT_ARTIFACT_ID"
-Match on the project ``
+Match on the project `` of the dependency
-* from="VARIABLE_NAME"
+* fromVersion="FROM_VERSION"
+
-Begin the search query with the filtered result from a previous search identified by its `as` VARIABLE_NAME.
-
-* to = TO_DO: complete the project artifact 'to' element syntax
+Specify the lower version bound of the artifact. For example `2.0.0.Final`
+* toVersion="TO_VERSION"
++
+Specify the upper version bound of the artifact. For example `2.2.0.Final`
[[filecontent-syntax]]
==== filecontent Syntax
-TO_DO: complete the filecontent element syntax
-
-Use the `filecontent` element to find information in file content.For a better understanding of the `filecontent` condition, see the JavaDoc for the http://windup.github.io/windup/docs/latest/javadoc/org/jboss/windup/rules/files/condition/FileContent.html[FileContent] class.
-
-Use the `filecontent` element to test for content within files. The following is an example of a rule that tests for `filecontent`.
+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 http://windup.github.io/windup/docs/latest/javadoc/org/jboss/windup/rules/files/condition/FileContent.html[FileContent] class.
diff --git a/docs/Ruleset-Core.adoc b/docs/Ruleset-Core.adoc
new file mode 100644
index 0000000000..f4c6f43b39
--- /dev/null
+++ b/docs/Ruleset-Core.adoc
@@ -0,0 +1,108 @@
+[[Ruleset-Core]]
+=== Core
+
+.DRAFT
+
+_This is an example page. Content serves for design decision. These pages could be generated automatically in the future._
+
+Purpose of this ruleset.
+
+==== Metadata
+**ID:** N/A
+**Graph prefix:** w:
+
+ Rule providers
+
+_A definition list (dl/dt/dd) of RuleProviders of given Ruleset with brief descriptions._
+
+_Template hint: Subclasses of [`WindupRuleProvider`](http://windup.github.io/windup/docs/javadoc/latest/index.html?org/jboss/windup/graph/model/WindupVertexFrame.html)._
+
+* **AttachApplicationReportsToIndexRuleProvider** -
+* **BaseConfig** -
+* **Config** -
+* **CreateApplicationReportIndexRuleProvider** -
+* **CreateSourceReportRuleProvider** -
+* **CssJsResourceRenderingRuleProvider** -
+* **DiscoverArchiveTypesRuleProvider** -
+* **DiscoverFileTypesRuleProvider** -
+* **RenderGraphRuleProvider** -
+* **RenderOverviewPageRuleProvider** -
+* **RenderReportRuleProvider** -
+* **RenderRuleProviderReportRuleProvider** -
+* **RuleExecutionTimeReportRuleProvider** -
+* **UnzipArchivesToOutputRuleProvider** -
+
+* **IteratingRuleProvider** -
+* **WindupRuleProviderBuilder** -
+
+
+==== Models
+
+_Subclasses of `WindupVertexFrame`.
+
+* AmbiguousJavaClassModel
+* AmbiguousReferenceModel
+* ApplicationArchiveModel
+* ApplicationModel
+* ApplicationReportIndexModel
+* ApplicationReportModel
+* ArchiveModel
+* ClassificationModel
+* DoctypeMetaModel
+* EarArchiveModel
+* EjbBeanBaseModel
+* EjbDeploymentDescriptorModel
+* EjbEntityBeanModel
+* EjbMessageDrivenModel
+* EjbSessionBeanModel
+* EnvironmentReferenceModel
+* FileLocationModel
+* FileModel
+* FileReferenceModel
+* FreeMarkerSourceReportModel
+* HibernateConfigurationFileModel
+* HibernateEntityModel
+* HibernateMappingFileModel
+* HibernateSessionFactoryModel
+* InlineHintModel
+* JarArchiveModel
+* JarManifestModel
+* JavaClassFileModel
+* JavaClassModel
+* JavaMethodModel
+* JavaParameterModel
+* JavaSourceFileModel
+* JavaTypeReferenceModel
+* LinkModel
+* MavenProjectModel
+* NamespaceMetaModel
+* PackageModel
+* ProjectDependencyModel
+* ProjectModel
+* PropertiesModel
+* ReportFileModel
+* ReportModel
+* ResourceModel
+* RulePhaseExecutionStatisticsModel
+* RuleProviderExecutionStatisticsModel
+* SourceFileModel
+* SourceReportModel
+* SpringBeanModel
+* SpringConfigurationFileModel
+* TechnologyTagModel
+* WarArchiveModel
+* WebXmlModel
+* WindupConfigurationModel
+* WindupJavaConfigurationModel
+* WindupVertexListModel
+* XmlFileModel
+* XmlTypeReferenceModel
+* XsltTransformationModel
+
+==== Configuration
+
+_Subclasses of `TO_DO`
+
+==== Reports
+
+_Report files or report parts created by this ruleset._
\ No newline at end of file
diff --git a/docs/Ruleset-Java-Archives-Identification.adoc b/docs/Ruleset-Java-Archives-Identification.adoc
new file mode 100644
index 0000000000..73fd38a47b
--- /dev/null
+++ b/docs/Ruleset-Java-Archives-Identification.adoc
@@ -0,0 +1,25 @@
+[[Ruleset-Java-Archives-Identification]]
+=== Ruleset: Java Archives Identification
+
+ArtifactId: rules-java-archives
+
+==== Rules:
+* `ArchiveIdentificationConfigLoadingRuleProvider` loads identification data from `*.archive-metadata.txt` in `$USER/cache` and `$WINDUP/cache`. The data are added to the distribution in https://github.com/windup/windup/blob/master/dist/src/main/assembly/assembly-offline.xml#L38[`dist/src/main/assembly/assembly-offline.xml`] and created in https://github.com/windup/windup/blob/master/dist/pom.xml#L87[dist/pom.xml]
+* `IgnoredArchivesConfigLoadingRuleProvider`
+
+
+==== Listeners:
+* `ArchiveIdentificationGraphChangedListener`
+ When `ArchiveModel.ARCHIVE_NAME` changes, searches the library for it's SHA1. If found, adds `IdentifiedArchiveModel` type and appends `ArchiveCoordinateModel`.
+* `ArchiveIdentificationLifecycleListener` registers `ArchiveIdentificationGraphChangedListener`.
+
+==== Models:
+* IgnoredArchiveModel
+
+=== TO_DO: See the following list
+
+* Split the static classes `SkippedArchives` and `IdentifiedArchives` to an interface and implementations.
+* Copy the binary search (file-seeking) implementation of `IdentifiedArchives` to prevent OOMEx.
+* Since this reacts to write to ARCHIVE_NAME property, there's no guarantee that the ArchiveModel will be complete, and SHA1 already computed. This is overcome by a workaround - `setArchiveHashes()`.
+* All identified archives are ignored. This is not how this archive should work. Identification and ignoring should be separated, because we will definitely add identification of other archives than just the Maven Central Repo (e.g. JDBC drivers).
+*
\ No newline at end of file
diff --git a/docs/Ruleset-Java-Code-Matching-Examples.adoc b/docs/Ruleset-Java-Code-Matching-Examples.adoc
new file mode 100644
index 0000000000..831062c9eb
--- /dev/null
+++ b/docs/Ruleset-Java-Code-Matching-Examples.adoc
@@ -0,0 +1,183 @@
+[[Ruleset-Java-Code-Matching-Examples]]
+=== Ruleset: Java Basic: Code Matching Examples
+
+.DRAFT This page will contain rule snippets for Java code matching, AND the java code they are supposed to match. Try `git grep ''` if you want to add.
+.SGILDA
+.OZIZKA: These are basically 'JavaClass' examples, correct? Would it be okay to change the title to reflect this? For example, something like: 'XML Ruleset Examples: Match on "javaclass"'?
+
+.SGILDA "No" to name change - XML Ruleset is something different - that is a RuleSet dealing with XML matching. This is really "Ruleset: Java: ...". It will also have Java syntax added.
+
+
+=== Example XML snippets
+
+==== Import
+
+[source,java]
+-------------------
+package com.mycompany.app;
+
+import org.jbpm.graph.def.ActionHandler;
+import org.jbpm.graph.def.ProcessDefinition;
+...
+-------------------
+
+[source,xml]
+-------------------
+
+
+
+ INHERITANCE
+
+
+
+
+
+
+
+
+
+-------------------
+(See `rules-java-ee/src/main/resources/legacy/org.jboss.windup.rules.apps.legacy.java.JBossConfig.windup.xml`)
+
+
+==== Method call
+
+[source,java]
+-------------------
+import org.jbpm.graph.exe.ExecutionContext;
+...
+ public void myMethod( ExecutionContext exCtx){
+ exCtx.setVariable("foo", "bar");
+ }
+...
+-------------------
+
+[source,xml]
+-------------------
+
+
+
+ METHOD
+
+
+
+
+ ...
+
+
+
+-------------------
+
+
+==== Annotation
+
+[source,java]
+-------------------
+import org.jboss.ejb3.annotation.Management;
+...
+@Service( name = "DeliveryManager" )
+@Local( DeliveryManagerLocal.class )
+@Management( DeliveryManagerManagement.class )
+public class DeliveryManager implements DeliveryManagerManagement
+{
+ @Resource( mappedName = "Delivery/remote" )
+ DeliveryRemote delivery;
+-------------------
+
+[source,xml]
+-------------------
+
+
+ ANNOTATION
+
+
+-------------------
+
+
+
+
+==== Inheritance (Foo extends Bar)
+
+[source,java]
+-------------------
+public interface StockHome extends javax.ejb.EJBHome
+{
+ Stock create() throws java.rmi.RemoteException, javax.ejb.CreateException;
+}
+...
+-------------------
+
+[source,xml]
+-------------------
+
+
+ INHERITANCE
+
+
+-------------------
+
+
+
+
+==== Constructor call
+
+[source,java]
+-------------------
+JMXServiceURL url = new JMXServiceURL("service:jmx:rmi://localhost:1099");
+-------------------
+
+[source,xml]
+-------------------
+
+
+ CONSTRUCTOR_CALL
+
+
+-------------------
+
+
+
+
+==== Type (classes, interfaces, ...) references (anywhere, e.g. as method parameter)
+
+[source,java]
+-------------------
+
+...
+-------------------
+
+[source,xml]
+-------------------
+
+
+ TYPE
+
+
+-------------------
+
+
+
+
+
+
+
+
+
+
+
+
+Template:
+
+====
+
+[source,java]
+-------------------
+
+...
+-------------------
+
+[source,xml]
+-------------------
+
+-------------------
+
diff --git a/docs/Ruleset-Ruleset-Template.adoc b/docs/Ruleset-Ruleset-Template.adoc
new file mode 100644
index 0000000000..1df5f63b21
--- /dev/null
+++ b/docs/Ruleset-Ruleset-Template.adoc
@@ -0,0 +1,141 @@
+[[Ruleset-Ruleset-Template]]
+=== Ruleset Template
+
+.DRAFT
+
+Ozizka: I'm not clear what this is?
+
+_This is an example page. Content serves for design decision. These pages could be generated automatically in the future._
+
+Purpose of this ruleset.
+
+==== Metadata
+**ID:** myRuleset
+**Graph prefix:** myRuleset
+
+==== Rule providers
+
+_A definition list (dl/dt/dd) of RuleProviders of given Ruleset with brief descriptions._
+
+_Template hint: Subclasses of http://windup.github.io/windup/docs/javadoc/latest/index.html?org/jboss/windup/graph/model/WindupVertexFrame.html[WindupRuleProvider]._
+
+* **JDKconfigRuleProvider** - Targetted towards the classes distributed with JDK, like `java.lang.*`, `java.security.*`, `org.xml.*`, etc.
+* **AnalyzeJavaFilesRuleProvider** -
+* **AttachApplicationReportsToIndexRuleProvider** -
+* **BaseConfig** -
+* **Config** -
+* **CopyJavaConfigToGraphRuleProvider** -
+* **CreateApplicationReportIndexRuleProvider** -
+* **CreateJavaApplicationOverviewReportRuleProvider** -
+* **CreateJavaNonClassifiedFileReportRuleProvider** -
+* **CreateSourceReportRuleProvider** -
+* **CssJsResourceRenderingRuleProvider** -
+* **DecompileArchivesRuleProvider** -
+* **DiscoverArchiveTypesRuleProvider** -
+* **DiscoverFileTypesRuleProvider** -
+* **DiscoverJavaFilesRuleProvider** -
+* **DiscoverMavenHierarchyRuleProvider** -
+* **DiscoverMavenProjectsRuleProvider** -
+* **DiscoverNonMavenArchiveProjectsRuleProvider** -
+* **DiscoverNonMavenSourceProjectsRuleProvider** -
+* **DiscoverXmlFilesRuleProvider** -
+* **EjbConfig** -
+* **EjbConfig** -
+* **IndexClassFilesRuleProvider** -
+* **IteratingRuleProvider** -
+* **JBossConfig** -
+* **JBossEsbConfig** -
+* **JBossJBPMConfig** -
+* **JDKConfig** -
+* **JPPConfig** -
+* **PersistenceConfig** -
+* **RenderGraphRuleProvider** -
+* **RenderOverviewPageRuleProvider** -
+* **RenderReportRuleProvider** -
+* **RenderRuleProviderReportRuleProvider** -
+* **RuleExecutionTimeReportRuleProvider** -
+* **SeamToCDI** -
+* **SonicESBConfig** -
+* **UnzipArchivesToOutputRuleProvider** -
+* **WebLogicConfig** -
+* **WebServiceConfig** -
+* **WebsphereConfig** -
+* **WindupRuleProviderBuilder** -
+* **XmlBaseConfig** -
+* **XmlGlassfishConfig** -
+* **XmlJbossConfig** -
+* **XmlJbossEsbConfig** -
+* **XmlJonasConfig** -
+* **XmlJppConfig** -
+* **XmlJrunConfig** -
+* **XmlKnowHowConfig** -
+* **XmlOrionConfig** -
+* **XmlPersistanceConfig** -
+* **XmlResinConfig** -
+* **XmlSoa5Config** -
+* **XmlSonicEsbConfig** -
+* **XmlSpringConfig** -
+* **XmlWeblogicConfig** -
+* **XmlWebserviceConfig** -
+* **XmlWebsphereConfig** -
+
+
+==== Models
+
+_Subclasses of `WindupVertexFrame`.
+
+* org.jboss.windup.graph.model.ApplicationArchiveModel
+* org.jboss.windup.graph.model.ApplicationModel
+* org.jboss.windup.graph.model.ArchiveModel
+* org.jboss.windup.graph.model.ProjectDependencyModel
+* org.jboss.windup.graph.model.ProjectModel
+* org.jboss.windup.graph.model.WindupConfigurationModel
+* org.jboss.windup.graph.model.performance.RulePhaseExecutionStatisticsModel
+* org.jboss.windup.graph.model.performance.RuleProviderExecutionStatisticsModel
+* org.jboss.windup.graph.model.report.IgnoredFileRegexModel
+* org.jboss.windup.graph.model.resource.FileModel
+* org.jboss.windup.graph.model.resource.SourceFileModel
+* org.jboss.windup.reporting.model.ApplicationReportIndexModel
+* org.jboss.windup.reporting.model.ApplicationReportModel
+* org.jboss.windup.reporting.model.ClassificationModel
+* org.jboss.windup.reporting.model.FileLocationModel
+* org.jboss.windup.reporting.model.FileReferenceModel
+* org.jboss.windup.reporting.model.FreeMarkerSourceReportModel
+* org.jboss.windup.reporting.model.IgnoredFilesReportModel
+* org.jboss.windup.reporting.model.InlineHintModel
+* org.jboss.windup.reporting.model.LinkModel
+* org.jboss.windup.reporting.model.ReportFileModel
+* org.jboss.windup.reporting.model.ReportModel
+* org.jboss.windup.reporting.model.TechnologyTagModel
+* org.jboss.windup.reporting.model.source.SourceReportModel
+* org.jboss.windup.rules.apps.java.model.AmbiguousJavaClassModel
+* org.jboss.windup.rules.apps.java.model.AmbiguousReferenceModel
+* org.jboss.windup.rules.apps.java.model.EarArchiveModel
+* org.jboss.windup.rules.apps.java.model.IgnoredFileModel
+* org.jboss.windup.rules.apps.java.model.JarArchiveModel
+* org.jboss.windup.rules.apps.java.model.JarManifestModel
+* org.jboss.windup.rules.apps.java.model.JavaClassFileModel
+* org.jboss.windup.rules.apps.java.model.JavaClassModel
+* org.jboss.windup.rules.apps.java.model.JavaMethodModel
+* org.jboss.windup.rules.apps.java.model.JavaParameterModel
+* org.jboss.windup.rules.apps.java.model.JavaSourceFileModel
+* org.jboss.windup.rules.apps.java.model.PackageModel
+* org.jboss.windup.rules.apps.java.model.PropertiesModel
+* org.jboss.windup.rules.apps.java.model.WarArchiveModel
+* org.jboss.windup.rules.apps.java.model.WindupJavaConfigurationModel
+* org.jboss.windup.rules.apps.java.model.project.MavenProjectModel
+* org.jboss.windup.rules.apps.java.scan.ast.JavaTypeReferenceModel
+* org.jboss.windup.rules.apps.xml.model.DoctypeMetaModel
+* org.jboss.windup.rules.apps.xml.model.NamespaceMetaModel
+* org.jboss.windup.rules.apps.xml.model.XmlFileModel
+* org.jboss.windup.rules.apps.xml.model.XmlTypeReferenceModel
+* org.jboss.windup.rules.apps.xml.model.XsltTransformationModel
+
+
+==== Configuration
+
+_Subclasses of http://windup.github.io/windup/docs/javadoc/latest/org/jboss/windup/config/WindupConfigurationOption.html[WindupConfigurationOption]
+
+==== Reports
+
+_Report files or report parts created by this ruleset._
\ No newline at end of file
diff --git a/docs/Ruleset-XML-Ruleset-Element-Reference.adoc b/docs/Ruleset-XML-Ruleset-Element-Reference.adoc
new file mode 100644
index 0000000000..7861a58249
--- /dev/null
+++ b/docs/Ruleset-XML-Ruleset-Element-Reference.adoc
@@ -0,0 +1,18 @@
+[[Ruleset-XML-Ruleset-Element-Reference]]
+=== XML Ruleset Element Reference
+
+ruleset:: Defines this as a Windup rule.
+phase:: Specifies when the ruleset should execute. See xref:Rules-Rule-Execution-Lifecycle[Rule Execution Lifecyle] for more information about rule phases.
+rules:: Encapsulates all the the individual rules for this ruleset.
+rule:: Child of the the `rules` element. One or more rules can be defined for a ruleset.
+when:: Child of `rule`. Defines the condition to match on.
+javaclass:: Child of `when`. Match on Java class condition.
+location:: Child of `javaclass`. The location where the reference was found in a Java source file. See the http://windup.github.io/windup/docs/javadoc/latest/org/jboss/windup/rules/apps/java/scan/ast/TypeReferenceLocation.html[Enum TypeReferenceLocation] Javadoc for valid values.
+xmlfile:: Match on XML file condition.
+xslt:: This specifies how to transform the the specified XML file
+perform:: This element is invoked when the condition is met.
+hint:: Child element of `perform`. Used to create a provide a message.
+message::
+xref:
+log:: This child element of `perform` is used to log a message. It takes the attribute `message` to define the text message.
+otherwise:: Invoked when the condition is not met.
\ No newline at end of file
diff --git a/docs/Sande-ScratchPad.adoc b/docs/Sande-ScratchPad.adoc
new file mode 100644
index 0000000000..3b421553da
--- /dev/null
+++ b/docs/Sande-ScratchPad.adoc
@@ -0,0 +1,197 @@
+=== Sande ScratchPad
+
+==== Conditions ()
+
+* **javaclass**: JavaClass class extends ParameterizedGraphCondition
+* **xmlfile**: XmlFile class extends ParameterizedGraphCondition
+* **project**: Project class extends GraphCondition
+* **filecontent**: FileContent class extends ParameterizedGraphCondition
+
+==== Operations
+
+* **lineitem**: LineItem extends AbstractIterationOperation
+* **classification**: Classification extends ParameterizedIterationOperation
+* **hint**: Hint extends ParameterizedIterationOperation
+* **xslt**: XSLTTransformation extends AbstractIterationOperation ??
+
+==== Element Handlers:
+
+===== **** handlers
+
+* **phase**: PhaseHandler implements ElementHandler
+* **rules**: RulesHandler implements ElementHandler
+* **rule**: RuleHandler implements ElementHandler
+
+===== **** handlers
+
+* **when**: WhenHandler implements ElementHandler
+* **perform**: PerformHandler implements ElementHandler
+* **otherwise**: OtherwiseHandler implements ElementHandler
+
+===== **** conditional handlers
+
+* **javaclass**: JavaClassHandler implements ElementHandler
+* **project**: ProjectHandler implements ElementHandler
+* **xmlfile**: XmlFileHandler implements ElementHandler
+
+===== **** and **** action handlers
+
+* HintHandler implements ElementHandler
+* IterationHandler implements ElementHandler
+
+
+===== Operation Handlers
+
+* **xslt**: XSLTTransformationHandler implements ElementHandler
+
+===== Other Handlers
+
+* **artifactId**: ArtifactHandler implements ElementHandler
+* **classification**: ClassificationHandler implements ElementHandler
+* **file-mapping**:FileMappingHandler implements ElementHandler
+* **filecontent**:FileContentHandler implements ElementHandler
+* **lineitem**:LineItemHandler implements ElementHandler
+* **link**: LinkHandler implements ElementHandler
+* **matches**: MatchesHandler implements ElementHandler
+* **message**: MessageHandler implements ElementHandler
+* **namespace**: NamespaceHandler implements ElementHandler
+* **log**: LogHandler implements ElementHandler
+* **package-mapping**: PackageNameMappingHandler implements ElementHandler
+* **param**: ParamHandler implements ElementHandler
+
+===== Windup Core Handlers
+
+* RuleHandler implements ElementHandler
+* RuleProviderHandler implements ElementHandler
+* RulesHandler implements ElementHandler
+* TypeReferenceLocationHandler implements ElementHandler; see http://windup.github.io/windup/docs/latest/javadoc/org/jboss/windup/rules/apps/java/scan/ast/TypeReferenceLocation.html[enum TypeReferenceLocation]
+* WhereHandler implements ElementHandler
+* XSLTParameterHandler implements ElementHandler
+
+===== Logical Conditions
+
+* AndHandler implements ElementHandler
+* OrHandler implements ElementHandler
+* NotHandler implements ElementHandler
+* TrueHandler implements ElementHandler
+
+===== Rules Examples
+
+
+
+
+
+
+ DISCOVERY
+
+
+
+
+
+ METHOD_PARAMETER
+
+
+
+
+ Message from XML Rule
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Container Auth
+
+
+
+
+
+
+
+
+
+
+
+
+A file-mapping is a predefined rule. It bundles the condition and perform that maps file extensions to model types. For example:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+==== XML Rule Element Description
+
+* ****: This element defines this as a Windup rule.
+* ****: This element specifies when the ruleset should execute. See xref:Rules-Rule-Execution-Lifecycle[Rule Execution Lifecyle] for more information about rule phases.
+* ****: element contains the individual rules.
+** ****: This element is a child of the **rules** element. One or more rules can be defined for a ruleset. Each `rule` contains the following elements.
+*** ****: This element defines the condition to match on.
+**** ****
+***** ****: The location where the reference was found in a Java source file. See the http://windup.github.io/windup/docs/javadoc/latest/org/jboss/windup/rules/apps/java/scan/ast/TypeReferenceLocation.html[Enum TypeReferenceLocation] Javadoc for valid values.
+*** ****: This element is invoked when the condition is met.
+**** ****: This child element of **perform** is used to create a `hint`
+***** ****:
+***** ****:
+**** ****: This specifies how to transform the the specified XML file
+**** ****: This child element of **perform** is used to log a message. It takes the attribute **message** to define the text message.
+*** The **** element is invoked when the condition is not met.
+
+A file-mapping is a predefined rule. For example:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/Start-Windup.adoc b/docs/Start-Windup.adoc
new file mode 100644
index 0000000000..e0729072b7
--- /dev/null
+++ b/docs/Start-Windup.adoc
@@ -0,0 +1,30 @@
+[[Start-Windup]]
+=== Start Windup
+
+For information about the use of WINDUP_HOME in the instructions below, see xref:About-the-WINDUP_HOME-Variable[About the WINDUP_HOME Variable].
+
+1. Open a terminal and navigate to the `WINDUP_HOME/bin` directory
+
+2. Type the following command to start Windup:
++
+---------------------------------------------------------------------------
+For Linux: WINDUP_HOME/bin $ ./windup
+For Windows: C:\WINDUP_HOME\bin> windup
+---------------------------------------------------------------------------
+3. You are presented with the following prompt.
++
+---------------------------------------------------------------------------
+Using Windup at /home/username/windup-distribution-2.0.0.VERSION
+
+ _ ___ __
+| | / (_)___ ____/ /_ ______
+| | /| / / / __ \/ __ / / / / __ \
+| |/ |/ / / / / / /_/ / /_/ / /_/ /
+|__/|__/_/_/ /_/\__,_/\__,_/ .___/
+ /_/
+
+JBoss Windup, version [ 2.0.0.VERSION ] - JBoss, by Red Hat, Inc. [ http://windup.jboss.org ]
+
+[windup-distribution-2.0.0.VERSION]$
+---------------------------------------------------------------------------
+
diff --git a/docs/User-Guide.adoc b/docs/User-Guide.adoc
new file mode 100644
index 0000000000..a1dff1e6d4
--- /dev/null
+++ b/docs/User-Guide.adoc
@@ -0,0 +1,31 @@
+[[User-Guide]]
+=== Windup User Guide
+
+:toc:
+:toclevels: 4
+
+==== Overview
+
+This guide is for engineers, consultants, and others who plan to use
+Windup 2.0 to migrate Java applications or other components.
+
+* xref:What-is-Windup[What is Windup?]
+* xref:Features-of-Windup-2.0[Features of Windup 2.0]
+* xref:Windup-Processing-Overview[Windup Processing Overview]
+* xref:Get-Involved[Get Involved]
+* xref:Report-Issues-with-Windup[Report Issues with Windup]
+* xref:About-the-WINDUP_HOME-Variable[About the WINDUP_HOME Variable]
+
+==== Run Windup
+
+* xref:Install-Windup[Install Windup]
+* xref:Execute-Windup[Execute Windup]
+* xref:Review-the-Report[Review the Report]
+
+==== Additional Resources
+
+* xref:Review-the-Windup-Quickstarts[Review the Windup Quickstarts]
+* xref:Known-Issues[Known Issues]
+* xref:Glossary[Glossary of Terms]
+* xref:Windup-Architectural-Components[Windup Architectural Components]
+
diff --git a/docs/User-Guide.asciidoc b/docs/User-Guide.asciidoc
deleted file mode 100644
index 61a48824bb..0000000000
--- a/docs/User-Guide.asciidoc
+++ /dev/null
@@ -1,31 +0,0 @@
-[[User-Guide]]
-=== Windup User Guide
-
-:toc:
-:toclevels: 4
-
-==== Overview
-
-This guide is for engineers, consultants, and others who plan to use
-Windup 2.0 to migrate Java applications or other components.
-
-* link:What-is-Windup[What is Windup?]
-* link:Features-of-Windup-2.0[Features of Windup 2.0]
-* link:Windup-Processing-Overview[Windup Processing Overview]
-* link:Get-Involved[Get Involved]
-* link:Report-Issues-with-Windup[Report Issues with Windup]
-* link:About-the-WINDUP_HOME-Variable[About the WINDUP_HOME Variable]
-
-==== Run Windup
-
-* link:Install-Windup[Install Windup]
-* link:Execute-Windup[Execute Windup]
-* link:Review-the-Report[Review the Report]
-
-==== Additional Resources
-
-* link:Review-the-Windup-Quickstarts[Review the Windup Quickstarts]
-* link:Known-Issues[Known Issues]
-* link:Glossary[Glossary of Terms]
-* link:Windup-Architectural-Components[Windup Architectural Components]
-
diff --git a/docs/What-is-Windup.adoc b/docs/What-is-Windup.adoc
index 2f2818a688..5804860851 100644
--- a/docs/What-is-Windup.adoc
+++ b/docs/What-is-Windup.adoc
@@ -1,4 +1,6 @@
-image:images/windup-logo-wiki-header.jpg[Windup Logo]
+:imagesdir: images
+
+image:windup-logo-large.png[Windup Logo]
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
diff --git a/docs/Windup-Core-Development-Guide-NO-TOC.adoc b/docs/Windup-Core-Development-Guide-NO-TOC.adoc
new file mode 100644
index 0000000000..c2ad432659
--- /dev/null
+++ b/docs/Windup-Core-Development-Guide-NO-TOC.adoc
@@ -0,0 +1,5 @@
+= Windup Core Development Guide
+
+include::Windup-Core-Development-Guide-Topics.adoc[tabsize=4]
+
+
diff --git a/docs/Windup-Core-Development-Guide-Topics.adoc b/docs/Windup-Core-Development-Guide-Topics.adoc
new file mode 100644
index 0000000000..e86982c277
--- /dev/null
+++ b/docs/Windup-Core-Development-Guide-Topics.adoc
@@ -0,0 +1,170 @@
+== Overview
+
+This guide is for developers who plan to contribute source code updates
+or core rule add-ons to the Windup 2.0 project.
+
+include::What-is-Windup.adoc[tabsize=4]
+
+include::Features-of-Windup-2.0.adoc[tabsize=4]
+
+include::About-the-WINDUP_HOME-Variable.adoc[tabsize=4]
+
+== Get Started
+
+Before you begin to contribute to Windup, take a quick tour to see how to use it.
+
+include::Install-and-Configure-Maven.adoc[tabsize=4]
+
+include::Dev-Get-the-Windup-Source-Code.adoc[tabsize=4]
+
+include::Dev-Build-Windup-from-Source.adoc[tabsize=4]
+
+include::Dev-Execute-Windup-Built-from-Source.adoc[tabsize=4]
+
+include::Execute-Windup.adoc[tabsize=4]
+
+include::Review-the-Report.adoc[tabsize=4]
+
+== Developer Contributing Information
+
+include::Dev-Development-Guidelines-and-Conventions.adoc[tabsize=4]
+
+include::Dev-Submit-Code-Updates-to-the-Windup-Project.adoc[tabsize=4]
+
+== Understand the Windup Architecture and Structure
+
+include::Windup-Architectural-Components.adoc[tabsize=4]
+
+include::Dev-Windup-Project-Structure.adoc[tabsize=4]
+
+== Rules and Rulesets
+
+include::Windup-Processing-Overview.adoc[tabsize=4]
+
+include::Rules-Rule-Execution-Lifecycle.adoc[tabsize=4]
+
+include::Rules-Rule-Story-Points.adoc[tabsize=4]
+
+include::Rules-Difference-Between-XML-based-and-Java-based-Rules.adoc[tabsize=4]
+
+== Create and Test Java Rule Add-ons
+
+include::Install-and-Configure-Maven.adoc[tabsize=4]
+
+include::Rules-Java-based-Rule-Structure.adoc[tabsize=4]
+
+include::Rules-Basic-Rule-Execution-Flow-Patterns.adoc[tabsize=4]
+
+include::Rules-Create-a-Basic-Java-based-Rule-Add-on.adoc[tabsize=4]
+
+// This is not ready for prime time... include::Rules-Create-an-Advanced-Ruleset.adoc[tabsize=4]
+
+== Create and Test XML Rules
+
+include::Rules-Create-a-Basic-XML-Rule.adoc[tabsize=4]
+
+include::Rules-XML-Rule-When-Condition-Syntax.adoc[tabsize=4]
+
+include::Rules-XML-Rule-Perform-Action-Syntax.adoc[tabsize=4]
+
+include::Rules-Test-a-Basic-XML-Rule-in-Windup.adoc[tabsize=4]
+
+== Core Developer topics
+
+include::Dev-Windup-Bootstrap.adoc[tabsize=4]
+
+include::Dev-Classloading-Notes.adoc[tabsize=4]
+
+include::Dev-Connect-to-the-Graph-via-Rexster.adoc[tabsize=4]
+
+include::Dev-Decompiling.adoc[tabsize=4]
+
+include::Dev-Dependencies.adoc[tabsize=4]
+
+include::Dev-Frames-Extensions.adoc[tabsize=4]
+
+include::Dev-Internal-API-Features.adoc[tabsize=4]
+
+include::Dev-Logging.adoc[tabsize=4]
+
+include::Dev-Variables-Stack.adoc[tabsize=4]
+
+// include::Dev-Port-WindRide-Functionality-to-Windup.adoc[tabsize=4]
+
+include::Dev-Git-Rebasing.adoc[tabsize=4]
+
+== Rules topics
+
+include::Rules-Available-Rules-Utilities.adoc[tabsize=4]
+
+include::Dev-Concepts-and-Philosophy.adoc[tabsize=4]
+
+include::Rules-Creating-Rule-Operations.adoc[tabsize=4]
+
+include::Rules-Rulesets.adoc[tabsize=4]
+
+include::Ruleset-Java-Basic-Ruleset.adoc[tabsize=4]
+
+include::Ruleset-Java-Classifications-and-Inline-Hints.adoc[tabsize=4]
+
+include::Ruleset-Java-EE-Apps.adoc[tabsize=4]
+
+include::Ruleset-Java-EE-Servers.adoc[tabsize=4]
+
+include::Ruleset-Reporting.adoc[tabsize=4]
+
+include::Ruleset-XML.adoc[tabsize=4]
+
+include::Rules-Windup-Models.adoc[tabsize=4]
+
+include::Rules-Create-Java-Queries.adoc[tabsize=4]
+
+include::Rules-Rules-Metadata.adoc[tabsize=4]
+
+include::Rules-Rules-Operations.adoc[tabsize=4]
+
+include::Rules-Ops-Reporting-Classification.adoc[tabsize=4]
+
+include::Rules-Ops-Reporting-Hint.adoc[tabsize=4]
+
+include::Rules-Ops-Reporting-TypeReference.adoc[tabsize=4]
+
+include::Rules-Ops-Xml-XsltTrasformation.adoc[tabsize=4]
+
+== Debugging and Troubleshooting
+
+include::Dev-Debugging-and-Profiling.adoc[tabsize=4]
+
+include::Dev-Troubleshoot-Windup-Issues.adoc[tabsize=4]
+
+== Wiki Information
+
+include::About-the-Windup-Wiki.adoc[tabsize=4]
+
+include::Dev-Add-Images-to-the-Windup-Wiki.adoc[tabsize=4]
+
+== Windup Product Release and Documentation Process
+
+include::Dev-Windup-Release-Process.adoc[tabsize=4]]
+
+include::Dev-Create-Windup-JavaDoc.adoc[tabsize=4]
+
+include::Dev-Windup-Documentation-Process.adoc[tabsize=4]
+
+== Additional Resources
+
+include::Review-the-Windup-Quickstarts.adoc[tabsize=4]
+
+include::Get-Involved.adoc[tabsize=4]
+
+include::Known-Issues.adoc[tabsize=4]
+
+include::Report-Issues-with-Windup.adoc[tabsize=4]
+
+== Appendix
+
+include::Glossary.adoc[tabsize=4]
+
+include::Dev-Windup-Project-Information.adoc[tabsize=4]
+
+
diff --git a/docs/Windup-Core-Development-Guide.adoc b/docs/Windup-Core-Development-Guide.adoc
index 83a68d526b..46812d4846 100644
--- a/docs/Windup-Core-Development-Guide.adoc
+++ b/docs/Windup-Core-Development-Guide.adoc
@@ -2,174 +2,8 @@
:toc:
:toclevels: 4
+:numbered:
-== Overview
-
-This guide is for developers who plan to contribute source code updates
-or core rule add-ons to the Windup 2.0 project.
-
-include::What-is-Windup.adoc[tabsize=4]
-
-include::Features-of-Windup-2.0.adoc[tabsize=4]
-
-include::About-the-WINDUP_HOME-Variable.adoc[tabsize=4]
-
-== Get Started
-
-Before you begin to contribute to Windup, take a quick tour to see how to use it.
-
-include::Install-and-Configure-Maven.adoc[tabsize=4]
-
-include::Dev-Get-the-Windup-Source-Code.adoc[tabsize=4]
-
-include::Dev-Build-Windup-from-Source.adoc[tabsize=4]
-
-include::Dev-Execute-Windup-Built-from-Source.adoc[tabsize=4]
-
-include::Execute-Windup.adoc[tabsize=4]
-
-include::Review-the-Report.adoc[tabsize=4]
-
-== Developer Contributing Information
-
-include::Dev-Development-Guidelines-and-Conventions.adoc[tabsize=4]
-
-include::Dev-Submit-Code-Updates-to-the-Windup-Project.adoc[tabsize=4]
-
-== Understand the Windup Architecture and Structure
-
-include::Windup-Architectural-Components.adoc[tabsize=4]
-
-include::Dev-Windup-Project-Structure.adoc[tabsize=4]
-
-== Rules and Rulesets
-
-include::Windup-Processing-Overview.adoc[tabsize=4]
-
-include::Rules-Rule-Execution-Lifecycle.adoc[tabsize=4]
-
-include::Rules-Rule-Story-Points.adoc[tabsize=4]
-
-include::Rules-Difference-Between-XML-based-and-Java-based-Rules.adoc[tabsize=4]
-
-== Create and Test Java Rule Add-ons
-
-include::Install-and-Configure-Maven.adoc[tabsize=4]
-
-include::Rules-Java-based-Rule-Structure.adoc[tabsize=4]
-
-include::Rules-Basic-Rule-Execution-Flow-Patterns.adoc[tabsize=4]
-
-include::Rules-Create-a-Basic-Java-based-Rule-Add-on.adoc[tabsize=4]
-
-// This is not ready for prime time... include::Rules-Create-an-Advanced-Ruleset.adoc[tabsize=4]
-
-== Create and Test XML Rules
-
-include::Rules-Create-a-Basic-XML-Rule.adoc[tabsize=4]
-
-include::Rules-XML-Rule-When-Condition-Syntax.adoc[tabsize=4]
-
-include::Rules-XML-Rule-Perform-Action-Syntax.adoc[tabsize=4]
-
-include::Rules-Test-a-Basic-XML-Rule-in-Windup.adoc[tabsize=4]
-
-== Core Developer topics
-
-include::Dev-Windup-Bootstrap.adoc[tabsize=4]
-
-include::Dev-Classloading-Notes.adoc[tabsize=4]
-
-include::Dev-Connect-to-the-Graph-via-Rexster.adoc[tabsize=4]
-
-include::Dev-Decompiling.adoc[tabsize=4]
-
-include::Dev-Dependencies.adoc[tabsize=4]
-
-include::Dev-Frames-Extensions.adoc[tabsize=4]
-
-include::Dev-Internal-API-Features.adoc[tabsize=4]
-
-include::Dev-Logging.adoc[tabsize=4]
-
-include::Dev-Variables-Stack.adoc[tabsize=4]
-
-// include::Dev-Port-WindRide-Functionality-to-Windup.adoc[tabsize=4]
-
-include::Dev-Git-Rebasing.adoc[tabsize=4]
-
-== Rules topics
-
-include::Rules-Available-Rules-Utilities.adoc[tabsize=4]
-
-include::Dev-Concepts-and-Philosophy.adoc[tabsize=4]
-
-include::Rules-Creating-Rule-Operations.adoc[tabsize=4]
-
-include::Rules-Rulesets.adoc[tabsize=4]
-
-include::Ruleset-Java-Basic-Ruleset.adoc[tabsize=4]
-
-include::Ruleset-Java-Classifications-and-Inline-Hints.adoc[tabsize=4]
-
-include::Ruleset-Java-EE-Apps.adoc[tabsize=4]
-
-include::Ruleset-Java-EE-Servers.adoc[tabsize=4]
-
-include::Ruleset-Reporting.adoc[tabsize=4]
-
-include::Ruleset-XML.adoc[tabsize=4]
-
-include::Rules-Windup-Models.adoc[tabsize=4]
-
-include::Rules-Create-Java-Queries.adoc[tabsize=4]
-
-include::Rules-Rules-Metadata.adoc[tabsize=4]
-
-include::Rules-Rules-Operations.adoc[tabsize=4]
-
-include::Rules-Ops-Reporting-Classification.adoc[tabsize=4]
-
-include::Rules-Ops-Reporting-Hint.adoc[tabsize=4]
-
-include::Rules-Ops-Reporting-TypeReference.adoc[tabsize=4]
-
-include::Rules-Ops-Xml-XsltTrasformation.adoc[tabsize=4]
-
-== Debugging and Troubleshooting
-
-include::Dev-Debugging-and-Profiling.adoc[tabsize=4]
-
-include::Dev-Troubleshoot-Windup-Issues.adoc[tabsize=4]
-
-== Wiki Information
-
-include::About-the-Windup-Wiki.adoc[tabsize=4]
-
-include::Dev-Add-Images-to-the-Windup-Wiki.adoc[tabsize=4]
-
-== Windup Product Release and Documentation Process
-
-include::Dev-Windup-Release-Process.adoc[tabsize=4]]
-
-include::Dev-Create-Windup-JavaDoc.adoc[tabsize=4]
-
-include::Dev-Windup-Documentation-Process.adoc[tabsize=4]
-
-== Additional Resources
-
-include::Review-the-Windup-Quickstarts.adoc[tabsize=4]
-
-include::Get-Involved.adoc[tabsize=4]
-
-include::Known-Issues.adoc[tabsize=4]
-
-include::Report-Issues-with-Windup.adoc[tabsize=4]
-
-== Appendix
-
-include::Glossary.adoc[tabsize=4]
-
-include::Dev-Windup-Project-Information.adoc[tabsize=4]
+include::Windup-Core-Development-Guide-Topics.adoc[tabsize=4]
diff --git a/docs/Windup-Rules-Development-Guide-NO-TOC.adoc b/docs/Windup-Rules-Development-Guide-NO-TOC.adoc
new file mode 100644
index 0000000000..d0ca51c2c8
--- /dev/null
+++ b/docs/Windup-Rules-Development-Guide-NO-TOC.adoc
@@ -0,0 +1,6 @@
+= Windup Rules Development Guide
+
+include::Windup-Rules-Development-Guide-Topics.adoc[tabsize=4]
+
+
+
diff --git a/docs/Windup-Rules-Development-Guide-Topics.adoc b/docs/Windup-Rules-Development-Guide-Topics.adoc
new file mode 100644
index 0000000000..7e19a825cb
--- /dev/null
+++ b/docs/Windup-Rules-Development-Guide-Topics.adoc
@@ -0,0 +1,81 @@
+== Overview
+
+This guide is for engineers, consultants, and others who plan to create
+custom rules for Windup 2.0.
+
+include::What-is-Windup.adoc[tabsize=4]
+
+include::Features-of-Windup-2.0.adoc[tabsize=4]
+
+include::About-the-WINDUP_HOME-Variable.adoc[tabsize=4]
+
+== Get Started
+
+include::Install-Windup.adoc[tabsize=4]
+
+include::Execute-Windup.adoc[tabsize=4]
+
+include::Review-the-Report.adoc[tabsize=4]
+
+== Understand the Rule Processing
+
+include::Windup-Processing-Overview.adoc[tabsize=4]
+
+include::Rules-Rule-Execution-Lifecycle.adoc[tabsize=4]
+
+include::Rules-Rule-Story-Points.adoc[tabsize=4]
+
+include::Rules-Difference-Between-XML-based-and-Java-based-Rules.adoc[tabsize=4]
+
+== Create and Test Java Rule Addons
+
+include::Install-and-Configure-Maven.adoc[tabsize=4]
+
+include::Rules-Java-based-Rule-Structure.adoc[tabsize=4]
+
+include::Rules-Basic-Rule-Execution-Flow-Patterns.adoc[tabsize=4]
+
+include::Rules-Create-a-Basic-Java-based-Rule-Add-on.adoc[tabsize=4]
+
+// This is not ready for prime time... include::Rules-Create-an-Advanced-Ruleset.adoc[tabsize=4]
+
+== Create and Test XML Rules
+
+include::Rules-Create-a-Basic-XML-Rule.adoc[tabsize=4]
+
+include::Rules-XML-Rule-When-Condition-Syntax.adoc[tabsize=4]
+
+include::Rules-XML-Rule-Perform-Action-Syntax.adoc[tabsize=4]
+
+include::Rules-Test-a-Basic-XML-Rule-in-Windup.adoc[tabsize=4]
+
+== Debugging and Troubleshooting
+
+include::Dev-Debugging-and-Profiling.adoc[tabsize=4]
+
+include::Dev-Troubleshoot-Windup-Issues.adoc[tabsize=4]
+
+== Additional Resources
+
+include::Get-Involved.adoc[tabsize=4]
+
+include::Review-the-Windup-Quickstarts.adoc[tabsize=4]
+
+include::Rules-Available-Rules-Utilities.adoc[tabsize=4]
+
+include::Known-Issues.adoc[tabsize=4]
+
+include::Report-Issues-with-Windup.adoc[tabsize=4]
+
+== Appendix
+
+include::Glossary.adoc[tabsize=4]
+
+include::Windup-Architectural-Components.adoc[tabsize=4]
+
+// This is not ready for prime time... include::Dev-Dependencies.adoc[tabsize=4]
+
+include::Rules-Windup-Models.adoc[tabsize=4]
+
+
+
diff --git a/docs/Windup-Rules-Development-Guide.adoc b/docs/Windup-Rules-Development-Guide.adoc
index 5344e2cb57..7b238a3fd0 100644
--- a/docs/Windup-Rules-Development-Guide.adoc
+++ b/docs/Windup-Rules-Development-Guide.adoc
@@ -4,84 +4,7 @@
:toclevels: 4
:numbered:
-== Overview
-
-This guide is for engineers, consultants, and others who plan to create
-custom rules for Windup 2.0.
-
-include::What-is-Windup.adoc[tabsize=4]
-
-include::Features-of-Windup-2.0.adoc[tabsize=4]
-
-include::About-the-WINDUP_HOME-Variable.adoc[tabsize=4]
-
-== Get Started
-
-include::Install-Windup.adoc[tabsize=4]
-
-include::Execute-Windup.adoc[tabsize=4]
-
-include::Review-the-Report.adoc[tabsize=4]
-
-== Understand the Rule Processing
-
-include::Windup-Processing-Overview.adoc[tabsize=4]
-
-include::Rules-Rule-Execution-Lifecycle.adoc[tabsize=4]
-
-include::Rules-Rule-Story-Points.adoc[tabsize=4]
-
-include::Rules-Difference-Between-XML-based-and-Java-based-Rules.adoc[tabsize=4]
-
-== Create and Test Java Rule Addons
-
-include::Install-and-Configure-Maven.adoc[tabsize=4]
-
-include::Rules-Java-based-Rule-Structure.adoc[tabsize=4]
-
-include::Rules-Basic-Rule-Execution-Flow-Patterns.adoc[tabsize=4]
-
-include::Rules-Create-a-Basic-Java-based-Rule-Add-on.adoc[tabsize=4]
-
-// This is not ready for prime time... include::Rules-Create-an-Advanced-Ruleset.adoc[tabsize=4]
-
-== Create and Test XML Rules
-
-include::Rules-Create-a-Basic-XML-Rule.adoc[tabsize=4]
-
-include::Rules-XML-Rule-When-Condition-Syntax.adoc[tabsize=4]
-
-include::Rules-XML-Rule-Perform-Action-Syntax.adoc[tabsize=4]
-
-include::Rules-Test-a-Basic-XML-Rule-in-Windup.adoc[tabsize=4]
-
-== Debugging and Troubleshooting
-
-include::Dev-Debugging-and-Profiling.adoc[tabsize=4]
-
-include::Dev-Troubleshoot-Windup-Issues.adoc[tabsize=4]
-
-== Additional Resources
-
-include::Get-Involved.adoc[tabsize=4]
-
-include::Review-the-Windup-Quickstarts.adoc[tabsize=4]
-
-include::Rules-Available-Rules-Utilities.adoc[tabsize=4]
-
-include::Known-Issues.adoc[tabsize=4]
-
-include::Report-Issues-with-Windup.adoc[tabsize=4]
-
-== Appendix
-
-include::Glossary.adoc[tabsize=4]
-
-include::Windup-Architectural-Components.adoc[tabsize=4]
-
-// This is not ready for prime time... include::Dev-Dependencies.adoc[tabsize=4]
-
-include::Rules-Windup-Models.adoc[tabsize=4]
+include::Windup-Rules-Development-Guide-Topics.adoc[tabsize=4]
diff --git a/docs/Windup-User-Guide-NO-TOC.adoc b/docs/Windup-User-Guide-NO-TOC.adoc
new file mode 100644
index 0000000000..73a1f7e3df
--- /dev/null
+++ b/docs/Windup-User-Guide-NO-TOC.adoc
@@ -0,0 +1,8 @@
+= Windup User Guide
+
+//:toc:
+//:toclevels: 4
+//:numbered:
+
+include::Windup-User-Guide-Topics.adoc[tabsize=4]
+
diff --git a/docs/Windup-User-Guide-Topics.adoc b/docs/Windup-User-Guide-Topics.adoc
new file mode 100644
index 0000000000..b4b0db6479
--- /dev/null
+++ b/docs/Windup-User-Guide-Topics.adoc
@@ -0,0 +1,44 @@
+== Overview
+
+This guide is for engineers, consultants, and others who plan to use
+Windup 2.0 to migrate Java applications or other components.
+
+include::What-is-Windup.adoc[tabsize=4]
+
+include::Features-of-Windup-2.0.adoc[tabsize=4]
+
+include::About-the-WINDUP_HOME-Variable.adoc[tabsize=4]
+
+== Get Started
+
+include::Install-Windup.adoc[tabsize=4]
+
+include::Execute-Windup.adoc[tabsize=4]
+
+include::Review-the-Report.adoc[tabsize=4]
+
+== Additional Resources
+
+include::Review-the-Windup-Quickstarts.adoc[tabsize=4]
+
+include::Get-Involved.adoc[tabsize=4]
+
+include::Known-Issues.adoc[tabsize=4]
+
+include::Report-Issues-with-Windup.adoc[tabsize=4]
+
+== Appendix
+
+include::Glossary.adoc[tabsize=4]
+
+include::Windup-Processing-Overview.adoc[tabsize=4]
+
+include::Windup-Architectural-Components.adoc[tabsize=4]
+
+include::Rules-Rule-Execution-Lifecycle.adoc[tabsize=4]
+
+include::Rules-Rule-Story-Points.adoc[tabsize=4]
+
+
+
+
diff --git a/docs/Windup-User-Guide.adoc b/docs/Windup-User-Guide.adoc
index 19c0e0a6df..dff2adf7b3 100644
--- a/docs/Windup-User-Guide.adoc
+++ b/docs/Windup-User-Guide.adoc
@@ -4,47 +4,5 @@
:toclevels: 4
:numbered:
-== Overview
-
-This guide is for engineers, consultants, and others who plan to use
-Windup 2.0 to migrate Java applications or other components.
-
-include::What-is-Windup.adoc[tabsize=4]
-
-include::Features-of-Windup-2.0.adoc[tabsize=4]
-
-include::About-the-WINDUP_HOME-Variable.adoc[tabsize=4]
-
-== Get Started
-
-include::Install-Windup.adoc[tabsize=4]
-
-include::Execute-Windup.adoc[tabsize=4]
-
-include::Review-the-Report.adoc[tabsize=4]
-
-== Additional Resources
-
-include::Review-the-Windup-Quickstarts.adoc[tabsize=4]
-
-include::Get-Involved.adoc[tabsize=4]
-
-include::Known-Issues.adoc[tabsize=4]
-
-include::Report-Issues-with-Windup.adoc[tabsize=4]
-
-== Appendix
-
-include::Glossary.adoc[tabsize=4]
-
-include::Windup-Processing-Overview.adoc[tabsize=4]
-
-include::Windup-Architectural-Components.adoc[tabsize=4]
-
-include::Rules-Rule-Execution-Lifecycle.adoc[tabsize=4]
-
-include::Rules-Rule-Story-Points.adoc[tabsize=4]
-
-
-
+include::Windup-User-Guide-Topics.adoc[tabsize=4]
diff --git a/docs/Windup-lab-scripts.adoc b/docs/Windup-lab-scripts.adoc
new file mode 100644
index 0000000000..6e6c29cc79
--- /dev/null
+++ b/docs/Windup-lab-scripts.adoc
@@ -0,0 +1,120 @@
+[[Windup-Lab-Scripts]]
+=== Windup Lab Scripts
+
+Semi-automated installation script (for Linux).
+
+This is a basis for a script that will automatically install everything in one run. Appropriate for multiple machines in a lab.
+
+[source,bash]
+--------------------------------------------------------------------------------------------
+## Check if installed
+HAS_MVN=$(echo $((`mvn -v > /dev/null ; echo $?` == 0)) )
+MVN='mvn'
+ROOT_DIR=`pwd`
+
+## Download
+wget -bc http://download.netbeans.org/netbeans/8.0.2/final/bundles/netbeans-8.0.2-javase-linux.sh & echo $! > nb.pid
+wget ftp://mirror.reverse.net/pub/apache/maven/maven-3/3.2.5/binaries/apache-maven-3.2.5-bin.zip & echo $! > mvn.pid
+git clone https://github.com/windup/windup-rulesets.git windup-rulesets & echo $! > windup-rs.pid
+git clone https://github.com/windup/windup.git windup & echo $! > windup.pid
+git clone https://github.com/windup/windup-distribution.git windup & echo $! > windup-dist.pid
+git clone https://github.com/windup/windup-quickstarts.git & echo $! > windup-qs.pid
+git clone https://github.com/windup/maven-indexer.git & echo $! > maven-indexer.pid
+git clone https://github.com/windup/nexus-repository-indexer.git & echo $! > nexus-ri.pid
+wait $( nb.pid
+
+## Maven 3.2.5+
+if [ ! $HAS_MVN ] ; then
+ unzip -q apache-maven-3.2.5-bin.zip
+ MVN=$PWD/apache-maven-3.2.5/bin/mvn
+fi
+
+## settings.xml with JBoss Maven repository
+wget https://raw.github.com/wiki/windup/windup/files/settings.xml
+if [ ! -x ~/.m2/settings.xml] ; then
+ cp settings.xml ~/.m2/settings.xml
+fi
+
+
+## Necessary dependencies...
+cd maven-indexer/
+$MVN install -DskipTests
+cd ..
+
+cd nexus-repository-indexer/
+$MVN install -DskipTests
+cd ..
+
+## Windup
+cd windup/
+$MVN install -DskipTests -s settings.xml
+cd ..
+
+## Windup Dist
+cd windup-distribution/
+$MVN install -DskipTests -s settings.xml
+cd ..
+
+## Windup Rulesets
+cd windup-rulesets/
+$MVN install -DskipTests & echo $! > windup-rs.pid
+cd ..
+
+## Windup QuickStarts
+#firefox https://github.com/windup/windup-quickstarts
+cd windup-quickstarts/
+$MVN install -DskipTests & echo $! > windup-qs.pid
+cd ..
+
+wait $(
+
+
+
+
+
+
+Windup Core Development Guide
+
+
+
+
+
+
Windup Core Development Guide
+
+
+
+
Overview
+
+
+
This guide is for developers who plan to contribute source code updates
+or core rule add-ons to the Windup 2.0 project.
+
+
+
+
+
+
+
What is Windup?
+
+
JBoss Windup is a rule-based tool to simplify application migrations.
+
+
+
Running from a Forge environment, the tool examines EAR, WAR, and
+JAR deployments (or a project source directory) and produces an HTML report detailing the inner workings of
+the Java application to simplify migration efforts. It seeks to make
+migrating from other containers to JBoss EAP a piece of cake.
+
+
+
Windup 2.0 vs. Windup 0.7.x
+
+
Windup 2.0 aims to deliver the same functionality as legacy Windup, however, the internal architecture and rule structure is very different and allows for the creation of much more complex rules.
+
+
+
+
How Does Windup Simplify Migration?
+
+
Windup looks for common resources and highlight technologies and known “trouble
+spots” in migrating applications. The goal of Windup is to provide a
+high level view into relevant technologies in use within the
+application, and provide a consumable report for organizations to
+estimate, document, and migrate enterprise applications to Java EE and JBoss EAP.
+
+
+
These are some of the of the areas targetted by current core Windup rulesets:
+
+
+
+
+
+
+
+
+
Ruleset
+
Description
+
+
+
+
+
Java code
+
Reads compiled Java files, determines if blacklisted classes are imported, and if so, continues to profile the resource.
+
+
+
JSP code
+
Reads JSP files, extracts the JSP imports and taglibs, and continues to
+profile the resource
+
+
+
XML configuration
+
Reads XML files into a DOM objects and continues to profile the resource.
+
+
+
+
+
+
Follow Windup on Twitter!
+
+
Follow Windup on Twitter @JBossWindup for updates and more!
+
+
+
+
+
Features of Windup 2.0
+
+
+
+
+Shared Data Model
+
+
+
Windup 2.0 creates a shared data model graph that provides the following benefits.
+
+
+
+
It enables complex rule interaction, allowing rules to pass findings to other rules.
+
+
+
It enables 3rd-party plug-ins to interact with other plugins, rules and reports.
+
+
+
The data graph organizes the findings to be searchable and queryable.
+
+
+
+
+
+
+
+Extensibility
+
+
+
Windup 2.0 can be extended by developers, users, and 3rd-parties.
+
+
+
+
It provides a plug-in API to inject other applications into Windup.
+
+
+
It enables 3rd-parties to create simple POJO plug-ins that can interact with the data graph.
+
+
+
Means we don’t have to invent everything. Users with domain knowledge can implement their own rules.
+
+
+
+
+
+
+
+Better Rules
+
+
+
Windup 2.0 provides more powerful and complex rules.
+
+
+
+
XML-based rules are simple to write and and easy to implement.
+
+
+
Java-based rule add-ons are based on OCPsoft Rewrite and provide greater flexibility and power creating when rules.
+
+
+
Rules can now be nested to handle more complex situations. This means you can nest simple statements rather than use complex XPATH or REGEX expressions.
+*Rules can be linked using and/or statements
+
+
+
+
+
+
+
+Automation
+
+
+
Windup 2.0 has the ability to automate some of the migration processes.
+
+
+
+
Windup is integrated with Forge 2.0, meaning it can generate projects, libraries, and configuration files.
+
+
+
Rules can create Forge inputs and put them into the data graph.
+
+
+
During the automation phase, the data graph inputs can be processed to generate a new project.
+
+
+
+
+
+
+
+Work Estimation
+
+
+
Estimates for the level of effort is based on the skills required and the classification of migration work needed.
+
+
+
+
Lift and Shift - The code or file is standards-based and can be ported to the new environment with no changes.
+
+
+
Mapped - There is a standard mapping algorithm to port the code or file to the new environment.
+
+
+
Custom – The code or file must be rewritten or modified to work in the new environment.
+
+
+
+
+
+
+
+Better Reporting
+
+
+
Windup 2.0 reports are now targeted for specific audiences.
+
+
+
+
IT Management - Applications are ranked by cost of migration.
+
+
+
Project Management - Reports detail the type of work and estimation of effort to complete the tasks.
+
+
+
Developers - An Eclipse plug-in provides hints and suggested code changes within the IDE.
+
+
+
+
+
+
+
+
+
+
About the WINDUP_HOME Variable
+
+
This documentation uses the WINDUP_HOMEreplaceable value to denote the path to the Windup distribution. When you encounter this value in the documentation, be sure to replace it with the actual path to your Windup installation.
+
+
+
+
+
If you download and install the latest distribution of Windup from the JBoss Nexus repository, WINDUP_HOME refers to the windup-distribution-2.0.0.VERSION folder extracted from the downloaded ZIP file.
+
+
+
If you build Windup from GitHub source, WINDUP_HOME refers to the windup-distribution-2.0.0-VERSION folder extracted from the Windup source dist/target/windup-distribution-2.0.0-VERSION.zip file.
+
+
+
+
+
+
+
+
Get Started
+
+
+
Before you begin to contribute to Windup, take a quick tour to see how to use it.
+
+
+
Install and Configure Maven
+
+
If you plan to contribute to the core code base or create Java-based rule add-ons, you must first install and configure Maven to build Windup from source.
+
+
+
Download and Install Maven
+
+
If you plan to use Eclipse Luna (4.4) to build Windup, you can skip this
+step and go directly to the section entitled Configure Maven to Build Windup. This version of Eclipse embeds Maven 3.2.1 so you do not need to
+install it separately.
+
+
+
If you plan to run Maven using the command line or plan to use Red Hat
+JBoss Developer Studio 7.1.1 or an older version of Eclipse, you must
+install Maven 3.1.1. or later.
See the Maven documentation for information on how to download and
+install Apache Maven for your operating system.
+
+
+
+
+
+
Configure the Maven Installation in Your IDE
+
+
JBoss Developer Studio 7.1.1 is built upon Eclipse Kepler (4.3), which
+embeds Maven 3.0.4. If you plan to use JBoss Developer Studio 7.1.1 or
+an Eclipse version earier than Eclipse Luna (4.4), you must replace the
+embedded 3.0.4 version of Maven with this newer version.
+
+
+
+
+
From the menu, choose Window -→ Preferences.
+
+
+
Expand Maven and click on Installations.
+
+
+
Uncheck Embedded (3.0.4/1.4.0.20130531-2315)
+
+
+
Click Add and navigate to your Maven install directory. Select it
+and click OK.
+
+
+
Make sure the new external Maven installation is checked and click
+OK to return to JBoss Developer Studio.
+
+
+
+
+
Note: If you use another IDE, refer to the product documentation to
+update the Maven installation.
+
+
+
+
Configure Maven to Build Windup
+
+
Windup uses artifacts located in the
+JBoss Nexus
+repository. You must configure Maven to use this repository before you
+build Windup.
+
+
+
+
+
Open your ${user.home}/.m2/settings.xml file for editing.
+
+
+
Copy the following jboss-nexus-repository profile XML prior to the
+ending </profiles> element.
To contribute to the Windup 2.0 project source code, you must fork the Windup repository to your own Git, clone your fork, commit your work on topic branches, and make pull requests back to the Windup repository.
Get the latest files from the upstream repository.
+
+
+
git fetch upstream
+
+
+
+
+
+
+
+
+
Build Windup from Source
+
+
This information is provided for new developers who plan to contribute code
+to the Windup open source project. This section describes how to build Windup from source and how to extract the Windup distribution that is created during the build process.
Open a command terminal and navigate to the root of the Windup project directory.
+
+
+
cd Windup/
+
+
+
+
+
To create a branch and build Windup using the latest version of the source code:
+
+
+
+
Fetch the latest source code from the upstream repository.
+
+
+
git fetch upstream
+
+
+
+
+
Checkout a local copy of the branch.
+
+
+
git checkout -b BRANCH_NAME upstream/master
+
+
+
+
+
+
+
+
If, at any point, you want to toss your changes and reset your local branch to the contents of the upstream repository, issue the following 2 commands. Do NOT do this if you have made changes that you don’t want to lose!
+
+
+
git fetch upstream
+
+
+
+
+
git reset --hard upstream/master
+
+
+
+
+
Build the project.
+
+
+
mvn clean install
+
+
+
+
You can also build the project without the tests.
+
+
+
+
mvn clean install -DskipTests
+
+
+
+
+
+
+
+
Build Windup Using Red Hat JBoss Developer Studio or Eclipse
+
+
If you prefer, you can use an IDE to build Windup.
+
+
+
+
+
Make sure you have configured the Maven installation in your IDE as
+described here:
+Install
+and Configure Maven.
+
+
+
Start JBoss Developer Studio or Eclipse.
+
+
+
From the menu, select File → Import.
+
+
+
In the selection list, choose Maven → Existing Maven Projects,
+then click Next.
+
+
+
Click Browse and navigate to the root of the Windup
+project directory, then click OK.
+
+
+
After all projects are listed, click Next. Ignore any Maven build
+or dependency errors and click Finish. If you get a dialog titled
+Incomplete Maven Goal Execution, ignore it and click OK to continue.
+
+
+
In the Project Explorer tab, find the windup_parent project in the
+list, right-click, and choose Run As -→ Maven install.
+
+
+
+
+
+
Extract the Windup Distribution Source File
+
+
The build process creates a windup-distribution-2.0.0-SNAPSHOT-offline.zip file in the Windup source dist/target/ directory.
+
+
+
Unzip the dist/target/windup-distribution-2.0.0-SNAPSHOT-offline.zip file into a directory of your choice.
+
+
+
+
Quick Build Review for Experienced Windup Developers
+
+
+
git clone git@github.com:windup/windup.git windup
+## Or if you haven't set up github account:
+#git clone https://github.com/windup/windup.git
+cd windup
+mvn clean install -DskipTests
+rm -rf /tmp/windup-zip/ /tmp/windup/
+unzip -q dist/target/windup-distribution-*-offline.zip -d /tmp/windup-zip
+mv /tmp/windup-zip/windup-distribution-* /tmp/windup
+
+
+
+
+
+
Execute Windup (Built from Windup Source)
+
+
These instructions are for Windup core developers who plan to build Windup from source to test code updates.
+
+
+
+
+
If you are new to the project and not familiar with the procedures to execute Windup, see Execute Windup. It contains complete step-by-step instructions to execute Windup and also provides command line examples.
+
+
+
Experienced users who need a refresher can follow the steps below.
Before you begin, you must gather the following information.
+
+
+
+
+
The fully qualified path of the application archive or folder you plan to migrate.
+
+
+
The fully qualified path to a folder that will contain the resulting report information.
+
+
+
+
If the folder does not exist, it is created by Windup.
+
+
+
If the folder exists, you are prompted with the message:
+
+
+
Overwrite all contents of <OUTPUT_DIRECTORY> (anything already in the directory will be deleted)? [y/N]
+
+
+
+
Choose "y" if you want Windup to delete and recreate the directory.
+
+
+
+
If you are confident you want to overwrite the output directory, you can specify --overwrite on the command line to automatically delete and recreate the directory.
+
+
+
+
+
Note
+
+
+Be careful not to specify a directory that contains important information!
+
+
+
+
+
+
+
+
+
+
You must also provide a list of the application packages to be evaluated.
+
+
+
+
In most cases, you are interested only in evaluating the custom application class packages and not the standard Java EE or 3rd party packages. For example, if the MyCustomApp application uses the package com.mycustomapp, you provide that package using the --packages argument on the command line. It is not necessary to provide the standard Java EE packages, like java.util or javax.ejb.
+
+
+
While you can provide package names for standard Java EE 3rd party software like org.apache, it is usually best not to include them as they should not impact the migration effort.
+
+
+
If you omit the --packages argument, every package in the application is scanned, resulting in very slow performance. It is best to provide the argument with one or more packages.
Open a terminal and navigate to the WINDUP_HOME/bin directory
+
+
+
Type the following command to start Windup:
+
+
+
For Linux: WINDUP_HOME/bin $ ./windup
+For Windows: C:\WINDUP_HOME\bin> windup
+
+
+
+
+
You are presented with the following prompt.
+
+
+
Using Windup at WINDUP_HOME
+
+ _ ___ __
+| | / (_)___ ____/ /_ ______
+| | /| / / / __ \/ __ / / / / __ \
+| |/ |/ / / / / / /_/ / /_/ / /_/ /
+|__/|__/_/_/ /_/\__,_/\__,_/ .___/
+ /_/
+
+JBoss Windup, version [ 2.0.0-VERSION ] - JBoss, by Red Hat, Inc. [ http://windup.jboss.org ]
+
+[windup-distribution-2.0.0-VERSION]$
+
+
+
+
+
+
+
+
Run Windup
+
+
+
+
The command to run Windup is windup-migrate-app.
+
+
+
This command can take arbitrary options processed by different addons. The list of options in the core Windup distribution can be found in Javadoc. Most commonly used command line arguments are:
+
+
+
--input INPUT_ARCHIVE_OR_FOLDER
+
+
This is the fully qualified application archive or source path.
+
+
--output OUTPUT_REPORT_DIRECTORY
+
+
The fully qualified path to the folder that will contain the the report information produced by Windup.
+
+
+
+
+
Note
+
+
+If the OUTPUT_REPORT_DIRECTORY directory exists and you do not specify the --overwrite argument, you are prompted to overwrite the contents. If you respond "y", it is deleted and recreated by Windup, so be careful not to specify an output directory that contains important information!
+
+
+
+
+
+
--overwrite (optional)
+
+
Specify this optional argument only if you are certain you want to force Windup to delete the existing OUTPUT_REPORT_DIRECTORY. The default value is false.
+
+
--userRulesDirectory
+
+
Points to a directory to load XML rules from. (Search pattern: *.windup.groovy and *.windup.xml)
This is a comma-delimited list of the packages to be excluded by Windup.
+
+
--source-mode true (optional)
+
+
This argument is optional and is only required if the application to be evaluated contains source files rather than compiled binaries. The default value is false.
+
+
+
+
+
+
To evaluate an application archive, use the following syntax:
See Windup Command Examples below for concrete examples of commands that use source code directories and archives located in the Windup GitHub repository.
+
+
+
+
You should see the following result upon completion of the command:
+
+
+
***SUCCESS*** Windup execution successful!
+
+
+
+
+
To exit Windup, type:
+
+
+
exit
+
+
+
+
+
Open the OUTPUT_REPORT_DIRECTORY/index.html file in a browser to access the report.
+The following subdirectories in the OUTPUT_REPORT_DIRECTORY contain the supporting information for the report:
To see the complete list of available arguments for the windup-migrate-app command, execute the following command in the Windup prompt:
+
+
+
+
man windup-migrate-app
+
+
+
+
+
Windup Command Examples
+
+
The following Windup command examples report against applications located in the Windup source test-files directory.
+
+
+
Source Code Example
+
+
The following command runs against the seam-booking-5.2 application source code. It evaluates all org.jboss.seam packages and creates a folder named 'seam-booking-report' in the /home/username/windup-reports/ directory to contain the reporting output.
The following command runs against the jee-example-app-1.0.0.ear EAR archive. It evaluates all com.acme and org.apache packages and creates a folder named 'jee-example-app-1.0.0.ear-report' in the /home/username/windup-reports/ directory to contain the reporting output.
The following Windup batch command runs against the jee-example-app-1.0.0.ear EAR archive. It evaluates all com.acme and org.apache packages and creates a folder named 'jee-example-app-1.0.0.ear-report' in the /home/username/windup-reports/ directory to contain the reporting output.
The quickstarts provide examples of Java-based and XML-based rules you can run and test using Windup. The README instructions provide a step-by-step guide to run the quickstart example. You can also look through the code examples and use them as a starting point for creating your own rules.
+
+
+
+
+
+
Review the Report
+
+
About the Report
+
+
When you execute Windup, the report is generated in the OUTPUT_REPORT_DIRECTORY you specify for the --output argument in the command line. This output directory contains the following files and subdirectories:
+
+
+
+
+
index.html: This is the landing page for the report.
+
+
+
archives/: Contains the archives extracted from the application
+
+
+
graph/: Contains binary graph database files
+
+
+
reports/: This directory contains the generated HTML report files
+
+
+
stats/: Contains Windup performance statistics
+
+
+
+
+
The examples below use the test-files/jee-example-app-1.0.0.ear located in the Windup GitHub source repository for input and specify the com.acme and org.apache package name prefixes to scan. For example:
Use your favorite browser to open the index.html file located in the output report directory. You should see something like the following:
+
+
+
+
+
+
Click on the link under the Name column to view the Windup application report page.
+
+
+
+
Report Sections
+
+
Application Report Page
+
+
The first section of the application report page summarizes the migration effort. It provides the total Story Points and a graphically displays the effort by technology. A Story Point is a term commonly used in Scrum Agile software development methodology to estimate the level of effort needed to implement a feature or change. It does not necessarily translate to man-hours, but the value should be consistent across tasks.
+
+
+
+
+
The migration of the JEE Example App EAR is assigned a total of 42 story points. A pie chart shows the breakdown of story points by package.
+
+
+
This is followed by a section for each of the archives contained in the EAR. It provides the total of the story points assigned to the archive and lists the files contained in archive along with the warnings and story point assigned to each file.
+
+
+
+
+
The following is an example of a Windup Application Report.
+
+
+
+
+
+
+
Archive Analysis Sections
+
+
Each archive summary begins with a total of the story points assigned to its migration, followed by a table detailing the changes required for each file in the archive. The report contains the following columns.
+
+
+
+
Name
+
+
The name of the file being analyzed
+
+
Technology
+
+
The type of file being analyzed. For example:
+
+
+
+
Java Source
+
+
+
Decompiled Java File
+
+
+
Manifest
+
+
+
Properties
+
+
+
EJB XML
+
+
+
Spring XML
+
+
+
Web XML
+
+
+
Hibernate Cfg
+
+
+
Hibernate Mapping
+
+
+
+
+
Issues
+
+
Warnings about areas of code that need review or changes.
+
+
Estimated Story Points
+
+
Level of effort required for migrating the file.
+
+
+
+
+
The following is an example of the archive analysis summary section of a Windup Report. In this example, it’s the analysis of the WINDUP_SOURCE/test-files/jee-example-app-1.0.0.ear/jee-example-services.jar.
+
+
+
+
+
+
+
File Analysis Pages
+
+
The analysis of the jee-example-services.jar lists the files in the JAR and the warnings and story points assigned to each one. Notice the com.acme.anvil.listener.AnvilWebLifecycleListener file has 5 warnings and is assigned 7 story points. Click on the file to see the detail.
+
+
+
+
+
The Information section provides a summary of the story points and notes that the file was decompiled by Windup.
+
+
+
This is followed by the file source code listing. Warnings appear in the file at the point where migration is required.
+
+
+
+
+
In this example, warnings appear at the import of weblogic.application.ApplicationLifecycleEvent and report that the class is proprietary to WebLogic and must be removed.
+
+
+
+
+
+
Later in the code, warnings appear for the creation of the InitialContext and for the object name when registering and unregistering an MBeans
+
+
+
+
+
+
+
+
Additional Reports
+
+
Explore the Windup OUTPUT_REPORT_DIRECTORY/reports folder to find additional reporting information.
+
+
+
Rule Provider Execution Report
+
+
The OUTPUT_REPORT_DIRECTORY/reports/windup_ruleproviders.html page provides the list of rule providers that executed when running the Windup migration command against the application.
+
+
+
+
+
+
+
Rule Provider Execution Report
+
+
The OUTPUT_REPORT_DIRECTORY/reports/windup_ruleproviders.html page provides the list of rule providers that executed when running the Windup migration command against the application.
+
+
+
+
Individual File Analysis Reports
+
+
You can directly access the the file analysis report pages described above by browsing for them by name in the OUTPUT_REPORT_DIRECTORY/reports/ directory. Because the same common file names can exist in multiple archives, for example "manifest.mf" or "web.xml", Windup adds a unique numeric suffix to each report file name.
All project source code contributed to Windup should be formatted using the settings defined in the Eclipse_Code_Format_Profile.xml file located in the root directory of the Windup project.
+
+
+
Eclipse IDE
+
+
+
+
In Eclipse, choose Windows → Preferences.
+
+
+
Expand Java → Code Style → Formatter
+
+
+
Click Import
+
+
+
Browse to the Eclipse_Code_Format_Profile.xml located in the root of the Windup project directory, then click 'OK'.
If you are fixing a JIRA, it is a good practice to use the number in the
+branch name. For example:
+
+
+
+
git checkout -b WINDUP-225 upstream/master
+
+
+
+
+
Make changes or updates to the source files. Be sure to test the changes thoroughly!
+
+
+
When you are sure your updates are ready and working, use the git add command to add new or changed file contents to the
+staging area.
+
+
+
git add <folder-name>/
+git add <file-name>
+
+
+
+
+
Use the git status command to view the status of the files in the
+directory and in the staging area and ensure that all modified files are
+properly staged:
+
+
+
git status
+
+
+
+
+
Commit your changes to your local topic branch. For example:
+
+
+
git commit -m 'WINDUP-225: Description of change...'
+
+
+
+
+
Push your local topic branch to your GitHub forked repository. This
+will create a branch on your GitHub fork repository with the same name as
+your local topic branch name.
+
+
+
git push origin HEAD
+
+
+
+
Note: The above command assumes your remote repository is named
+'origin'. You can verify your forked remote repository name using the
+command `git remote -v`.
+
+
+
+
Browse to the newly created branch on your forked GitHub repository.
Give the pull request a clear title and description.
+
+
+
Review the modifications that are to be submitted in the pull to be sure it contains
+only the changes you expect.
+
+
+
+
+
+
The pull request will be reviewed and merged by a Windup project administrator.
+
+
+
+
+
+
+
+
Understand the Windup Architecture and Structure
+
+
+
Windup Architectural Components
+
+
The following open source software, tools, and APIs are used within
+Windup to analyze and provide migration information. If you plan to
+contribute source code to the core Windup 2.0 project, you should be
+familiar with them.
+
+
+
Forge
+
+
Forge is an open source, extendable, rapid application development tool
+for creating Java EE applications using Maven. For more information
+about Forge 2, see: JBoss Forge.
+
+
+
+
Forge Furnace
+
+
Forge Furnace is a modular runtime container behind Forge that provides
+the ability to run Forge add-ons in an embedded application. For more
+information about Forge Furnace, see:
+Run Forge Embedded.
+
+
+
+
TinkerPop
+
+
TinkerPop is an open source graph computing framework. For more
+information, see: TinkerPop.
Frames represents graph data in the form of interrelated Java Objects or
+a collection of annotated Java Interfaces. For more information, see:
+TinkerPop Frames.
+
+
+
Windup includes several Frames extensions, which are documented here:
+Frames Extensions.
+
+
+
+
Gremlin
+
+
Gremlin is a graph traversal language that allows you to query, analyze,
+and manipulate property graphs that implement the Blueprints property
+graph data model. For more information, see:
+TinkerPop Gremlin Wiki.
+
+
+
+
Blueprints
+
+
Blueprints is an industry standard API used to access graph databases.
+For more information about Blueprints, see:
+TinkerPop Blueprints Wiki.
+
+
+
+
Pipes
+
+
Pipes is a dataflow framework used to process graph data. It for the
+transformation of data from input to output. For more information, see:
+Tinkerpop Pipes Wiki.
+
+
+
+
Rexster
+
+
Rexster is a graph server that exposes any Blueprints graph through HTTP/REST and a binary protocol called RexPro. Rexster makes extensive use of Blueprints, Pipes, and Gremlin. For more information, see:
+TinkerPop Rexster Wiki.
+
+
+
+
OCPsoft Rewrite
+
+
OCPsoft Rewrite is an open source routing and URL rewriting solution for
+Servlets, Java Web Frameworks, and Java EE. For more information about
+Ocpsoft Rewrite, see: OCPsoft Rewrite.
+
+
+
+
+
Windup Project Structure
+
+
The Windup 2.0 project consists of the following subprojects.
+
+
+
+
config/
+
+
This project is for the engine that runs the rules and abstracts the graph operations.
+
+
decompiler/
+
+
This subproject contains an API that wraps calls to the decompiler.
+Windup currently uses only one decompiler: Procyon
+
+
exec/
+
+
This subproject contains the bootstrap code to run the Windup application.
+
+
ext/
+
+
This subproject is for code extensions. It currently only contains the
+Groovy rules syntax. Eventually it will contain any code that is not
+related to the rules or the core code base.
+
+
graph/
+
+
This subproject contains the datastore and Frames extensions.
+
+
logging/
+
+
This is the logging subproject. This subproject may be removed, depending on the outcome of this JIRA: WINDUP-49.
+
+
reporting/
+
+
This subproject contains code that does reporting.
+
+
rules/
+
+
This subproject contains all the rules.
+
+
test-files/
+
+
This subproject contains the demo applications that are used for test input.
+
+
tests/
+
+
This subproject contains the integration test suite.
+
+
tinkerpop/
+
+
This subproject contains a code fix for Titan NPE issues.
+
+
ui/
+
+
This subproject contains experimental Forge UI code.
+
+
utils/
+
+
This subproject contains all utility code.
+
+
+
+
+
+
+
+
Rules and Rulesets
+
+
+
Windup Processing Overview
+
+
Windup is a rule-based migration tool that allows you to write customized rules to analyze the APIs, technologies, and architectures used by the applications you plan to migrate. The Windup tool also executes its own core rules through all phases of the migration process.
+
+
+
The following is a high level conceptual overview of what happens within Windup when you execute the tool against your application or archive.
+
+
+
Discovery Phase
+
+
Wnen you run the windup-migrate-app command, Windup executes its own core rules to extract files from archives, decompile classes, and analyze the application. In this phase Windup builds a data model 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.
+
+
+
For more information about the phases of rule execution and how to control rule dependencies, see Rule Execution Lifecycle.
The next step in the process is the execution of the migration rules. In this phase, the rules typically do not execute against the application input files. Instead, they execute against the graph database model. Windup rules are independent and decoupled and they communicate with each other using the graph database model. Rules query the graph database to obtain information needed to test the rule condition. They also update the data model with information based on the result of the rule execution. This allows rules to easily interact with other rules and enables the creation of very complex rules.
+
+
+
The Windup distribution contains a large number of migration rules, but in some cases, you may need to create additional custom rules for your specific implementation. Windup’s architecture allows you to create Java-based rule addons or XML rules and add easily add them to Windup. Custom rule creation is covered in the Windup Rules Development Guide.
+
+
+
+
Generate Findings Based on the Rule Execution Results
+
+
The final step in the process is to pull data from the graph database model to generate of reports and optionally generate scripts. Again, Windup uses rules to generate the final output.
+
+
+
By default, Windup generates the following reports at the end of the application migration process. The reports are located in the reports/ subdirectory of the output report path specified when you execute Windup:
+
+
+
+
+
Application Report: This report provides a summary of the total estimated effort, or story points, that are required for the migration. It also provides a detailed list of issues and suggested changes, broken down by archive or folder.
+
+
+
RuleProvider report: This is a detailed listing of the rule providers that fired when running Windup and whether any errors occurred.
+
+
+
Additional reports are generated that provide detailed line-by-line migration tips for individual files.
+
+
+
+
+
Windup can also generate scripts to automate migration processes based on the findings. For example, some configuration files are easily mapped and can be automatically generated as part of the migration process.
+
+
+
+
+
Rule Execution Lifecycle
+
+
Rule Lifecycle
+
+
Windup executes each rule in a sequential order. The following
+sections describe the phases of rule execution and how rules may specify
+that one or more other rules must be executed before or after they are
+run.
+
+
+
For a graphical overview of rule processing, see
+this
+diagram.
By default, a rule runs during the MIGRATION_RULES phase. However, a
+rule may require certain processing or actions to occur before it
+executes, such as the extraction of archives and scanning of java or XML
+files.
+
+
+
Rule phases provide a way for rule authors to specify and control in
+which phase of the rule lifecycle the rule should execute. This is done
+by overriding the WindupRuleProvider.getPhase() method. The following
+example specifies this rule should execute during the INITIAL_ANALYSIS rule phase.
The following is the list of rule phases as defined in the RulePhase
+enum class. Note that there are also PRE_ processing and POST_
+processing phases for each of the following rule phases.
This phase is called during resource discovery. Static files are scanned
+by their basic properties, for example, the name, extension, location,
+and fully qualified Java class name. Archives are unzipped in this
+phase. Typically, any rule that only puts data into the graph is
+executed during this phase.
This phase is called to perform a basic analysis of the files content.
+It extracts all method names from class files, extracts metadata, such
+as the XML namespace and root element, from XML files.
This phase is called to perform high-level composition operations on the
+graph. For example, it may link items found in XML files to the related
+Java classes or references to server resources in Java classes.
This phase is the default phase for all rules unless overridden.
+During this phase, migration rules attach data to the graph associated
+with migration. This could include: - Hints to migrators for manual
+migration - Automated migration of schemas or source segments -
+Blacklists to indicate vendor specific APIs.
A rule may specify that one or more rules must be executed before it is
+run. In this case, all named rules will be fired in the order specified
+before executing the the current rule.
A rule may also specify that one or more rules must be executed after it
+is run. In this case, all named rules will be fired in the order
+specified after executing the the current rule.
Story points are an abstract metric commonly used in Scrum Agile software development methodology to estimate the level of effort needed to implement a feature or change. They are based on a modified Fibonacci sequence.
+
+
+
In a similar manner, Windup uses story points to express the level of effort needed to migrate particular application constructs, and in a sum, the application as a whole. It does not necessarily translate to man-hours, but the value should be consistent across tasks.
+
+
+
+
How Story Points are Estimated in Rules
+
+
Estimating story points for a rule can be tricky. The following are the general guidelines Windup uses when estimating the level of effort required for a rule.
+
+
+
+
+
+
+
+
+
+
Level of Effort
+
Story Points
+
Description
+
+
+
+
+
Lift and Shift
+
0
+
The code or file is standards-based and requires no effort.
+
+
+
Mapped
+
1- 2 per file
+
There is a standard mapping algorithm to port the code or file. The number of story points required is small, but is dependent on the number of files to port.
+
+
+
Custom
+
5 - 20 per change or component
+
+
The number of story points required to modify and rewrite code depends on the complexity of the change, the number of unknown imports, the size of the files, and the number of components. The following are examples of how to estimate story points.
+
+
+
+
+
Port MyBatis to JPA: '20' story points per query.
+
+
+
Port a web page from one web framework to another depends on the complexity and the number of components involved in the migration. You could estimate '20' story points per component.
+
+
+
+
+
+
+
+
+
+
Difference Between XML-based and Java-based Rules
+
+
First of all, to prevent confusion:
+
+
+
+
Rules can be written using XML or the Java API. We call them XML-based and Java-based Rules.
+
+
+
Independent of the syntax, the rules may inspect (classify) XML or Java code.
+
+
+
+
+
See the examples below.
+
+
+
+
Which one to choose?
+
+
The XML rules provide a quick, simple way to create rules to analyze Java and XML files. Java rules provide the ability to create very complex rules.
+
+
+
+
+
If you simply need to highlight a specific section of Java code or XML file content and provide hints for it, it is recommended that you create the rule using XML.
+
+
+
If you need to create a new custom report, you need to create the reporting rules using Java.
+
+
+
If you need to extend functionality beyond what the XML rules provide, you need to create the rule using Java.
+
+
+
+
+
+
Pros and cons - XML
+
+
Pros:
+
+
+
+
+
XML rules are fairly easy to write and require less code.
+
+
+
You do not need to configure Maven to build from source because there is no need for compilation of
+XML rules.
+
+
+
Deployment is simple. You simply drop the XML rule into the appropriate path and Windup automatically scans the new rule.
+
+
+
+
+
Cons:
+
+
+
+
+
XML rules only support a simple subset of conditions and operations.
+
+
+
XML rules do not provide for direct custom graph data manipulation.
+
+
+
XML rules do not support the ability to create custom reports.
+
+
+
+
+
+
Pros and Cons - Java
+
+
Pros:
+
+
+
+
+
Java rule add-ons allow you to write custom rules and provide a lot of flexibility.
+
+
+
You can set breakpoints and test Java rule add-ons using a debugger.
+
+
+
IDEs provide code completion for the Windup API.
+
+
+
+
+
Cons:
+
+
+
+
+
You must configure Maven to compile the Windup Java rule add-ons.
+
+
+
Java rule add-ons that are not included in the Windup core code base must be a full Forge add-on.
+
+
+
Java rule add-ons require writing a lot of Java code/
+
+
+
Writing Java rule add-ons are complex and required knowledge of Windup internals.
+
+
+
+
+
+
Examples
+
+
Example of a rule written in XML classifying Java code:
Ability to create complex conditions and operations?
+
No
+
Yes
+
+
+
Ability to directly manipulate the graph data?
+
No
+
Yes
+
+
+
+
+
+
+
+
+
Create and Test Java Rule Add-ons
+
+
+
Install and Configure Maven
+
+
If you plan to contribute to the core code base or create Java-based rule add-ons, you must first install and configure Maven to build Windup from source.
+
+
+
Download and Install Maven
+
+
If you plan to use Eclipse Luna (4.4) to build Windup, you can skip this
+step and go directly to the section entitled Configure Maven to Build Windup. This version of Eclipse embeds Maven 3.2.1 so you do not need to
+install it separately.
+
+
+
If you plan to run Maven using the command line or plan to use Red Hat
+JBoss Developer Studio 7.1.1 or an older version of Eclipse, you must
+install Maven 3.1.1. or later.
See the Maven documentation for information on how to download and
+install Apache Maven for your operating system.
+
+
+
+
+
+
Configure the Maven Installation in Your IDE
+
+
JBoss Developer Studio 7.1.1 is built upon Eclipse Kepler (4.3), which
+embeds Maven 3.0.4. If you plan to use JBoss Developer Studio 7.1.1 or
+an Eclipse version earier than Eclipse Luna (4.4), you must replace the
+embedded 3.0.4 version of Maven with this newer version.
+
+
+
+
+
From the menu, choose Window -→ Preferences.
+
+
+
Expand Maven and click on Installations.
+
+
+
Uncheck Embedded (3.0.4/1.4.0.20130531-2315)
+
+
+
Click Add and navigate to your Maven install directory. Select it
+and click OK.
+
+
+
Make sure the new external Maven installation is checked and click
+OK to return to JBoss Developer Studio.
+
+
+
+
+
Note: If you use another IDE, refer to the product documentation to
+update the Maven installation.
+
+
+
+
Configure Maven to Build Windup
+
+
Windup uses artifacts located in the
+JBoss Nexus
+repository. You must configure Maven to use this repository before you
+build Windup.
+
+
+
+
+
Open your ${user.home}/.m2/settings.xml file for editing.
+
+
+
Copy the following jboss-nexus-repository profile XML prior to the
+ending </profiles> element.
TO_DO: Add a how-to for compound rules, nested rules, rules over multiple sources, negative queries (not matched by anything).
+
+
+
Windup Rule Provider
+
+
Windup rules are based on OCPsoft Rewrite, an open source routing and URL rewriting solution for Servlets, Java Web Frameworks, and Java EE. The rewrite framework allows you to create rule providers and rules in an easy to read format.
If the rule should run in a phase other than the default MIGRATION_PHASE, you must implement the getPhase() method and specify in which Windup lifecycle phase the rule should be executed. For more information about rule phases, see Rule Execution Lifecycle.
+
+
+
Rules are added using the getConfiguration(GraphContext context) method. This method is inherited from the OCPsoft Rewrite interface org.ocpsoft.rewrite.config.ConfigurationProvider. Rules are discussed in more detail later.
+
+
+
If other rules must execute after or before the rules in this provider, you must provide the list of WindupRuleProvider classes using the getExecuteAfter() or getExecuteAfter() methods.
+
+
+
+
+
The following is an example of a simple Java-based rule add-on.
+
+
+
+
public class ExampleRuleProvider extends WindupRuleProvider
+{
+ @Override public RulePhase getPhase(){
+ return RulePhase.DISCOVERY;
+ }
+
+ // @formatter:off
+ @Override
+ public Configuration getConfiguration(GraphContext context)
+ {
+ return ConfigurationBuilder.begin()
+ .addRule()
+ .when(
+ // Some implementation of GraphCondition.
+ Query.find(...)....
+ )
+ .perform(
+ ...
+ );
+ }
+ // @formatter:on
+ // (@formatter:off/on prevents Eclipse from formatting the rules.)
+}
+
+
+
+
+
Add Rule Code Structure
+
+
Like most rule-based frameworks, Windup rules consist of the following:
+
+
+
+
+
Condition: This is the when(condition) that determines if the rule should execute.
+
+
+
Operation: This defines what to perform() if the condition is met.
+
+
+
+
+
Rules consist of the when part, the perform, the otherwise part,
+and some others, all of which are optional.
+
+
+
when()
+
+
+
.when(Query.fromType(XmlMetaFacetModel.class))
+
+
+
+
In the .when() part, the rule typically queries the graph, using the
+Query API. Results of the query are put on variables stack
+(Variables), many times indirectly through the querying API.
+
+
+
Other way to fill a when part is subclassing the GraphCondition.
+Actually, Query also implements it, and is only a convenient way to
+create a condition.
+You can also use multiple conditions within one when() call using and().
+Example:
Last noticable but important feature is the ability to use
+Gremlin queries. See
+Gremlin docs for reference manual.
+
+
+
+
perform()
+
+
+
.perform(
+ new AbstractIterationOperation<XmlMetaFacetModel>(XmlMetaFacetModel.class, "xml")
+ {
+ public void perform(GraphRewrite event, EvaluationContext context, XmlMetaFacetModel model)
+ {
+ // for each model, do something
+ }
+ }
+)
+
+
+
+
In the .perform() part, the rule typically iterates over the items of interest
+(Java files, XML files, querying services, …), processes them, and
+writes the findings into the graph.
+
+
+
For that, various operations are available. These are subclasses of
+GraphOperation. You can also implement your own. See
+Rules Operations for more information. Again, there are
+several convenient implementations for constructs like iteration
+(Iteration).
An iteration is also an operation, so everywhere an operation is expected, you can freely put the Iteration. If the Iteration is put inside the perform method of another Iteration, we speak about nested iterations.
+An example of such nested iteration may be:
Windup rules inherit the rule constructs from OCP Rewrite. For example,
+.otherwise() Gives you a chance to perform something in case the
+conditions in .when() return false (e.g. they do not match anything).
+For more information, see OCP Rewrite web.
+
+
+
+
.otherwise(
+ new AbstractIterationOperation<XmlMetaFacetModel>(XmlMetaFacetModel.class, "xml")
+ {
+ public void perform(GraphRewrite event, EvaluationContext context, XmlMetaFacetModel model)
+ {
+ // for each model, do something altenate
+ }
+ }
+)
+
+
+
+
+
+
Where
+
+
The where clause is used to provide information about used parameters within the rule. So for example if you have used a parameter in some condition like for example JavaClass.references("{myMatch}"), you may use the where clause to specify what the myMatch is like .where("myMatch").matches("java.lang.String.toString\(.*\)").
+
+Please note that within the where clause the regex is used in contrast to JavaClass.references() where a windup specific syntax is expected.
+
+
+
+
Metadata
+
+
Rules can specify metadata. Currently, the only appearing in some rules,
+and not actually used, is RuleMetadata.CATEGORY.
+
+
+
+
.withMetadata(RuleMetadata.CATEGORY, "Basic")
+
+
+
+
.withMetadata() is basically putting key/value to a
+Map<Object, Object>.
+
+
+
+
+
Available utilities
+
+
For a list of what key services and constructs can be used in the rule,
+see Available Rules Utilities.
+
+
+
Variable stack
+
+
The communication between the conditions and operations is done using the variable stack that is filled with the output of the condition/s and then given to the Iteration to be processed.
+Within conditions, you can specify the name of the result iterable that is saved in the stack using as() method, the iteration can specify the iterable to iterate over using the over() method and even specify the name of for each processed single model of the result being processed.
+Example:
The varstack may be accesed even from the second condition in order to narrow the result of the previous one. After that the iteration may choose which result it wants to iterate over (it is even possible to have multiple iterations listed in the perform, each of which may access different result saved in the variable stack).
Create a new Maven Java Project. These instructions will refer to the project folder location with the replaceable variable 'RULE_PROJECT_HOME'. Modify the project pom.xml file as follows
Add a <dependencies> section to include Windup, rulesets, and test dependencies required by your rule add-on. Windup is a Forge/Furnace based application and has a modular design, so the dependencies will vary depending on the Windup APIs used by the rule. For more information on Windup dependencies, see Windup Dependencies.
+
+
The following are examples of some dependencies you may need for your rule add-on.
Add beans.xml file to META-INF/ dir in resources - typically, $project-dir/src/main/resources/META-INF/beans.xml. This file can be empty. It tells CDI to scan your add-on for CDI beans.
+
+
+
Within your Maven project, create a Java class that extends the WindupRuleProvider class. It is suggested that you end the name of the class with RuleProvider. For example:
+
+
+
public class MyCustomRuleProvider extends WindupRuleProvider
+{
+}
+
+
+
+
+
If the rule provider must run in a phase other than the default MIGRATION_RULES phase, override the phase using the getPhase() method. For example, you may want the rule provider to perform a task during the initial DISCOVERY phase, for example, to ignore files with a specific name or extension.
Finally, add the rule or rules to the rule provider.
+
+
+
+
High-level Conditions and Operations
+
+
The following is a specific high-level rule which uses high-level conditions (JavaClass) and operations (Classification). See the documentation of those conditions and operations for the details.
For more examples of rule providers, see the
+BaseConfig.java
+rule.
+
+
+
+
Low-level Conditions and Operations
+
+
As you can see, the conditions and operations above are Java-specific.
+They come with the Java Basic ruleset. The list of existing rulesets
+will be part of the project documentation. Each ruleset will be
+accompanied with a documentation for its `Condition`s and `Operation`s
+(and also `Model`s).
+
+
+
These high-level elements provided by rulesets may cover majority of
+cases, but not all. Then, you will need to dive into the mid-level
+Windup building elements.
+
+
+
+
Mid-level Conditions and Operations
+
+
+
+
+
+
+
+
+
+
Install the Java-based Rule Add-on
+
+
The easiest and fastest way to build the rule add-on, install it into the local Maven repository, and install it into Windup as a rule add-on is to use the Windup addon-build-and-install command.
+
+
+
+
+
If you have not started Windup, follow the instructions to Execute Windup.
+
+
+
At the Windup console prompt, enter the addon-build-and-install command:
You must name the file containing an XML rule with the .windup.xml extension. Windup identifies files with this extension as XML-base rules, so be sure to use this naming convention, otherwise the rule will not be evaluated!
+
+
+
+
Basic XML Rule Template
+
+
XML rules consist of conditions and actions and follow the familiar "if/then/else" construct:
<?xml version="1.0"?>
+<ruleset xmlns="http://windup.jboss.org/v1/xml" id="XmlFileMappings">
+ <phase>
+ <!-- The phase in which to run the rules -->
+ </phase>
+ <rules>
+ <rule>
+ <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>
+
+
+
+
+
Create the Rule When Condition
+
+
The syntax is dependent on whether you are creating a rule to evaluate Java class, an XML file, a project, or file content and is described in more detail here: XML Rule - When Condition Syntax
+
+
+
+
Create the Rule Perform Action
+
+
Operations allowed 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. The syntax is described in detail here: XML Rule - Perform Action Syntax.
+
+
+
+
+
XML Rule - When Condition Syntax
+
+
Conditions allowed in the when portion of a rule must extend GraphOperaton 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.
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 a javaclass.
The package or class name to match on. Wildcard characters can be used.
+
+
+
Example: references="org.apache.commons.{*}"
+
+
+
+
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 attribute below.
+
+
+
Example: as="MyEjbRule"
+
+
+
+
in="PATH_FILTER"
+
+
Used to filter input files matching this regex (regular expression) naming pattern. Wildcard characters can be used.
+
+
+
Example: in="{*}File1"
+
+
+
+
from="VARIABLE_NAME"
+
+
Begin the search query with the filtered result from a previous search identified by its as VARIABLE_NAME.
+
+
+
Example: from="MyEjbRule"
+
+
+
+
+
+
+
+
JavaClass Element Child Elements
+
+
+
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.
+
+
+
Example: <location>IMPORT</location>
+
+
+
+
+
+
+
+
+
+
xmlfile Syntax
+
+
Summary
+
+
Use the xmlfile element to find information in XML files. For a better understanding of the xmlfile condition, see the XmlFile JavaDoc.
+
+
+
The following is an example of a rule that tests for an xmlfile.
Use the project element to query for the project charateristics. 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 a rule is dependent on the junit in the version between 2.0.0.Final and 2.2.0.Final.
+
+
+
+
<rule>
+ <when>
+ <project>
+ <artifact groupId="junit" artifactId="junit" from="2.0.0.Final" to="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
+
+
project Element Attributes
+
+
The project element is used to match against the project as a whole. You can use this condition to query for dependencies of the project. It does not have any attributes itself.
+
+
+
+
project Element Child Elements
+
+
+
artifact
+
+
Subcondition used within project to query against project dependencies. This element contains the following attributes:
+
+
+
+
groupId="PROJECT_GROUP_ID"
+
+
Match on the project <groupId> of the dependency
+
+
+
+
artifactId="PROJECT_ARTIFACT_ID"
+Match on the project <artifactId> of the dependency
+
+
+
fromVersion="FROM_VERSION"
+
+
Specify the lower version bound of the artifact. For example 2.0.0.Final
+
+
+
+
toVersion="TO_VERSION"
+
+
Specify the upper version bound of the artifact. For example 2.2.0.Final
+
+
+
+
+
+
+
+
+
+
+
+
filecontent Syntax
+
+
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.
+
+
+
+
+
XML Rule - Perform Action Syntax
+
+
Operations allowed 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.
The classification element is used to identify or classify application resources. It provides a level of effort and 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.
The link element is used in classifications or hints to identify or classify 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.
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.
Identify or classify links to informational content. See the section on link Syntax for details.
+
+
Example:
+
+
+
+
link href="http://java-x.blogspot.com/2009/03/invoking-web-services-through-proxy.html" description="JAX-WS Proxy Password Example"/>
+
+
+
+
+
+
+
+
+
+
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.
The lineitem element is used to provide line item information about a hint 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.
+
+
+
Example:
+
+
+
+
<rule>
+ <when>
+ <javaclass references="weblogic.servlet.annotation.WLServlet" as="default">
+ <location>ANNOTATION</location>
+ </javaclass>
+ </when>
+ <perform>
+ <hint message="Replace the proprietary WebLogic @WLServlet annotation with the Java EE 6 standard @WebServlet annotation." effort="1">
+ <link href="https://access.redhat.com/articles/1249423" description="Migrate WebLogic Proprietary Servlet Annotations" />
+ <lineitem message="Proprietary WebLogic @WLServlet annotation found in file."/>
+ </hint>
+ </perform>
+</rule>
+
+
+
+
+
Construct a lineitem Element
+
+
lineitem Element: Attributes
+
+
+
message="MESSAGE"
+
+
A lineitem message
+
+
Example:
+
+
+
+
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 preforms an iteration.
iteration child elements include a when condition, along with the actions iteration, classification, hint, xslt, lineitem, and otherwise.
+
+
+
+
+
+
+
Test an XML Rule in Windup
+
+
Add the Rule to Windup
+
+
A Windup rule is installed simply by copying the rule to the appropriate Windup folder. Windup scans for rules in the following locations for files ending with .windup.groovy and .windup.xml:
+
+
+
+
+
The directory specified in the --userRulesDirectory option to the windup-migrate-app.
+
+
+
The WINDUP_HOME/rules/ directory.
+
+
WINDUP_HOME is the directory where you run the Windup executable (see here).
+
+
+
+
The ${user.home}/.windup/rules/ directory.
+
+
The ${user.home}/.windup is a directory created by Windup at first run and contains rules, add-ons, and the Windup log.
+
+
+
+
For Linux or Mac: ~/.windup/rules/
+For Windows: "\Documents and Settings\USER_NAME\.windup\rules\" -or- "\Users\USER_NAME\.windup\rules\"
+
+
+
+
+
+
+
+
Test the XML Rule
+
+
+
+
If you have not started Windup, follow the instructions to Execute Windup.
+
+
+
Test the XML rule against your application file by running the windup-migrate-app command in the Windup console prompt.
This covers the specific situations when the Windup core developer needs to look up certain runtime classes. Does not relate to rules authoring.
+
+
+
Forge add-ons transitive dependencies
+
+
Let A depend on B depend on C.
+Depending on scope of C in B’s POM:
+
+
+
+
<scope>provided</scope>
+
+
+
+
provided will NOT export C, so A depending on B won’t see C’s classes.
+Only compile scope is exported.
+compile will export C, so A depending on B will also see C’s classes.
+
+
+
+
+
provided == import
+
+
+
compile == import & export
+
+
+
optional == optional, not installed automatically
+
+
+
runtime == export only
+
+
+
+
+
+
Finding classes
+
+
+
AddonRegistry.getServices(MyServiceInterface.class)
+
+// To get the AddonRegistry, use Windup's FurnaceHolder:
+FurnaceHolder.getFurnace().getAddonRegistry().getServices(MyServiceInterface.class);
If you want something from the current add-on, you can simply @Inject the type you wish to use. Alternately you can @Inject an Imported<T> instance, or also @Inject the AddonRegistry itself.
+
+
+
+
Which ClassLoader is used? Always the one of the current code?
+
+
Depends, if you are in a Furnace Service, then yes, it will use the current code’s add-on ClassLoader.
+
+
+
+
Reading annotations from classes
+
+
Since classes can be proxied by Forge/Furnace, it’s safer to read annotations using Annotations API:
Every furnace service is wrapped in a proxy. If it came from another
+add-on (not your current add-on) and was not instantiated with new Blah(),
+you are in a furnace service. So if it was @Inject`ed or retrieved via
+`addonRegistry.getServices(…)
+
+
+
+
(16:32:40) jsightler: ozizka: I do like a Resource.open(...) type API -- that sounds like a good idea.
+(16:32:57) LincolnBaxter: ozizka: unless you use the TCCL (which you shouldn't in a modular environment), then using the class's own classloader is the best solution for that situation
+(16:33:41) LincolnBaxter: ozizka: using a shared Resource.open() APi will actually be sort of a no-op, and just introduce another layer, since you generally need to be able to specify a classloader anyway
+(16:33:53) jsightler: lincolnthree: Well...
+(16:34:09) LincolnBaxter: ozizka: unless I'm misunderstanding the point of this
+(16:34:10) jsightler: lincolnthree: In windup we frequently need resources from the caller's add-on
+(16:34:18) LincolnBaxter: ozizka: ah wait
+(16:34:27) LincolnBaxter: ozizka: the *caller*'s classloader
+(16:34:35) LincolnBaxter: ozizka: not the CL of the current operation
+(16:34:44) LincolnBaxter: ozizka: that's different. hmm
+(16:35:11) ozizka-FN: Right
+(16:35:18) ozizka-FN: Actually that's what I wanted to ask -
+(16:35:21) jsightler: We deal with this in an ad-hoc way at the moment... it might be nice to have a centralized service that does it.
+(16:35:25) ozizka-FN: which classloader is used?
+(16:35:33) ozizka-FN: Always the one of the current code?
+(16:35:44) ozizka-FN: Implicitly
+(16:35:54) LincolnBaxter: ozizka: depends, if you are in a Furnace Service, then yes, it will use the current code's add-on's classloader
+(16:36:00) ozizka-FN: Ah
+(16:36:11) ozizka-FN: How do I know if I am in a Furnace service?
+(16:36:14) LincolnBaxter: ozizka: because every furnace service is wrapped in a proxy
+(16:36:31) LincolnBaxter: ozizka: basically if it came from another add-on (not your current add-on), you are in a furnace service
+(16:36:43) LincolnBaxter: ozizka: and if you didn't instantiate with new Blah()
+(16:37:00) LincolnBaxter: ozizka: so if it was @Injected or retrieved via addonRegistry.getServices(...)
+(16:37:43) LincolnBaxter: jsightler: ozizka: mbriskar: why do we need the classloader of the calling add-on? just curious
+(16:37:54) ozizka-FN: So here we would use TCCL right?
+LincolnBaxter lincolnthree
+(16:38:28) ozizka-FN: lincolnthree: To load it's resources
+(16:38:31) ozizka-FN: from other add-on
+(16:38:32) ozizka-FN: .
+(16:38:35) ozizka-FN: Or is there other way?
+(16:38:42) LincolnBaxter: ozizka: that's a vague statement ;)
+(16:38:48) LincolnBaxter: ozizka: where is *here*?
+(16:38:56) LincolnBaxter: ozizka: the best way is to pass the actual classloader you want to use
+(16:39:01) ozizka-FN: For this use case. For the Resource.open()
+LincolnBaxter lincolnthree
+(16:39:21) ozizka-FN: lincolnthree, right, but well, putting classloading code into rules...
+(16:39:25) ozizka-FN: Not user friendly
+
+
+
+
+
Resources loading
+
+
+
(16:48:30) ozizka-FN: lincolnthree: Just a note - the potential collisions caused by add-on's CL span is not considered as a risk?
+(16:49:25) ozizka-FN: I mean, it could load the file from it's deps.
+(16:49:36) ozizka-FN: * file = resource
+(16:49:50) LincolnBaxter: ozizka1: so the way it works is actually very controlled
+(16:50:06) LincolnBaxter: ozizka1: classloader will always attempt to load its own resources before loading from another add-on
+(16:50:23) LincolnBaxter: ozizka1: at which point the order is determined by the order of the add-on dependency in the POM
+
+(16:53:26) ozizka-FN: Q: Unwrapping proxies caused the code in invoke() not actually being called?
+(16:53:32) ozizka-FN: Since the method calls were not intercepted?
+(16:54:09) LincolnBaxter: ozizka1: exactly :)
+
+(16:54:10) ozizka-FN: lincolnthree, Is that impl a real TCCL or just TCCL-like concept?
+(16:54:29) LincolnBaxter: ozizka1: what do you mean "real" ?
+(16:54:51) ozizka-FN: Not sure about how TCCL is implemented, I thought you'd need to call something like
+(16:54:52) ozizka-FN: Thread.currentThread().setContextClassLoader(classLoader);
+(16:54:56) LincolnBaxter: ozizka1: also if you are interested in where the resource loading / ordering is controlled —> https://github.com/forge/furnace/blob/master/container/src/main/java/org/jboss/forge/furnace/impl/modules/AddonModuleLoader.java#L194
+(16:55:01) jsightler: lincolnthree: I wondered that too :)
+(16:55:30) LincolnBaxter: ozizka1: jsightler, actually it does: https://github.com/forge/furnace/blob/master/proxy/src/main/java/org/jboss/forge/furnace/proxy/ClassLoaderInterceptor.java#L103
+(16:55:55) LincolnBaxter: ozizka1: jsightler: https://github.com/forge/furnace/blob/master/container-api/src/main/java/org/jboss/forge/furnace/util/ClassLoaders.java#L27
+
+(16:56:57) ozizka-FN: Hm, ok so I guess if we dug deeper, it would eventually come to Thread.currentThread().setContextClassLoader(classLoader); ?
+(16:57:15) LincolnBaxter: ozizka1: yep: https://github.com/forge/furnace/blob/master/container-api/src/main/java/org/jboss/forge/furnace/util/SecurityActions.java#L71
Then put some debug breakpoint in the specific phase of graph you are interested in and browse http://localhost:8182/ to enjoy the graph! Username and password: rexster
+
+
+
+
Run Rexster within Windup
+
+
Make sure the Rexster add-on is deployed in Furnace and is accessible on http://localhost:8182/.
+
+
+
+
username: rexster
+password: rexster
+
+
+
+
+
+
Decompiling
+
+
The Decompiler API
+
+
DRAFT
+
+
+
The 3 main use cases for the decompiler API are to process:
+
+
+
+
Directories
+
+
+
JARS or Archives
+
+
+
Class files
+
+
+
+
+
+
The DecompilerConfig should also contain Filter<String> (or maybe Filter<TypeReference>) to decide whether to decompile the class or not.
+
+
+
windup.ProcyonConfiguration should extend abstract windup.DecompilerConfig<T>, which would contain the configurables common to all decompilers. In case of Procyon, outputDir would be delegated to procyon.DecompilerSettings.
The following is the typical structure of Maven add-on modules.
+
+
+
+
my-add-on-parent
++--- my-add-on - jar, classifier: forge-addon
++--- my-add-on-api - jar
++--- my-add-on-impl - jar
++--- my-add-on-tests - jar
+
+
+
+
The add-on POM file can declare dependencies on other forge-addons.
+To prevent exporting the add-on to dependent modules, use <optional>true</optional>.
The add-on POM files may also declare a dependency on typical Maven artifacts.
+To prevent exporting the add-on to dependent modules, use <optional>true</optional>.
One more question regarding dependencies. Is it advisable to depend on the`forge-addon`
+artifact from add-on’s subparts?
+
+
+
Add-ons should reference the <classifier>forge-addon</classifier>
+artifact from other add-ons.
+
+
+
+
Add-on sub-parts
+
+
Add-on sub-parts declare dependency preferably on forge add-on APIs, not
+on the add-ons themselves, wherever possible (wherever an add-on has an
+explicit API). These dependencies must be marked as provided scope.
They may instead depend on the primary add-on dependency, e.g.
+forge-addon. The latter makes the POM files simpler, but can be confusing,
+because the add-on dependency still needs to be declared in the depending
+add-on’s POM.
Declaring a forge-addon depencendy anywhere else than the
+forge-addon pom doesn’t actually cause Furnace to establish an add-on
+dependency. I.e. classes from the dep won’t be available unless you
+declare it in the `forge-addon’s pom.
+
+
+
Add-on’s sub-parts may also declare dependencies on other normal maven
+dependencies, and these are treated as normal.
+
+
+
+
+
+
Note
+
+
+
+
Add-on depends on API , scope compile > Add-on
+depends on Impl , scope compile with <optional>true</optional> -
+prevents exporting this dependency to consumers of the add-on.
+
+
+
+
+
+
+
+
Test dependencies
+
+
For test dependencies on add-ons: Any add-on/sub-part requiring an add-on
+for testing purposes should use <scope>test</scope>.
Dependencies between sub-parts within the same add-on
+
+
Subpart may declare dependency on other subpart. E.g. impl typically
+depends on api. In that case, the scope should be set appropriately
+for the given situation - typically provided or compile scope.
Ondra Zizka wrote the following script to bring down a series of pull requests into a
+single branch. It then pushes that branch to upstream master-ignore.
+
+
+
+
+
Bring down the pulls into a single branch.
+
+
+
pull() {
+ cmd="git fetch upstream master "
+ for PR in "$@"
+ do
+ cmd="$cmd pull/$PR/head:pullRequest$PR"
+ done
+
+ $cmd
+
+ git branch -D pulls
+ git checkout master
+ git rebase upstream/master
+ git checkout -b pulls
+
+ for PR in "$@"
+ do
+ git checkout pullRequest$PR
+ git rebase pulls
+ git checkout pulls
+ git merge pullRequest$PR
+ git branch -D pullRequest$PR
+ done
+}
(Lower Level API, to cover cases not provided by high level API)
+
+
+
This topic describes how to to programmatically access or update graph data when you create a Java-based rule add-on.
+
+
+
Query the graph
+
+
There are several ways - including Query API, Gremlin support, or
+GraphService methods.
+
+
+
Query the Graph Within the .when() method
+
+
Building a rule contains the method when(), which is used to create a
+condition. Vertices that fulfill the condition, are passed to the
+perform() method.
+
+
+
For the queries in the when() method, class Query is used. There are
+several methods which you can use to specify the condition. For example:
+* find() specifies the Model type of the vertex * as() method
+specifies the name of the final list, that is passed to the perform()
+method * from(String name) starts the query not on the all vertices,
+but only on the vertices already stored in the the given name (used to
+begin query on the result of the other one) * withProperty() specify
+the property value of the given vertex
GraphService<> can also be used to query the graph for models of the specified type:
+
+
+
+
FooModel foo = new GraphService<>(graphContext, FooModel.class).getUnique();
+
+
+
+
+
FooModel foo = new GraphService<>(graphContext, FooModel.class).getUniqueByProperty("size", 1);
+
+
+
+
+
+
Concepts & Philosophy
+
+
TO_DO: - OZIZKA: Can this topic be marked obsolete and be replaced by this one: Windup Processing Overview ?_
+
+
+
Windup is a rule-based tool that allows users to write customized rules
+based on the needs, constructs, and custom APIs used in their
+applications.
+
+
+
Individual rules should be decoupled, only expressing what rules should precede and follow, and "communicate" through the graph. Each rule will query
+the graph database, use the results for locating the candidates of it’s
+interests, process them, and then write the results to the graph
+database.
+
+
+
Graph database and Models (Frames)
+
+
As a graph db implementation, we use TinkerPop
+backed by Titan backed by
+BerkeleyDB. For explanation of graph database concepts, see
+Titan.
+
+
+
Like there’s ORM (like JPA) for JDBC, TinkerPop’s BluePrints has
+Frames. This allows you to
+access the graph data in form of your custom Java models (implemented as
+Java Proxies to the querying).
+
+
+
We use this concept heavily. Each ruleset will likely have it’s own
+models. (But you can opt to use Blueprints API if you like).
Examples of breaking non-trivial workflows into rules
+
+
+
+
Finding all @Entity`s which use `org.hibernate extensions.
+
+
TO_DO
+
+
+
+
Finding MyBatis DAOs and classes using them.
+
+
TO_DO
+
+
+
+
+
+
+
+
Creating Rule Operations
+
+
An operation is a task which can be invoked from within a rule.
+
+
+
It is created by extending GraphOperation.
+
+
+
+
public class FooOperation extends GraphOperation
+{
+ @Override
+ public void perform(GraphRewrite event, EvaluationContext context)
+ {
+ ...
+ }
+}
+
+
+
+
Existing operations:
+
+
+
+
+
+
+
Rulesets
+
+
DRAFT
+
+
+
Example page for design decisions. Could be generated automatically in the future.
+
+
+
What is a Ruleset?
+
+
A ruleset is a Windup "plug-in" targetting a specific area of migration (e.g. Spring to Java EE 6 migration). Underhood, it is a set of rules, and everything they might need: Operations and Conditions, Report templates (if needed), and static files (e.g. images, XML or CSV files, etc.).
+A ruleset may also declare metadata, like ruleset ID, dependencies on other rulesets, etc.
+
+
+
xref:Ruleset-Java-Basic-Ruleset
+Forge add-on (i.e. a .jar file).
+
+
+
Groovy-based ruleset is a directory with .windup.groovy script(s) and its static files, possibly in a .zip file.
+
+
+
See ? to read about how to create your own Ruleset.
+
+
+
+
Basic tags
+
+
+
+
app - denotes the rules which help migrating applications.
+
+
+
server - denotes the rules which help migrating server configuration.
+
+
+
java - denotes the rules treating Java source code.
+
+
+
java-ee - denotes the rules treating Java EE applications or Java EE
+containers.
+
+
+
+
+
Besides that, you may use any custom tag.
+
+
+
+
Rulesets
+
+
Core rulesets
+
+
Rulesets distributed with Windup and maintained by the Windup team.
This is an example page. Content serves for design decision.
+
+
+
Purpose of this ruleset.
+
+
+
Metadata
+
+
ID: myRuleset
+Graph prefix: myRuleset
+
+
+
+
Rule providers
+
+
A definition list (dl/dt/dd) of RuleProviders of given Ruleset.
+
+
+
+
+
JDKconfigRuleProvider - Targetted towards the classes distributed with JDK, like java.lang., java.security., org.xml.*, etc.
+
+
+
FooRuleProvider - blah
+
+
+
BarRuleProvider - blah
+
+
+
Maven Project analysis
+
+
+
Seam 2.0 to CDI
+
+
+
+
+
+
Models
+
+
+
+
JavaClassModel
+
+
+
AmbiguousJavaClassModel
+
+
+
AmbiguousReferenceModel<REFERENCETYPE>
+
+
+
ClassificationModel
+
+
+
EjbBeanBaseModel
+
+
+
EjbEntityBeanModel
+
+
+
EjbMessageDrivenModel
+
+
+
EjbSessionBeanModel
+
+
+
HibernateConfigurationFileModel
+
+
+
HibernateEntityModel
+
+
+
HibernateMappingFileModel
+
+
+
HibernateSessionFactoryModel
+
+
+
InlineHintModel
+
+
+
JarArchiveModel
+
+
+
JarManifestModel
+
+
+
JavaClassFileModel
+
+
+
JavaClassModel
+
+
+
JavaMethodModel
+
+
+
JavaParameterModel
+
+
+
JavaSourceFileModel
+
+
+
JavaTypeReferenceModel
+
+
+
LinkModel
+
+
+
MavenProjectModel
+
+
+
PackageModel
+
+
+
ProjectDependencyModel
+
+
+
ProjectModel
+
+
+
PropertiesModel
+
+
+
SourceFileModel
+
+
+
SpringBeanModel
+
+
+
SpringConfigurationFileModel
+
+
+
WarArchiveModel
+
+
+
WebXmlModel
+
+
+
+
+
+
Configuration
+
+
+
+
--packages - Which packages to scan.
+
+
+
+
+
+
Reports
+
+
+
+
+
Ruleset Java Classifications and Inline Hints
+
+
DRAFT
+
Some of the most important rules are classifications and inline hints.
+
+
+
Classifications
+
+
Classifications are important because they tell developers very quickly
+what the resource is, so that they can quickly identify resources of
+importance. For example, say you are responsible for migrating an
+application from Weblogic to JBoss… wouldn’t it be nice to know that
+project is a Spring project? Wouldn’t it be nice to have the Weblogic
+descriptors identified and called out to us? This is what classifiers
+do. They identify resources, and add a classification to the resource.
+
+
+
Classifications are displayed both at the 10,000 foot view, main report
+and also at the resource report level.
+
+
+
+
+
Java Classifications TO_DO: link
+
+
+
XML Classifications TO_DO: link
+
+
+
+
+
+
Inline Hints
+
+
Windup takes the approach of profiling resources and providing
+syntactically highlighted resource reports. The resource report will
+show the resource with potentially highlighted lines that may contain
+inline hints to help the developers migrate a piece of code.
+
+
+
Adding inline hints for Java and XML are as simple as adding Regular
+Expressions or XPath Expressions to the Windup rules.
+
+
+
+
+
Ruleset Java EE Apps
+
+
DRAFT
+
TBD?
+
+
+
DRAFT
+
TBD ?
+
+
+
+
Ruleset Reporting
+
+
DRAFT
+
TBD?
+
+
+
+
XML Ruleset
+
+
DRAFT
+
+
+
XPathMatch
+
+
+
XsltTransformation
+
+
+
+
+
A core ruleset to provide support for XML files.
+
+
+
Metadata
+
+
ID: xml
+Graph prefix: xml
+
+
+
+
Rule providers
+
+
A definition list (dl/dt/dd) of RuleProviders of given Ruleset with brief descriptions.
+
+
+
TO_DO: Not sure if all the Xml* really belong here - maybe rather to Java or Java EE?
+
+
+
+
+
DiscoverXmlFilesRuleProvider -
+
+
+
XmlBaseConfig -
+
+
+
XmlGlassfishConfig -
+
+
+
XmlJbossConfig -
+
+
+
XmlJbossEsbConfig -
+
+
+
XmlJonasConfig -
+
+
+
XmlJppConfig -
+
+
+
XmlJrunConfig -
+
+
+
XmlKnowHowConfig -
+
+
+
XmlOrionConfig -
+
+
+
XmlPersistanceConfig -
+
+
+
XmlResinConfig -
+
+
+
XmlSoa5Config -
+
+
+
XmlSonicEsbConfig -
+
+
+
XmlSpringConfig -
+
+
+
XmlWeblogicConfig -
+
+
+
XmlWebserviceConfig -
+
+
+
XmlWebsphereConfig -
+
+
+
+
+
+
Models
+
+
_Subclasses of WindupVertexFrame.
+
+
+
+
+
DoctypeMetaModel
+
+
+
XmlFileModel
+
+
+
XmlTypeReferenceModel
+
+
+
XsltTransformationModel
+
+
+
+
+
+
Configuration
+
+
_Subclasses of TO_DO
+
+
+
+
Reports
+
+
Report files or report parts created by this ruleset.
+
+
+
+
+
Windup Models
+
+
Windup models are the classes extending WindupVertexFrame.
+They are used to model the data in the graph database to Java objects.
+
+
+
This is an overview of the most important models.
+The complete and up-to-date list of models is in Javadoc.
For other metadata, either use .withMetadata() or override enhanceMetadata().
+To provide categorization for filtering, use CATEGORY.
+
+
+
For its metadata, Windup uses the keys defined in RuleMetadata:
+
+
+
+
+
CATEGORY (String): Define which category the rule belongs to, which can be then used to filter the rules to execute (plus all those they depend on). Not implemented yet.
+
+
+
ORIGIN (String): The rule origin. Typically a class name.
+
+
+
AUTO_COMMIT (boolean): Whether to call database commit() after the rule executes.
+
+
+
TREAT_EXCEPTIONS_AS_FATAL (boolean): Whether all Exceptions from this Rule are to be treated as fatal. The default is non-fatal.
+
+
+
RULE_PROVIDER: The WindupRuleProvider that originated the rule. This is used internally, not to be specified by rule author.
+
+
+
+
+
You can find out more information about rule metadata here: RuleMetadata Javadoc.
+
+
+
+
How to define rule metadata
+
+
The RuleMetadata is defined using the .withMetadata(Object key, Object value).
In case you want to apply the same metadata to all rules in some RuleProvider, override it’s enhanceMetadata() method. The default implementations sets CATEGORY to "Uncategorized", ORIGIN to it’s class’es name, and RULE_PROVIDER to the RuleProvider object:
For the rules definition, Windup uses the OCPsoft Rewrite library. Whenever there is something Windup specific which can’t be pulled to the upstream implementation, Windup resorts to putting data into a metadata map.
+
+
+
This map is typically not used by rule authors, unless they use a custom Windup extension (don’t confuse that with custom Ruleset).
+
+
+
+
+
Ruleset metadata
+
+
Ruleset metadata cover the whole Ruleset, not individual rules.
+For ruleset metadata, unlike rules, Windup uses a type-safe interface WindupRulesetMetadata
+(see javadoc).
+
+
+
Currently, it only defines Ruleset ID.
+
+
+
+
+
Rules Operations
+
+
A list of high-level operations across rulesets.
+
+
+
+
+
JavaClass
+
+
+
Classification
+
+
+
+
Hint
+
+
+
Link
+
+
+
+
+
+
+
+
TBD.
+
+
+
For the implementation of the operation, see
+here.
+
+
+
TBD
+
+
+
Rules Ops Reporting Hint
+
+
+
DRAFT
+
TBD
+
+
+
+
Ops Reporting TypeReference
+
+
TBD
+
+
+
Different for Java and XML.
+Contains Line, Column
+
+
+
DRAFT: TBD?
+
+
+
+
+
+
Debugging and Troubleshooting
+
+
+
Debugging and Profiling
+
+
Debug the Windup Distribution Runtime
+
+
You can debug the Windup distribution using one of the following approaches.
+
+
+
+
+
Pass the --debug argument on the command line when you execute Windup.
Run forge. For details, see Profiling
+Forge, but skip the first 2 points that direct you to copy the YourKit module and JAR into the Forge installation. Forge 2 already contains the YourKit module and JAR>.
+
+
+
Run windup-analyze-app.
+
+
+
forge -e windup-migrate-app
+
+
+
+
+
+
+
+
+
Troubleshoot Windup Issues
+
+
Logging
+
+
Logging is currently broken and will not be fixed any time soon.
Exceptions in Surefire reports are broken due to the way Forge wraps
+exceptions and the way Surefire handles them. You need to
+debug or rewrap exceptions using TestUtil.rewrap(ex).
Configuring dependencies in a Forge-based project can be a little tricky.
+See Dependencies for some hints.
+
+
+
+
Caused by: java.lang.IllegalArgumentException: Type value for model 'org.jboss.windup.rules.files.model.FileReferenceModel' is already registered with model org.jboss.windup.rules.files.model.FileReferenceModel
+
+
+
+
This means that the model class is loaded twice. I.e. the module containing it is loaded twice. Or, in tests, you may be (accidentally) adding the class to the deployment.
+This may especially happen after Maven coordinates of some module are changed.
+
+
+
+
+
+
+
Wiki Information
+
+
+
About the Windup Wiki
+
+
Purpose
+
+
This wiki is a place to create Windup documentation in a collaborative manner, a bit wildly, and on the fly. It is intended to reflect the state of the Windup source code master branch, however pages may become obsolete as the master changes quickly.
+
+
+
+
Areas of Interest
+
+
The Wiki pages are divided into the following main areas of interest, which may often overlap. The page names use these prefixes:
+
+
+
+
+
Dev-: …: These pages are of interest to Windup core developers.
+
+
+
Rules- …: These pages are of interest to rules developers.
+
+
+
User- …: These pages that are of interest to Windup users.
+
+
+
no prefix: These pages that are also of interest to Windup users.
+
+
+
+
+
+
Markdown, AsciiDoc, or…?
+
+
This Wiki uses AsciiDoc because it is capable of handling the publishing requirements and structural elements needed to create technical books. If you would like to contribute to the documentation, feel free to use your favorite Wiki language, however, it will ultimately be converted to AsciiDoc.
+
+
+
+
Contributor Guidelines
+
+
Please see the Contributing Guidelines for details about how to name pages and use the correct AsciiDoc syntax to make the transition to the final documentation go more smoothly.
+
+
+
The following is a brief overview.
+
+
+
+
+
Name wiki pages using only letters, numbers and dashes. Do not include spaces, colons, or other special characters in page names.
+
+
+
Be sure to add a level 3 page heading (===) at the top of each page. When compiled in a book, the Guide name is the top level, chapters are level 2, and the page is level 3. This is the title that appears in the table of contents for the page.
+
+
+
=== Build Windup from Source
+
+
+
+
+
At the beginning of each new Wiki page, add an anchor with the exact page name, including the dashes. This generates the correct anchors that are needed when the pages are combined into a book.
+
+
+
[[Page-Name]]
+=== Page Name
+
+
+
+
+
Wiki generates anchors using dashes for spaces. AsciiDoctor generates a leading underscore and underscores for spaces.When referring to another section within the same page, do not use the [section-title-anchor] syntax. Instead, create an anchor and use the 'xref:' syntax to provide the link. Replace spaces in the section title with dashes.
+
+
+
+
Create the anchor at the top of the section using double brackets to force the generation of dashes instead of underscores.
+
+
+
[[section-header]]
+==== Section Header
+
+
+
+
+
Then use the xref to create the link.
+
+
+
See xref:section-header[Section Header] for more information.
Copy the image into the windup.wiki/images directory
+
+
+
cp IMAGE_NAME.png images/
+
+
+
+
+
Add the new image to Git
+
+
+
git add images/IMAGE_NAME.png
+
+
+
+
+
Commit the change
+
+
+
git commit -m "Add new image"
+
+
+
+
+
Push the change to your Windup Wiki repository.
+
+
+
git push origin HEAD:master
+
+
+
+
+
Test the new image in a page on your own Wiki. Don’t forget to add the :imagesdir: images directive to the beginning of the page to point to the images directory.
+
+
+
image:IMAGE_NAME.png[New Image]
+
+
+
+
For example:
+
+
+
==== My Image
+
+
+
+
+
+
+
+
+
+
+
If it works, push the image to the upstream repository
+
+
+
git push upstream HEAD:master
+
+
+
+
+
+
+
+
+
+
Windup Product Release and Documentation Process
+
+
+
Windup Release Process
+
+
Windup consists of artifacts from multiple GitHub repositories. Use the following procedure to create a Windup release.
See the CONTRIBUTING guide for AsciiDoc syntax rules regarding headers and links to make this process easier.
+
+
+
+
Update the Windup Documentation with the Latest Wiki Changes
+
+
Summary
+
+
The Windup guides are located in the windup-documentation/docs directory. They are named the same as the guides in the Wiki but have a 'Windup-' prefix. The windup-documentation/docs guides should kept synchronized with the versions in the windup.wiki.
+
+
+
+
+
+
+
+
+
Wiki Guide
+
Windup Docs Guide
+
+
+
+
+
User-Guide.asciidoc
+
Windup-User-Guide.adoc
+
+
+
Rules-Development-Guide.asciidoc
+
Windup-Rules-Development-Guide.adoc
+
+
+
Core-Development-Guide.asciidoc
+
Windup-Core-Development-Guide.adoc
+
+
+
Migration-Planning-Guide
+
Windup-Migration-Planning-Guide.adoc
+
+
+
+
+
Documentation Update Scripts
+
+
The https://github.com/windup/windup-documentation/tree/master/scripts/windupDocUpdate.sh script copies the pages from the Windup wiki to the windup-documentation repository, makes minor modifications, and generates each guide in a single HTML page book format. The resulting guides are created in the WINDUP_DOCUMENTATION_HOME/html/ directory.
+
+
+
The script performs the following steps.
+
+
+
+
+
Copies the Windup wiki pages to the WINDUP_DOCUMENTATION_HOME/docs/ directory, renaming them with the .adoc extension.
+
+
+
Makes sure each guide includes all pages that are referenced by pages within it. Scripts are provided to search for links within each individual guide. They navigate to the WINDUP_DOCUMENTATION_HOME/docs/ directory and search using the following command:
+
+
+
grep 'xref:[A-Z]' `find . -name '*.adoc'`.
+
+
+
+
+
Replaces each xref: to external pages with an xref: using the following command.
+
+
+
find . -name '*.adoc' -print | xargs sed -i 's/xref:/xref:/g'
+
+
+
+
+
Navigates to the WINDUP_DOCUMENTATION_HOME/ directory and builds the books. The single page HTML files are created in the WINDUP_DOCUMENTATION_HOME/html/ directory.
+
+
+
+
+
+
+
+
Windup Guide
+
Command
+
+
+
+
+
Windup User Guide
+
asciidoctor -t -dbook -a toc -o html/WindupUserGuide.html docs/Windup-User-Guide.adoc
+
+
+
Windup Rules Development Guide
+
asciidoctor -t -dbook -a toc -o html/WindupRulesDevelopmentGuide.html docs/Windup-Rules-Development-Guide.adoc
+
+
+
Windup Core Development Guide
+
asciidoctor -t -dbook -a toc -o html/WindupCoreDevelopmentGuide.html docs/Windup-Core-Development-Guide.adoc
+
+
+
+
+
+
+
+
+
+
+
Publish the HTML Docs for Access at GitHub IO
+
+
The https://github.com/windup/windup-documentation/tree/master/scripts/windupPublish.sh script copies the pages from the Windup wiki to the windup-documentation repository, makes minor modifications, and generates each guide in a single HTML page book format. The resulting guides are created in the WINDUP_DOCUMENTATION_HOME/html/ directory.
+
+
+
The script performs the following steps.
+
+
+
+
+
The first time, you must fork and clone the windup GitHub repository. After that, just fetch the latest upstream.
The Windup 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. The quickstarts are available on GitHub here: https://github.com/windup/windup-quickstarts
+
+
+
You can fork and clone the project to have access to regular updates or you can download a ZIP file of the latest version.
This creates and populates a windup-quickstarts directory on your local file system. Navigate to the newly created directory, for example
+
+
+
cd windup-quickstarts/
+
+
+
+
+
If you want to be able to retrieve the lates code updates, add the remote upstream repository so you can fetch any changes to the original forked repository.
To get the latest files from the upstream repository.
+
+
+
git reset --hard upstream/master
+
+
+
+
+
+
+
+
+
Get Involved
+
+
How can you help?
+
+
To help us make Windup cover most application constructs and server configurations, including yours, you can help with any of the following items. Some items require only a few minutes of your time!
+
+
+
+
+
Let us know what Windup migration rules should cover.
+
+
+
Provide example applications to test migration rules.
+
+
+
Identify application components and problem areas that may be difficult to migrate.
+
+
+
+
Write a short description of these problem migration areas.
+
+
+
Write a brief overview describing how to solve the problem migration areas.
If you have not yet logged in, click the Log In link at the top right side of the page.
+
+
+
Enter your credentials and click the LOGIN button.
+
+
+
You are then redirected back to the Create Issue page.
+
+
+
+
+
+
Choose the following options and click the Next button.
+
+
+
+
Project: Windup
+
+
+
Issue Type: Bug
+
+
+
+
+
+
On the next screen complete the following fields:
+
+
+
+
Summary: Enter a brief description of the problem or issue.
+
+
+
Environment: Provide the details of your operating system, version of Java, and any other pertinent information.
+
+
+
Description: Provide a detailed description of the issue. Be sure to include logs and exceptions traces.
+
+
+
+
+
+
Click the Create button to create the JIRA issue.
+
+
+
If the application or archive causing the issue does not contain sensitive information and you are comfortable sharing it with the Windup development team, attach it to the issue by choosing More → Attach Files. You are provided with an option to restrict visibility to JBoss employees.
+
+
+
+
+
+
+
+
+
Appendix
+
+
+
Glossary of Terms Used in Windup
+
+
Rules Terms
+
+
+
Rule
+
+
A piece of code that performs a single unit of work during the migration process. Depending on the complexity of the rule, it may or may not include configuration data. Extensive configuration information may be externalized into external configuration, for example, a custom XML file. The following is an example of a Java-based rule added to the JDKConfig RuleProvider class.
+
+
+
+
+
+
.addRule()
+ .when(JavaClass.references("java.lang.ClassLoader$").at(TypeReferenceLocation.TYPE))
+ .perform(Classification.as("Java Classloader, must be migrated.")
+ .with(Link.to("Red Hat Customer Portal: How to get resources via the ClassLoader in a JavaEE application in JBoss EAP", "https://access.redhat.com/knowledge/solutions/239033"))
+ .withEffort(1))
+
+
+
+
+
RuleProvider
+
+
A class that implements one or more rules using the .addRule() method. The following are examples of legacy Java RulesProviders that are defined in rules-java-ee ruleset.
+
+
+
+
EjbConfig
+
+
+
JDKConfig
+
+
+
SeamToCDI
+
+
+
+
+
Ruleset
+
+
A ruleset is a group of one or more RuleProviders that targets a specific area of migration, for example, Spring → Java EE 6 or WebLogic → JBoss EAP. A ruleset is packaged as a JAR and contains additional information needed for the migration, such as operations, conditions, report templates, static files, metadata, and relationships to other rulesets. The following Windup projects are rulesets.
+
+
+
+
rules-java-ee
+
+
+
rules-xml
+
+
+
+
+
Rules Metadata
+
+
Information about whether a particular ruleset applies to a given situation. The metadata can include the source and target platform and frameworks.
+
+
Rules Pipeline
+
+
A collection of rules that feed information into the knowledge graph.
+
+
+
+
+
+
Reporting Terms
+
+
+
Lift and Shift (Level of effort)
+
+
The code or file is standards-based and can be ported to the new environment with no changes.
+
+
Mapped (Level of effort)
+
+
There is a standard mapping algorithm to port the code or file to the new environment.
+
+
Custom (Level of effort)
+
+
The code or file must be rewritten or modified to work in the new environment.
+
+
Story Point
+
+
A term commonly used in Scrum Agile software development methodology to estimate the level of effort needed to implement a feature or change. It does not necessarily translate to man-hours, but the value should be consistent across tasks.
+
+
+
\ No newline at end of file
diff --git a/html/WindupCoreDevelopmentGuide.html b/html/WindupCoreDevelopmentGuide.html
index fe905118d6..8aaeceb9aa 100644
--- a/html/WindupCoreDevelopmentGuide.html
+++ b/html/WindupCoreDevelopmentGuide.html
@@ -415,122 +415,122 @@
This guide is for developers who plan to contribute source code updates
or core rule add-ons to the Windup 2.0 project.
-
+
-
What is Windup?
+
1.1. What is Windup?
JBoss Windup is a rule-based tool to simplify application migrations.
@@ -560,13 +560,13 @@
What is Windup?
migrating from other containers to JBoss EAP a piece of cake.
-
Windup 2.0 vs. Windup 0.7.x
+
1.1.1. Windup 2.0 vs. Windup 0.7.x
Windup 2.0 aims to deliver the same functionality as legacy Windup, however, the internal architecture and rule structure is very different and allows for the creation of much more complex rules.
-
How Does Windup Simplify Migration?
+
1.1.2. How Does Windup Simplify Migration?
Windup looks for common resources and highlight technologies and known “trouble
spots” in migrating applications. The goal of Windup is to provide a
@@ -606,14 +606,14 @@
How Does Windup Simplify Migration?
-
Follow Windup on Twitter!
+
1.1.3. Follow Windup on Twitter!
Follow Windup on Twitter @JBossWindup for updates and more!
-
Features of Windup 2.0
+
1.2. Features of Windup 2.0
@@ -747,7 +747,7 @@
Features of Windup 2.0
-
About the WINDUP_HOME Variable
+
1.3. About the WINDUP_HOME Variable
This documentation uses the WINDUP_HOMEreplaceable value to denote the path to the Windup distribution. When you encounter this value in the documentation, be sure to replace it with the actual path to your Windup installation.
@@ -765,18 +765,18 @@
About the WINDUP_HOME Variable
-
Get Started
+
2. Get Started
Before you begin to contribute to Windup, take a quick tour to see how to use it.
-
Install and Configure Maven
+
2.1. Install and Configure Maven
If you plan to contribute to the core code base or create Java-based rule add-ons, you must first install and configure Maven to build Windup from source.
-
Download and Install Maven
+
2.1.1. Download and Install Maven
If you plan to use Eclipse Luna (4.4) to build Windup, you can skip this
step and go directly to the section entitled Configure Maven to Build Windup. This version of Eclipse embeds Maven 3.2.1 so you do not need to
@@ -802,7 +802,7 @@
Download and Install Maven
-
Configure the Maven Installation in Your IDE
+
2.1.2. Configure the Maven Installation in Your IDE
JBoss Developer Studio 7.1.1 is built upon Eclipse Kepler (4.3), which
embeds Maven 3.0.4. If you plan to use JBoss Developer Studio 7.1.1 or
@@ -836,7 +836,7 @@
Configure the Maven Insta
-
Configure Maven to Build Windup
+
2.1.3. Configure Maven to Build Windup
Windup uses artifacts located in the
JBoss Nexus
@@ -900,12 +900,12 @@
Configure Maven to Build Windup
-
Get the Windup Source Code
+
2.2. Get the Windup Source Code
To contribute to the Windup 2.0 project source code, you must fork the Windup repository to your own Git, clone your fork, commit your work on topic branches, and make pull requests back to the Windup repository.
This information is provided for new developers who plan to contribute code
to the Windup open source project. This section describes how to build Windup from source and how to extract the Windup distribution that is created during the build process.
The following is a list of the most commonly used command line arguments.
+
This command can take arbitrary options processed by different addons. The list of options in the core Windup distribution can be found in Javadoc. Most commonly used command line arguments are:
--input INPUT_ARCHIVE_OR_FOLDER
This is the fully qualified application archive or source path.
-
--source-mode true (optional)
-
-
This argument is optional and is only required if the application to be evaluated contains source files rather than compiled binaries. The default value is false.
-
--output OUTPUT_REPORT_DIRECTORY
The fully qualified path to the folder that will contain the the report information produced by Windup.
@@ -1362,6 +1358,10 @@
Run Windup
Specify this optional argument only if you are certain you want to force Windup to delete the existing OUTPUT_REPORT_DIRECTORY. The default value is false.
+
--userRulesDirectory
+
+
Points to a directory to load XML rules from. (Search pattern: *.windup.groovy and *.windup.xml)
This is a comma-delimited list of the packages to be evaluated by Windup.
@@ -1370,6 +1370,10 @@
Run Windup
This is a comma-delimited list of the packages to be excluded by Windup.
+
--source-mode true (optional)
+
+
This argument is optional and is only required if the application to be evaluated contains source files rather than compiled binaries. The default value is false.
+
@@ -1429,7 +1433,7 @@
Run Windup
-
Run Windup in Batch Mode
+
2.5.4. Run Windup in Batch Mode
Windup can be also executed in batch mode within a shell or batch script using the --evaluate argument as follows.
@@ -1451,7 +1455,7 @@
Run Windup in Batch Mode
-
Windup Help
+
2.5.5. Windup Help
To see the complete list of available arguments for the windup-migrate-app command, execute the following command in the Windup prompt:
@@ -1462,7 +1466,7 @@
Windup Help
-
Windup Command Examples
+
2.5.6. Windup Command Examples
The following Windup command examples report against applications located in the Windup source test-files directory.
@@ -1512,9 +1516,9 @@
Windup Quickstart Examples
-
Review the Report
+
2.6. Review the Report
-
About the Report
+
2.6.1. About the Report
When you execute Windup, the report is generated in the OUTPUT_REPORT_DIRECTORY you specify for the --output argument in the command line. This output directory contains the following files and subdirectories:
@@ -1547,7 +1551,7 @@
About the Report
-
Open the Report
+
2.6.2. Open the Report
Use your favorite browser to open the index.html file located in the output report directory. You should see something like the following:
@@ -1559,7 +1563,7 @@
Open the Report
-
Report Sections
+
2.6.3. Report Sections
Application Report Page
@@ -1675,7 +1679,7 @@
File Analysis Pages
-
Additional Reports
+
2.6.4. Additional Reports
Explore the Windup OUTPUT_REPORT_DIRECTORY/reports folder to find additional reporting information.
@@ -1708,10 +1712,10 @@
Individual File Analysis Reports
-
Developer Contributing Information
+
3. Developer Contributing Information
-
Development Guidelines and Conventions
+
3.1. Development Guidelines and Conventions
@@ -1726,7 +1730,7 @@
Development Guidelines and C
-
Project Source Code Formatting
+
3.1.1. Project Source Code Formatting
All project source code contributed to Windup should be formatted using the settings defined in the Eclipse_Code_Format_Profile.xml file located in the root directory of the Windup project.
4. Understand the Windup Architecture and Structure
-
Windup Architectural Components
+
4.1. Windup Architectural Components
The following open source software, tools, and APIs are used within
Windup to analyze and provide migration information. If you plan to
@@ -1943,7 +1947,7 @@
Windup Architectural Components
familiar with them.
-
Forge
+
4.1.1. Forge
Forge is an open source, extendable, rapid application development tool
for creating Java EE applications using Maven. For more information
@@ -1951,7 +1955,7 @@
Forge
-
Forge Furnace
+
4.1.2. Forge Furnace
Forge Furnace is a modular runtime container behind Forge that provides
the ability to run Forge add-ons in an embedded application. For more
@@ -1960,21 +1964,21 @@
Forge Furnace
-
TinkerPop
+
4.1.3. TinkerPop
TinkerPop is an open source graph computing framework. For more
information, see: TinkerPop.
Frames represents graph data in the form of interrelated Java Objects or
a collection of annotated Java Interfaces. For more information, see:
@@ -1986,7 +1990,7 @@
Frames
-
Gremlin
+
4.1.6. Gremlin
Gremlin is a graph traversal language that allows you to query, analyze,
and manipulate property graphs that implement the Blueprints property
@@ -1995,7 +1999,7 @@
Gremlin
-
Blueprints
+
4.1.7. Blueprints
Blueprints is an industry standard API used to access graph databases.
For more information about Blueprints, see:
@@ -2003,7 +2007,7 @@
Blueprints
-
Pipes
+
4.1.8. Pipes
Pipes is a dataflow framework used to process graph data. It for the
transformation of data from input to output. For more information, see:
@@ -2011,14 +2015,14 @@
Pipes
-
Rexster
+
4.1.9. Rexster
Rexster is a graph server that exposes any Blueprints graph through HTTP/REST and a binary protocol called RexPro. Rexster makes extensive use of Blueprints, Pipes, and Gremlin. For more information, see:
TinkerPop Rexster Wiki.
-
OCPsoft Rewrite
+
4.1.10. OCPsoft Rewrite
OCPsoft Rewrite is an open source routing and URL rewriting solution for
Servlets, Java Web Frameworks, and Java EE. For more information about
@@ -2027,7 +2031,7 @@
OCPsoft Rewrite
-
Windup Project Structure
+
4.2. Windup Project Structure
The Windup 2.0 project consists of the following subprojects.
@@ -2094,10 +2098,10 @@
Windup Project Structure
-
Rules and Rulesets
+
5. Rules and Rulesets
-
Windup Processing Overview
+
5.1. Windup Processing Overview
Windup is a rule-based migration tool that allows you to write customized rules to analyze the APIs, technologies, and architectures used by the applications you plan to migrate. The Windup tool also executes its own core rules through all phases of the migration process.
@@ -2105,7 +2109,7 @@
Windup Processing Overview
The following is a high level conceptual overview of what happens within Windup when you execute the tool against your application or archive.
-
Discovery Phase
+
5.1.1. Discovery Phase
Wnen you run the windup-migrate-app command, Windup executes its own core rules to extract files from archives, decompile classes, and analyze the application. In this phase Windup builds a data model 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.
@@ -2117,7 +2121,7 @@
Discovery Phase
-
Application Migration
+
5.1.2. Application Migration
The next step in the process is the execution of the migration rules. In this phase, the rules typically do not execute against the application input files. Instead, they execute against the graph database model. Windup rules are independent and decoupled and they communicate with each other using the graph database model. Rules query the graph database to obtain information needed to test the rule condition. They also update the data model with information based on the result of the rule execution. This allows rules to easily interact with other rules and enables the creation of very complex rules.
@@ -2126,7 +2130,7 @@
Application Migration
-
Generate Findings Based on the Rule Execution Results
+
5.1.3. Generate Findings Based on the Rule Execution Results
The final step in the process is to pull data from the graph database model to generate of reports and optionally generate scripts. Again, Windup uses rules to generate the final output.
@@ -2152,9 +2156,9 @@
Generate Finding
-
Rule Execution Lifecycle
+
5.2. Rule Execution Lifecycle
-
Rule Lifecycle
+
5.2.1. Rule Lifecycle
Windup executes each rule in a sequential order. The following
sections describe the phases of rule execution and how rules may specify
@@ -2168,7 +2172,7 @@
A rule may specify that one or more rules must be executed before it is
run. In this case, all named rules will be fired in the order specified
@@ -2300,9 +2304,9 @@
Execute Before and Execute After
-
Rule Story Points
+
5.3. Rule Story Points
-
What are Story Points?
+
5.3.1. What are Story Points?
Story points are an abstract metric commonly used in Scrum Agile software development methodology to estimate the level of effort needed to implement a feature or change. They are based on a modified Fibonacci sequence.
@@ -2311,7 +2315,7 @@
What are Story Points?
-
How Story Points are Estimated in Rules
+
5.3.2. How Story Points are Estimated in Rules
Estimating story points for a rule can be tricky. The following are the general guidelines Windup uses when estimating the level of effort required for a rule.
@@ -2361,9 +2365,9 @@
How Story Points are Estimated
-
Difference Between XML-based and Java-based Rules
+
5.4. Difference Between XML-based and Java-based Rules
-
First of all, to prevent confusion:
+
5.4.1. First of all, to prevent confusion:
@@ -2379,7 +2383,7 @@
First of all, to prevent confusion:<
-
Which one to choose?
+
5.4.2. Which one to choose?
The XML rules provide a quick, simple way to create rules to analyze Java and XML files. Java rules provide the ability to create very complex rules.
@@ -2398,7 +2402,7 @@
Which one to choose?
-
Pros and cons - XML
+
5.4.3. Pros and cons - XML
Pros:
@@ -2434,7 +2438,7 @@
Pros and cons - XML
-
Pros and Cons - Java
+
5.4.4. Pros and Cons - Java
Pros:
@@ -2472,7 +2476,7 @@
Pros and Cons - Java
-
Examples
+
5.4.5. Examples
Example of a rule written in XML classifying Java code:
@@ -2546,7 +2550,7 @@
Examples
-
Summary
+
5.4.6. Summary
The following is a draft… it may go.
@@ -2606,15 +2610,15 @@
Summary
-
Create and Test Java Rule Add-ons
+
6. Create and Test Java Rule Add-ons
-
Install and Configure Maven
+
6.1. Install and Configure Maven
If you plan to contribute to the core code base or create Java-based rule add-ons, you must first install and configure Maven to build Windup from source.
-
Download and Install Maven
+
6.1.1. Download and Install Maven
If you plan to use Eclipse Luna (4.4) to build Windup, you can skip this
step and go directly to the section entitled Configure Maven to Build Windup. This version of Eclipse embeds Maven 3.2.1 so you do not need to
@@ -2640,7 +2644,7 @@
Download and Install Maven
-
Configure the Maven Installation in Your IDE
+
6.1.2. Configure the Maven Installation in Your IDE
JBoss Developer Studio 7.1.1 is built upon Eclipse Kepler (4.3), which
embeds Maven 3.0.4. If you plan to use JBoss Developer Studio 7.1.1 or
@@ -2674,7 +2678,7 @@
Configure the Maven Ins
-
Configure Maven to Build Windup
+
6.1.3. Configure Maven to Build Windup
Windup uses artifacts located in the
JBoss Nexus
@@ -2738,12 +2742,12 @@
Configure Maven to Build Windup
-
Java-based Rule Structure
+
6.2. Java-based Rule Structure
TO_DO: Add a how-to for compound rules, nested rules, rules over multiple sources, negative queries (not matched by anything).
-
Windup Rule Provider
+
6.2.1. Windup Rule Provider
Windup rules are based on OCPsoft Rewrite, an open source routing and URL rewriting solution for Servlets, Java Web Frameworks, and Java EE. The rewrite framework allows you to create rule providers and rules in an easy to read format.
@@ -2795,7 +2799,7 @@
Windup Rule Provider
-
Add Rule Code Structure
+
6.2.2. Add Rule Code Structure
Like most rule-based frameworks, Windup rules consist of the following:
@@ -2828,7 +2832,14 @@
when()
Other way to fill a when part is subclassing the GraphCondition.
Actually, Query also implements it, and is only a convenient way to
-create a condition.
+create a condition.
+You can also use multiple conditions within one when() call using and().
+Example:
+
Last noticable but important feature is the ability to use
@@ -2859,7 +2870,7 @@
perform()
For that, various operations are available. These are subclasses of
GraphOperation. You can also implement your own. See
-Rules-Operations[Rules Operations] for more info. Again, there are
+Rules Operations for more information. Again, there are
several convenient implementations for constructs like iteration
(Iteration).
@@ -2888,7 +2899,22 @@
Iteration
Nested iterations
-
TO_DO: Provide information about nested iterations
+
An iteration is also an operation, so everywhere an operation is expected, you can freely put the Iteration. If the Iteration is put inside the perform method of another Iteration, we speak about nested iterations.
+An example of such nested iteration may be:
The where clause is used to provide information about used parameters within the rule. So for example if you have used a parameter in some condition like for example JavaClass.references("{myMatch}"), you may use the where clause to specify what the myMatch is like .where("myMatch").matches("java.lang.String.toString\(.*\)").
+
+Please note that within the where clause the regex is used in contrast to JavaClass.references() where a windup specific syntax is expected.
@@ -2938,44 +2975,80 @@
Metadata
-
Available utilities
+
6.2.3. Available utilities
For a list of what key services and constructs can be used in the rule,
see Available Rules Utilities.
+
+
Variable stack
+
+
The communication between the conditions and operations is done using the variable stack that is filled with the output of the condition/s and then given to the Iteration to be processed.
+Within conditions, you can specify the name of the result iterable that is saved in the stack using as() method, the iteration can specify the iterable to iterate over using the over() method and even specify the name of for each processed single model of the result being processed.
+Example:
TO_DO: Need some links to github to the respective example files.
+
The varstack may be accesed even from the second condition in order to narrow the result of the previous one. After that the iteration may choose which result it wants to iterate over (it is even possible to have multiple iterations listed in the perform, each of which may access different result saved in the variable stack).
You can create a rule using Java or XML. This topic describes how to create a rule add-on using Java.
-
Prerequisites
+
6.4.1. Prerequisites
@@ -3113,7 +3210,7 @@
Prerequisites
-
Create a Rule Add-on
+
6.4.2. Create a Rule Add-on
Create a Maven Project
@@ -3394,7 +3491,7 @@
Create the Java RuleProvider
-
Install the Java-based Rule Add-on
+
6.4.3. Install the Java-based Rule Add-on
The easiest and fastest way to build the rule add-on, install it into the local Maven repository, and install it into Windup as a rule add-on is to use the Windup addon-build-and-install command.
@@ -3423,7 +3520,7 @@
Install the Java-based Rule Add-on<
-
Test the Java-based Rule Add-on
+
6.4.4. Test the Java-based Rule Add-on
Test the Java-based rule add-on against your application file by running the windup-migrate-app command in the Windup console prompt.
@@ -3448,7 +3545,7 @@
Test the Java-based Rule Add-on
-
Review the Output Report
+
6.4.5. Review the Output Report
@@ -3520,15 +3617,15 @@
Review the Output Report
-
Create and Test XML Rules
+
7. Create and Test XML Rules
-
Create a Basic XML Rule
+
7.1. Create a Basic XML Rule
You can create a Windup rule using Java, XML, or Groovy. This topic describes how to create a rule using XML.
-
Prerequisites
+
7.1.1. Prerequisites
@@ -3554,13 +3651,13 @@
Prerequisites
-
File Naming Convention for XML Rules
+
7.1.2. File Naming Convention for XML Rules
You must name the file containing an XML rule with the .windup.xml extension. Windup identifies files with this extension as XML-base rules, so be sure to use this naming convention, otherwise the rule will not be evaluated!
-
Basic XML Rule Template
+
7.1.3. Basic XML Rule Template
XML rules consist of conditions and actions and follow the familiar "if/then/else" construct:
@@ -3600,20 +3697,20 @@
Basic XML Rule Template
-
Create the Rule When Condition
+
7.1.4. Create the Rule When Condition
The syntax is dependent on whether you are creating a rule to evaluate Java class, an XML file, a project, or file content and is described in more detail here: XML Rule - When Condition Syntax
-
Create the Rule Perform Action
+
7.1.5. Create the Rule Perform Action
Operations allowed 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. The syntax is described in detail here: XML Rule - Perform Action Syntax.
-
XML Rule - When Condition Syntax
+
7.2. XML Rule - When Condition Syntax
Conditions allowed in the when portion of a rule must extend GraphOperaton 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.
@@ -3640,7 +3737,7 @@
XML Rule - When Condition Syntax
-
javaclass Syntax
+
7.2.1. javaclass Syntax
Summary
@@ -3729,7 +3826,7 @@
JavaClass Element Child Elements
-
xmlfile Syntax
+
7.2.2. xmlfile Syntax
Summary
@@ -3839,27 +3936,25 @@
xmlfile Element: Child Elements
-
project Syntax
+
7.2.3. project Syntax
Summary
-
Use the project element to find information in project files. For a better understanding of the project condition, see the JavaDoc for the Project class.
+
Use the project element to query for the project charateristics. For a better understanding of the project condition, see the JavaDoc for the Project class.
-
The following is an example of a rule that tests for an xmlfile.
+
The following is an example of a rule that checks a rule is dependent on the junit in the version between 2.0.0.Final and 2.2.0.Final.
<rule>
<when>
<project>
- <artifact groupId="junit" artifactId="junit" from="MyEjbRule" to="???"/>
+ <artifact groupId="junit" artifactId="junit" from="2.0.0.Final" to="2.2.0.Final"/>
</project>
</when>
<perform>
- <hint title="Title for Hint for Project">
- <message>Descriptive message</message>
- </hint>
+ <lineitem message="The project uses junit with the version between 2.0.0.Final and 2.2.0.Final"/>
</perform>
</rule>
@@ -3870,7 +3965,7 @@
Construct a project Element
project Element Attributes
-
The project element does not have any attributes.
+
The project element is used to match against the project as a whole. You can use this condition to query for dependencies of the project. It does not have any attributes itself.
@@ -3879,27 +3974,30 @@
project Element Child Elements
artifact
-
The namespace to referenced in XML files. This element contains the following attributes:
+
Subcondition used within project to query against project dependencies. This element contains the following attributes:
groupId="PROJECT_GROUP_ID"
-
Match on the project <groupId>
+
Match on the project <groupId> of the dependency
artifactId="PROJECT_ARTIFACT_ID"
-Match on the project <artifactId>
+Match on the project <artifactId> of the dependency
-
from="VARIABLE_NAME"
+
fromVersion="FROM_VERSION"
-
Begin the search query with the filtered result from a previous search identified by its as VARIABLE_NAME.
+
Specify the lower version bound of the artifact. For example 2.0.0.Final
-
to = TO_DO: complete the project artifact 'to' element syntax
+
toVersion="TO_VERSION"
+
+
Specify the upper version bound of the artifact. For example 2.2.0.Final
+
@@ -3910,20 +4008,14 @@
project Element Child Elements
-
filecontent Syntax
-
-
TO_DO: complete the filecontent element syntax
-
-
-
Use the filecontent element to find information in file content.For a better understanding of the filecontent condition, see the JavaDoc for the FileContent class.
-
+
7.2.4. filecontent Syntax
-
Use the filecontent element to test for content within files. The following is an example of a rule that tests for filecontent.
+
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.
-
XML Rule - Perform Action Syntax
+
7.3. XML Rule - Perform Action Syntax
Operations allowed 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.
@@ -3956,7 +4048,7 @@
XML Rule - Perform Action Syntax
-
classification Syntax
+
7.3.1. classification Syntax
Summary
@@ -4042,7 +4134,7 @@
classification Element Child Ele
-
link Syntax
+
7.3.2. link Syntax
Summary
@@ -4110,7 +4202,7 @@
link Element: Attributes
-
hint Syntax
+
7.3.3. hint Syntax
Summary
@@ -4196,7 +4288,7 @@
hint Element: Child Elements
-
xslt Syntax
+
7.3.4. xslt Syntax
Summary
@@ -4303,7 +4395,7 @@
xslt Element: Child Elements
-
lineitem Syntax
+
7.3.5. lineitem Syntax
Summary
@@ -4357,7 +4449,7 @@
lineitem Element: Attributes
-
iteration Syntax
+
7.3.6. iteration Syntax
Summary
@@ -4425,24 +4517,27 @@
iteration Element: Child Elements
-
Test an XML Rule in Windup
+
7.4. Test an XML Rule in Windup
-
Add the Rule to Windup
+
7.4.1. Add the Rule to Windup
-
A Windup rule is installed simply by copying the rule to the appropriate Windup folder. Windup scans for rules in the following locations:
+
A Windup rule is installed simply by copying the rule to the appropriate Windup folder. Windup scans for rules in the following locations for files ending with .windup.groovy and .windup.xml:
-
The WINDUP_HOME/rules/ folder.
+
The directory specified in the --userRulesDirectory option to the windup-migrate-app.
If you want something from the current add-on, you can simply @Inject the type you wish to use. Alternately you can @Inject an Imported<T> instance, or also @Inject the AddonRegistry itself.
-
Which ClassLoader is used? Always the one of the current code?
+
8.2.4. Which ClassLoader is used? Always the one of the current code?
Depends, if you are in a Furnace Service, then yes, it will use the current code’s add-on ClassLoader.
-
Reading annotations from classes
+
8.2.5. Reading annotations from classes
Since classes can be proxied by Forge/Furnace, it’s safer to read annotations using Annotations API:
@@ -4673,7 +4768,7 @@
Reading annotations from classes
-
How do I know if I am in a Furnace service?
+
8.2.6. How do I know if I am in a Furnace service?
Every furnace service is wrapped in a proxy. If it came from another
add-on (not your current add-on) and was not instantiated with new Blah(),
@@ -4723,7 +4818,7 @@
How do I know if I am in a
-
Resources loading
+
8.2.7. Resources loading
(16:48:30) ozizka-FN: lincolnthree: Just a note - the potential collisions caused by add-on's CL span is not considered as a risk?
@@ -4758,20 +4853,20 @@
Furnace Proxies:
-
What classloader is used by Freemarker to load resources?
+
8.2.8. What classloader is used by Freemarker to load resources?
There is a specific add-on for running Rexster along your graph with
groupId org.jboss.windup.rexster and artifactId Rexster.
-
Running Rexster Within Your Test
+
8.3.1. Running Rexster Within Your Test
Deploy the Rexster add-on by adding the Rexster add-on to the dependencies.
@@ -4790,7 +4885,7 @@
Running Rexster Within Your Test
-
Run Rexster within Windup
+
8.3.2. Run Rexster within Windup
Make sure the Rexster add-on is deployed in Furnace and is accessible on http://localhost:8182/.
@@ -4803,9 +4898,9 @@
Run Rexster within Windup
-
Decompiling
+
8.4. Decompiling
-
The Decompiler API
+
8.4.1. The Decompiler API
DRAFT
@@ -4835,7 +4930,7 @@
The Decompiler API
-
Procyon
+
8.4.2. Procyon
Config
@@ -4887,7 +4982,7 @@
ITypeLoader
-
Dependencies (Forge add-ons)
+
8.5. Dependencies (Forge add-ons)
DRAFT
Based on
@@ -4895,7 +4990,7 @@
Dependencies (Forge add-ons)
discussion.
-
Maven Add-on Structure
+
8.5.1. Maven Add-on Structure
The following is the typical structure of Maven add-on modules.
@@ -4945,7 +5040,7 @@
Maven Add-on Structure
-
Add-on sub-parts
+
8.5.2. Add-on sub-parts
Add-on sub-parts declare dependency preferably on forge add-on APIs, not
on the add-ons themselves, wherever possible (wherever an add-on has an
@@ -5003,7 +5098,7 @@
Add-on sub-parts
-
Test dependencies
+
8.5.3. Test dependencies
For test dependencies on add-ons: Any add-on/sub-part requiring an add-on
for testing purposes should use <scope>test</scope>.
@@ -5021,7 +5116,7 @@
Test dependencies
-
Dependencies between sub-parts within the same add-on
+
8.5.4. Dependencies between sub-parts within the same add-on
Subpart may declare dependency on other subpart. E.g. impl typically
depends on api. In that case, the scope should be set appropriately
@@ -5039,18 +5134,18 @@
Dependencies bet
-
Frames Extensions
+
8.6. Frames Extensions
Windup has several Frames extensions to satisfy its needs.
-
Multiple Types in a Vertex
+
8.6.1. Multiple Types in a Vertex
Frames stores only one type in the type property. To specify multiple types, use the '|' separator. All sub-parts are indexed.
-
Map Handler
+
8.6.2. Map Handler
TBD
@@ -5059,7 +5154,7 @@
Map Handler
-
Map
+
8.6.3. Map
To store a map in as adjacent vertices.
@@ -5078,7 +5173,7 @@
Map
-
List handler.
+
8.6.4. List handler.
TBD.
@@ -5088,7 +5183,7 @@
List handler.
-
List
+
8.6.5. List
WindupVertexListModel offers a generic model for lists of other
models, which are stored as adjacent vertices.
@@ -5096,9 +5191,9 @@
List
-
Internal API Features
+
8.7. Internal API Features
-
Find the RuleProvider that provided a Rule
+
8.7.1. Find the RuleProvider that provided a Rule
A Rule implements Context, which stores metadata. The following example gets the RuleProvider from the Rule context.
This page describes how to log from the Java-based rules.
-
Textual logging
+
8.8.1. Textual logging
Windup uses java.util.logging. Convenient way to get the logger is:
@@ -5153,7 +5248,7 @@
Textual logging
-
Displaying Progress
+
8.8.2. Displaying Progress
IterationProgress
@@ -5170,13 +5265,13 @@
Displaying Progress
-
Variables Stack
+
8.9. Variables Stack
DRAFT
The Variables class stores the variables which are available in rules, EL expressions, and FreeMarker and XSLT templates.
-
Accessing variables
+
8.9.1. Accessing variables
From a Java-based rule
@@ -5209,19 +5304,19 @@
From XSLT template
-
Accessing variables as a flat Map
+
8.9.2. Accessing variables as a flat Map
TO_DO: Describe how to access variables from a Map.
-
Git Rebasing
+
8.10. Git Rebasing
This section describes a few ways you can pull in the code to rebase to the latest code base.
-
Approach Suggested on GitHub
+
8.10.1. Approach Suggested on GitHub
This is the approach suggested on GitHub.
@@ -5258,7 +5353,7 @@
Approach Suggested on GitHub
-
Script Provided by the Windup Development Team
+
8.10.2. Script Provided by the Windup Development Team
Ondra Zizka wrote the following script to bring down a series of pull requests into a
single branch. It then pushes that branch to upstream master-ignore.
@@ -5313,12 +5408,12 @@
Script Provided by the
-
Rules topics
+
9. Rules topics
-
Available Rule Utilities
+
9.1. Available Rule Utilities
-
Programmatically Access the Graph
+
9.1.1. Programmatically Access the Graph
Note: Needs update. This is out of date!
@@ -5412,7 +5507,7 @@
Nested Iteration
-
Modify Graph Data
+
9.1.2. Modify Graph Data
For more custom operations dealing with Graph data that are not covered by the Query mechanism, use the GraphService.
@@ -5442,7 +5537,7 @@
Modify Graph Data
-
Concepts & Philosophy
+
9.2. Concepts & Philosophy
TO_DO: - OZIZKA: Can this topic be marked obsolete and be replaced by this one: Windup Processing Overview ?_
@@ -5458,7 +5553,7 @@
Concepts & Philosophy
database.
-
Graph database and Models (Frames)
+
9.2.1. Graph database and Models (Frames)
As a graph db implementation, we use TinkerPop
backed by Titan backed by
@@ -5480,7 +5575,7 @@
Graph database and Models (Frames)
-
Examples of breaking non-trivial workflows into rules
+
9.2.2. Examples of breaking non-trivial workflows into rules
@@ -5500,7 +5595,7 @@
Examples of brea
-
Creating Rule Operations
+
9.3. Creating Rule Operations
An operation is a task which can be invoked from within a rule.
Example page for design decisions. Could be generated automatically in the future.
-
What is a Ruleset?
+
9.4.1. What is a Ruleset?
A ruleset is a Windup "plug-in" targetting a specific area of migration (e.g. Spring to Java EE 6 migration). Underhood, it is a set of rules, and everything they might need: Operations and Conditions, Report templates (if needed), and static files (e.g. images, XML or CSV files, etc.).
A ruleset may also declare metadata, like ruleset ID, dependencies on other rulesets, etc.
@@ -5553,7 +5647,7 @@
What is a Ruleset?
-
Basic tags
+
9.4.2. Basic tags
@@ -5576,7 +5670,7 @@
Basic tags
-
Rulesets
+
9.4.3. Rulesets
Core rulesets
@@ -5630,7 +5724,7 @@
Community rulesets
-
Java Basic Ruleset
+
9.5. Java Basic Ruleset
DRAFT
This is an example page. Content serves for design decision.
@@ -5639,14 +5733,14 @@
Java Basic Ruleset
Purpose of this ruleset.
-
Metadata
+
9.5.1. Metadata
ID: myRuleset
Graph prefix: myRuleset
-
Rule providers
+
9.5.2. Rule providers
A definition list (dl/dt/dd) of RuleProviders of given Ruleset.
@@ -5671,7 +5765,7 @@
Rule providers
-
Models
+
9.5.3. Models
@@ -5774,7 +5868,7 @@
Models
-
Configuration
+
9.5.4. Configuration
@@ -5784,18 +5878,18 @@
Configuration
-
Reports
+
9.5.5. Reports
-
Ruleset Java Classifications and Inline Hints
+
9.6. Ruleset Java Classifications and Inline Hints
DRAFT
Some of the most important rules are classifications and inline hints.
-
Classifications
+
9.6.1. Classifications
Classifications are important because they tell developers very quickly
what the resource is, so that they can quickly identify resources of
@@ -5821,7 +5915,7 @@
Classifications
-
Inline Hints
+
9.6.2. Inline Hints
Windup takes the approach of profiling resources and providing
syntactically highlighted resource reports. The resource report will
@@ -5835,7 +5929,7 @@
Inline Hints
-
Ruleset Java EE Apps
+
9.7. Ruleset Java EE Apps
DRAFT
TBD?
@@ -5846,14 +5940,14 @@
Ruleset Java EE Apps
-
Ruleset Reporting
+
9.8. Ruleset Reporting
DRAFT
TBD?
-
XML Ruleset
+
9.9. XML Ruleset
DRAFT
@@ -5869,14 +5963,14 @@
XML Ruleset
A core ruleset to provide support for XML files.
-
Metadata
+
9.9.1. Metadata
ID: xml
Graph prefix: xml
-
Rule providers
+
9.9.2. Rule providers
A definition list (dl/dt/dd) of RuleProviders of given Ruleset with brief descriptions.
@@ -5943,7 +6037,7 @@
Rule providers
-
Models
+
9.9.3. Models
_Subclasses of WindupVertexFrame.
@@ -5965,20 +6059,20 @@
Models
-
Configuration
+
9.9.4. Configuration
_Subclasses of TO_DO
-
Reports
+
9.9.5. Reports
Report files or report parts created by this ruleset.
-
Windup Models
+
9.10. Windup Models
Windup models are the classes extending WindupVertexFrame.
They are used to model the data in the graph database to Java objects.
@@ -5991,7 +6085,7 @@
Windup Models
-
Meta Models
+
9.10.1. Meta Models
@@ -6004,26 +6098,26 @@
Meta Models
-
Core Models
+
9.10.2. Core Models
FileModel ArchiveModel
-
Reporting Models
+
9.10.3. Reporting Models
-
Custom Models (coming from Addons)
+
9.10.4. Custom Models (coming from add-ons)
See respective ruleset’s documentation.
-
Create Java Queries
+
9.11. Create Java Queries
-
Query for all frames of some Model
+
9.11.1. Query for all frames of some Model
Query.find(FileModel.class).as("result")
@@ -6031,7 +6125,7 @@
Query for all frames of some Model<
-
Query by property
+
9.11.2. Query by property
Query.find(FileModel.class)
@@ -6041,7 +6135,7 @@
Query by property
-
Gremlin query
+
9.11.3. Gremlin query
code,java
@@ -6056,7 +6150,7 @@
Gremlin query
-
Custom query
+
9.11.4. Custom query
The Query API is just a convenience implementation. For a custom
query, implement your own GraphCondition:
@@ -6075,16 +6169,16 @@
Custom query
-
Rules Metadata
+
9.12. Rules Metadata
-
Overview
+
9.12.1. Overview
Draft
Rules metadata are used for ordering, filtering, debugging and performance reasons.
-
Metadata used by Windup
+
9.12.2. Metadata used by Windup
To control ordering, override getExecuteAfter() and getExecuteBefore().
@@ -6138,7 +6232,7 @@
Metadata used by Windup
-
How to define rule metadata
+
9.12.3. How to define rule metadata
The RuleMetadata is defined using the .withMetadata(Object key, Object value).
@@ -6179,7 +6273,7 @@
Why a Map?
-
Ruleset metadata
+
9.12.4. Ruleset metadata
Ruleset metadata cover the whole Ruleset, not individual rules.
For ruleset metadata, unlike rules, Windup uses a type-safe interface WindupRulesetMetadata
@@ -6191,7 +6285,7 @@
Ruleset metadata
-
Rules Operations
+
9.13. Rules Operations
A list of high-level operations across rulesets.
@@ -6234,7 +6328,7 @@
Rules Operations
-
Ops Reporting TypeReference
+
9.14. Ops Reporting TypeReference
TBD
@@ -6249,12 +6343,12 @@
Ops Reporting TypeReference
-
Debugging and Troubleshooting
+
10. Debugging and Troubleshooting
-
Debugging and Profiling
+
10.1. Debugging and Profiling
-
Debug the Windup Distribution Runtime
+
10.1.1. Debug the Windup Distribution Runtime
You can debug the Windup distribution using one of the following approaches.
@@ -6281,13 +6375,13 @@
Debug the Windup Distribution Ru
-
Debug a Test Using NetBeans
+
10.1.2. Debug a Test Using NetBeans
Click the Debug Test File button, or choose Menu → Debug → Debug Test File.
-
Profile a Test Using NetBeans
+
10.1.3. Profile a Test Using NetBeans
@@ -6329,7 +6423,7 @@
Profile a Test Using NetBeans
-
Profile Forge Runtime Using YourKit
+
10.1.4. Profile Forge Runtime Using YourKit
@@ -6361,9 +6455,9 @@
Profile Forge Runtime Using YourKi
-
Troubleshoot Windup Issues
+
10.2. Troubleshoot Windup Issues
-
Logging
+
10.2.1. Logging
Logging is currently broken and will not be fixed any time soon.
@@ -6372,7 +6466,7 @@
Logging
-
Debugging Exceptions
+
10.2.2. Debugging Exceptions
Exceptions in Surefire reports are broken due to the way Forge wraps
exceptions and the way Surefire handles them. You need to
@@ -6383,7 +6477,7 @@
Debugging Exceptions
-
Classloading Problems
+
10.2.3. Classloading Problems
Configuring dependencies in a Forge-based project can be a little tricky.
See Dependencies for some hints.
@@ -6402,18 +6496,18 @@
Classloading Problems
-
Wiki Information
+
11. Wiki Information
-
About the Windup Wiki
+
11.1. About the Windup Wiki
-
Purpose
+
11.1.1. Purpose
This wiki is a place to create Windup documentation in a collaborative manner, a bit wildly, and on the fly. It is intended to reflect the state of the Windup source code master branch, however pages may become obsolete as the master changes quickly.
-
Areas of Interest
+
11.1.2. Areas of Interest
The Wiki pages are divided into the following main areas of interest, which may often overlap. The page names use these prefixes:
@@ -6435,13 +6529,13 @@
Areas of Interest
-
Markdown, AsciiDoc, or…?
+
11.1.3. Markdown, AsciiDoc, or…?
This Wiki uses AsciiDoc because it is capable of handling the publishing requirements and structural elements needed to create technical books. If you would like to contribute to the documentation, feel free to use your favorite Wiki language, however, it will ultimately be converted to AsciiDoc.
-
Contributor Guidelines
+
11.1.4. Contributor Guidelines
Please see the Contributing Guidelines for details about how to name pages and use the correct AsciiDoc syntax to make the transition to the final documentation go more smoothly.
@@ -6499,7 +6593,7 @@
Contributor Guidelines
-
Add Images to the Windup Wiki
+
11.2. Add Images to the Windup Wiki
@@ -6565,19 +6659,26 @@
Add Images to the Windup Wiki
-
Test the new image in a page on your own Wiki.
+
Test the new image in a page on your own Wiki. Don’t forget to add the :imagesdir: images directive to the beginning of the page to point to the images directory.
-
image:images/IMAGE_NAME.png[New Image]
+
image:IMAGE_NAME.png[New Image]
For example:
-
+
==== My Image
+
+
+
+
+
+
+
If it works, push the image to the upstream repository
@@ -6592,10 +6693,10 @@
Add Images to the Windup Wiki
-
Windup Product Release and Documentation Process
+
12. Windup Product Release and Documentation Process
-
Windup Release Process
+
12.1. Windup Release Process
Windup consists of artifacts from multiple GitHub repositories. Use the following procedure to create a Windup release.
Update the Windup Documentation with the Latest Wiki Changes
+
12.3.3. Update the Windup Documentation with the Latest Wiki Changes
Summary
@@ -6782,7 +6883,7 @@
Documentation Update Scripts
-
Publish the HTML Docs for Access at GitHub IO
+
12.3.4. Publish the HTML Docs for Access at GitHub IO
The https://github.com/windup/windup-documentation/tree/master/scripts/windupPublish.sh script copies the pages from the Windup wiki to the windup-documentation repository, makes minor modifications, and generates each guide in a single HTML page book format. The resulting guides are created in the WINDUP_DOCUMENTATION_HOME/html/ directory.
@@ -6930,10 +7031,10 @@
Publish the HTML Docs fo
-
Additional Resources
+
13. Additional Resources
-
Review the Windup Quickstarts
+
13.1. Review the Windup Quickstarts
The Windup 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. The quickstarts are available on GitHub here: https://github.com/windup/windup-quickstarts
@@ -6941,7 +7042,7 @@
Review the Windup Quickstarts
You can fork and clone the project to have access to regular updates or you can download a ZIP file of the latest version.
If you don’t have the GitHub client (git), download it from: http://git-scm.com/
@@ -6996,9 +7097,9 @@
Fork and Clone the GitHub Project
-
Get Involved
+
13.2. Get Involved
-
How can you help?
+
13.2.1. How can you help?
To help us make Windup cover most application constructs and server configurations, including yours, you can help with any of the following items. Some items require only a few minutes of your time!
Lead: Lincoln Baxter (lincolnthree)
Members: Jess Sightler (jsightler), Matej Briskar (mbriskar), Ondrej
@@ -7364,7 +7465,7 @@
Core development team (and IRC nic
-
IRC meeting bot commands (hint for the moderator)
+
14.2.7. IRC meeting bot commands (hint for the moderator)
#startmeeting
@@ -7384,7 +7485,7 @@
IRC meeting bot comman
+
+
Windup Rules Development Guide
+
+
+
+
1. Overview
+
+
+
This guide is for engineers, consultants, and others who plan to create
+custom rules for Windup 2.0.
+
+
+
+
+
+
+
1.1. What is Windup?
+
+
JBoss Windup is a rule-based tool to simplify application migrations.
+
+
+
Running from a Forge environment, the tool examines EAR, WAR, and
+JAR deployments (or a project source directory) and produces an HTML report detailing the inner workings of
+the Java application to simplify migration efforts. It seeks to make
+migrating from other containers to JBoss EAP a piece of cake.
+
+
+
1.1.1. Windup 2.0 vs. Windup 0.7.x
+
+
Windup 2.0 aims to deliver the same functionality as legacy Windup, however, the internal architecture and rule structure is very different and allows for the creation of much more complex rules.
+
+
+
+
1.1.2. How Does Windup Simplify Migration?
+
+
Windup looks for common resources and highlight technologies and known “trouble
+spots” in migrating applications. The goal of Windup is to provide a
+high level view into relevant technologies in use within the
+application, and provide a consumable report for organizations to
+estimate, document, and migrate enterprise applications to Java EE and JBoss EAP.
+
+
+
These are some of the of the areas targetted by current core Windup rulesets:
+
+
+
+
+
+
+
+
+
Ruleset
+
Description
+
+
+
+
+
Java code
+
Reads compiled Java files, determines if blacklisted classes are imported, and if so, continues to profile the resource.
+
+
+
JSP code
+
Reads JSP files, extracts the JSP imports and taglibs, and continues to
+profile the resource
+
+
+
XML configuration
+
Reads XML files into a DOM objects and continues to profile the resource.
+
+
+
+
+
+
1.1.3. Follow Windup on Twitter!
+
+
Follow Windup on Twitter @JBossWindup for updates and more!
+
+
+
+
+
1.2. Features of Windup 2.0
+
+
+
+
+Shared Data Model
+
+
+
Windup 2.0 creates a shared data model graph that provides the following benefits.
+
+
+
+
It enables complex rule interaction, allowing rules to pass findings to other rules.
+
+
+
It enables 3rd-party plug-ins to interact with other plugins, rules and reports.
+
+
+
The data graph organizes the findings to be searchable and queryable.
+
+
+
+
+
+
+
+Extensibility
+
+
+
Windup 2.0 can be extended by developers, users, and 3rd-parties.
+
+
+
+
It provides a plug-in API to inject other applications into Windup.
+
+
+
It enables 3rd-parties to create simple POJO plug-ins that can interact with the data graph.
+
+
+
Means we don’t have to invent everything. Users with domain knowledge can implement their own rules.
+
+
+
+
+
+
+
+Better Rules
+
+
+
Windup 2.0 provides more powerful and complex rules.
+
+
+
+
XML-based rules are simple to write and and easy to implement.
+
+
+
Java-based rule add-ons are based on OCPsoft Rewrite and provide greater flexibility and power creating when rules.
+
+
+
Rules can now be nested to handle more complex situations. This means you can nest simple statements rather than use complex XPATH or REGEX expressions.
+*Rules can be linked using and/or statements
+
+
+
+
+
+
+
+Automation
+
+
+
Windup 2.0 has the ability to automate some of the migration processes.
+
+
+
+
Windup is integrated with Forge 2.0, meaning it can generate projects, libraries, and configuration files.
+
+
+
Rules can create Forge inputs and put them into the data graph.
+
+
+
During the automation phase, the data graph inputs can be processed to generate a new project.
+
+
+
+
+
+
+
+Work Estimation
+
+
+
Estimates for the level of effort is based on the skills required and the classification of migration work needed.
+
+
+
+
Lift and Shift - The code or file is standards-based and can be ported to the new environment with no changes.
+
+
+
Mapped - There is a standard mapping algorithm to port the code or file to the new environment.
+
+
+
Custom – The code or file must be rewritten or modified to work in the new environment.
+
+
+
+
+
+
+
+Better Reporting
+
+
+
Windup 2.0 reports are now targeted for specific audiences.
+
+
+
+
IT Management - Applications are ranked by cost of migration.
+
+
+
Project Management - Reports detail the type of work and estimation of effort to complete the tasks.
+
+
+
Developers - An Eclipse plug-in provides hints and suggested code changes within the IDE.
+
+
+
+
+
+
+
+
+
+
1.3. About the WINDUP_HOME Variable
+
+
This documentation uses the WINDUP_HOMEreplaceable value to denote the path to the Windup distribution. When you encounter this value in the documentation, be sure to replace it with the actual path to your Windup installation.
+
+
+
+
+
If you download and install the latest distribution of Windup from the JBoss Nexus repository, WINDUP_HOME refers to the windup-distribution-2.0.0.VERSION folder extracted from the downloaded ZIP file.
+
+
+
If you build Windup from GitHub source, WINDUP_HOME refers to the windup-distribution-2.0.0-VERSION folder extracted from the Windup source dist/target/windup-distribution-2.0.0-VERSION.zip file.
+
+
+
+
+
+
+
+
2. Get Started
+
+
+
2.1. Install Windup
+
+
2.1.1. Minimum System Requirements
+
+
+
+
Java Platform, Enterprise Edition 7
+
+
+
A minimum of 4 GB RAM. For better performance, a 4-core processor with 8 GB RAM is recommended. This allows 3 - 4 GB RAM for use by the JVM.
+
+
+
A minimum of 4 GB of free disk space. A fast disk, especially a Solid State Drive (SSD), will improve performance.
+
+
+
Windup is tested on Linux (Fedora), Mac OS X, and Windows. Other Operating Systems with Java 7 support should work equally well.
Extract the ZIP file in to a directory of your choice.
+
+
+
+
+
+
+
+
Note
+
+
+If you used previous versions of Windup, delete the ${user.home}/.windup/ directory. Otherwise you may see errors like the following when you execute Windup:
+ Command: windup-migrate-app was not found
+
+
+
+
+
+
+
+
2.2. Execute Windup
+
+
2.2.1. Prerequisites
+
+
Before you begin, you must gather the following information.
+
+
+
+
+
The fully qualified path of the application archive or folder you plan to migrate.
+
+
+
The fully qualified path to a folder that will contain the resulting report information.
+
+
+
+
If the folder does not exist, it is created by Windup.
+
+
+
If the folder exists, you are prompted with the message:
+
+
+
Overwrite all contents of <OUTPUT_DIRECTORY> (anything already in the directory will be deleted)? [y/N]
+
+
+
+
Choose "y" if you want Windup to delete and recreate the directory.
+
+
+
+
If you are confident you want to overwrite the output directory, you can specify --overwrite on the command line to automatically delete and recreate the directory.
+
+
+
+
+
Note
+
+
+Be careful not to specify a directory that contains important information!
+
+
+
+
+
+
+
+
+
+
You must also provide a list of the application packages to be evaluated.
+
+
+
+
In most cases, you are interested only in evaluating the custom application class packages and not the standard Java EE or 3rd party packages. For example, if the MyCustomApp application uses the package com.mycustomapp, you provide that package using the --packages argument on the command line. It is not necessary to provide the standard Java EE packages, like java.util or javax.ejb.
+
+
+
While you can provide package names for standard Java EE 3rd party software like org.apache, it is usually best not to include them as they should not impact the migration effort.
+
+
+
If you omit the --packages argument, every package in the application is scanned, resulting in very slow performance. It is best to provide the argument with one or more packages.
Open a terminal and navigate to the WINDUP_HOME/bin directory
+
+
+
Type the following command to start Windup:
+
+
+
For Linux: WINDUP_HOME/bin $ ./windup
+For Windows: C:\WINDUP_HOME\bin> windup
+
+
+
+
+
You are presented with the following prompt.
+
+
+
Using Windup at WINDUP_HOME
+
+ _ ___ __
+| | / (_)___ ____/ /_ ______
+| | /| / / / __ \/ __ / / / / __ \
+| |/ |/ / / / / / /_/ / /_/ / /_/ /
+|__/|__/_/_/ /_/\__,_/\__,_/ .___/
+ /_/
+
+JBoss Windup, version [ 2.0.0-VERSION ] - JBoss, by Red Hat, Inc. [ http://windup.jboss.org ]
+
+[windup-distribution-2.0.0-VERSION]$
+
+
+
+
+
+
+
+
2.2.3. Run Windup
+
+
+
+
The command to run Windup is windup-migrate-app.
+
+
+
This command can take arbitrary options processed by different addons. The list of options in the core Windup distribution can be found in Javadoc. Most commonly used command line arguments are:
+
+
+
--input INPUT_ARCHIVE_OR_FOLDER
+
+
This is the fully qualified application archive or source path.
+
+
--output OUTPUT_REPORT_DIRECTORY
+
+
The fully qualified path to the folder that will contain the the report information produced by Windup.
+
+
+
+
+
Note
+
+
+If the OUTPUT_REPORT_DIRECTORY directory exists and you do not specify the --overwrite argument, you are prompted to overwrite the contents. If you respond "y", it is deleted and recreated by Windup, so be careful not to specify an output directory that contains important information!
+
+
+
+
+
+
--overwrite (optional)
+
+
Specify this optional argument only if you are certain you want to force Windup to delete the existing OUTPUT_REPORT_DIRECTORY. The default value is false.
+
+
--userRulesDirectory
+
+
Points to a directory to load XML rules from. (Search pattern: *.windup.groovy and *.windup.xml)
This is a comma-delimited list of the packages to be excluded by Windup.
+
+
--source-mode true (optional)
+
+
This argument is optional and is only required if the application to be evaluated contains source files rather than compiled binaries. The default value is false.
+
+
+
+
+
+
To evaluate an application archive, use the following syntax:
See Windup Command Examples below for concrete examples of commands that use source code directories and archives located in the Windup GitHub repository.
+
+
+
+
You should see the following result upon completion of the command:
+
+
+
***SUCCESS*** Windup execution successful!
+
+
+
+
+
To exit Windup, type:
+
+
+
exit
+
+
+
+
+
Open the OUTPUT_REPORT_DIRECTORY/index.html file in a browser to access the report.
+The following subdirectories in the OUTPUT_REPORT_DIRECTORY contain the supporting information for the report:
To see the complete list of available arguments for the windup-migrate-app command, execute the following command in the Windup prompt:
+
+
+
+
man windup-migrate-app
+
+
+
+
+
2.2.6. Windup Command Examples
+
+
The following Windup command examples report against applications located in the Windup source test-files directory.
+
+
+
Source Code Example
+
+
The following command runs against the seam-booking-5.2 application source code. It evaluates all org.jboss.seam packages and creates a folder named 'seam-booking-report' in the /home/username/windup-reports/ directory to contain the reporting output.
The following command runs against the jee-example-app-1.0.0.ear EAR archive. It evaluates all com.acme and org.apache packages and creates a folder named 'jee-example-app-1.0.0.ear-report' in the /home/username/windup-reports/ directory to contain the reporting output.
The following Windup batch command runs against the jee-example-app-1.0.0.ear EAR archive. It evaluates all com.acme and org.apache packages and creates a folder named 'jee-example-app-1.0.0.ear-report' in the /home/username/windup-reports/ directory to contain the reporting output.
The quickstarts provide examples of Java-based and XML-based rules you can run and test using Windup. The README instructions provide a step-by-step guide to run the quickstart example. You can also look through the code examples and use them as a starting point for creating your own rules.
+
+
+
+
+
+
2.3. Review the Report
+
+
2.3.1. About the Report
+
+
When you execute Windup, the report is generated in the OUTPUT_REPORT_DIRECTORY you specify for the --output argument in the command line. This output directory contains the following files and subdirectories:
+
+
+
+
+
index.html: This is the landing page for the report.
+
+
+
archives/: Contains the archives extracted from the application
+
+
+
graph/: Contains binary graph database files
+
+
+
reports/: This directory contains the generated HTML report files
+
+
+
stats/: Contains Windup performance statistics
+
+
+
+
+
The examples below use the test-files/jee-example-app-1.0.0.ear located in the Windup GitHub source repository for input and specify the com.acme and org.apache package name prefixes to scan. For example:
Use your favorite browser to open the index.html file located in the output report directory. You should see something like the following:
+
+
+
+
+
+
Click on the link under the Name column to view the Windup application report page.
+
+
+
+
2.3.3. Report Sections
+
+
Application Report Page
+
+
The first section of the application report page summarizes the migration effort. It provides the total Story Points and a graphically displays the effort by technology. A Story Point is a term commonly used in Scrum Agile software development methodology to estimate the level of effort needed to implement a feature or change. It does not necessarily translate to man-hours, but the value should be consistent across tasks.
+
+
+
+
+
The migration of the JEE Example App EAR is assigned a total of 42 story points. A pie chart shows the breakdown of story points by package.
+
+
+
This is followed by a section for each of the archives contained in the EAR. It provides the total of the story points assigned to the archive and lists the files contained in archive along with the warnings and story point assigned to each file.
+
+
+
+
+
The following is an example of a Windup Application Report.
+
+
+
+
+
+
+
Archive Analysis Sections
+
+
Each archive summary begins with a total of the story points assigned to its migration, followed by a table detailing the changes required for each file in the archive. The report contains the following columns.
+
+
+
+
Name
+
+
The name of the file being analyzed
+
+
Technology
+
+
The type of file being analyzed. For example:
+
+
+
+
Java Source
+
+
+
Decompiled Java File
+
+
+
Manifest
+
+
+
Properties
+
+
+
EJB XML
+
+
+
Spring XML
+
+
+
Web XML
+
+
+
Hibernate Cfg
+
+
+
Hibernate Mapping
+
+
+
+
+
Issues
+
+
Warnings about areas of code that need review or changes.
+
+
Estimated Story Points
+
+
Level of effort required for migrating the file.
+
+
+
+
+
The following is an example of the archive analysis summary section of a Windup Report. In this example, it’s the analysis of the WINDUP_SOURCE/test-files/jee-example-app-1.0.0.ear/jee-example-services.jar.
+
+
+
+
+
+
+
File Analysis Pages
+
+
The analysis of the jee-example-services.jar lists the files in the JAR and the warnings and story points assigned to each one. Notice the com.acme.anvil.listener.AnvilWebLifecycleListener file has 5 warnings and is assigned 7 story points. Click on the file to see the detail.
+
+
+
+
+
The Information section provides a summary of the story points and notes that the file was decompiled by Windup.
+
+
+
This is followed by the file source code listing. Warnings appear in the file at the point where migration is required.
+
+
+
+
+
In this example, warnings appear at the import of weblogic.application.ApplicationLifecycleEvent and report that the class is proprietary to WebLogic and must be removed.
+
+
+
+
+
+
Later in the code, warnings appear for the creation of the InitialContext and for the object name when registering and unregistering an MBeans
+
+
+
+
+
+
+
+
2.3.4. Additional Reports
+
+
Explore the Windup OUTPUT_REPORT_DIRECTORY/reports folder to find additional reporting information.
+
+
+
Rule Provider Execution Report
+
+
The OUTPUT_REPORT_DIRECTORY/reports/windup_ruleproviders.html page provides the list of rule providers that executed when running the Windup migration command against the application.
+
+
+
+
+
+
+
Rule Provider Execution Report
+
+
The OUTPUT_REPORT_DIRECTORY/reports/windup_ruleproviders.html page provides the list of rule providers that executed when running the Windup migration command against the application.
+
+
+
+
Individual File Analysis Reports
+
+
You can directly access the the file analysis report pages described above by browsing for them by name in the OUTPUT_REPORT_DIRECTORY/reports/ directory. Because the same common file names can exist in multiple archives, for example "manifest.mf" or "web.xml", Windup adds a unique numeric suffix to each report file name.
+
+
+
+
+
+
+
+
+
+
+
3. Understand the Rule Processing
+
+
+
3.1. Windup Processing Overview
+
+
Windup is a rule-based migration tool that allows you to write customized rules to analyze the APIs, technologies, and architectures used by the applications you plan to migrate. The Windup tool also executes its own core rules through all phases of the migration process.
+
+
+
The following is a high level conceptual overview of what happens within Windup when you execute the tool against your application or archive.
+
+
+
3.1.1. Discovery Phase
+
+
Wnen you run the windup-migrate-app command, Windup executes its own core rules to extract files from archives, decompile classes, and analyze the application. In this phase Windup builds a data model 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.
+
+
+
For more information about the phases of rule execution and how to control rule dependencies, see Rule Execution Lifecycle.
The next step in the process is the execution of the migration rules. In this phase, the rules typically do not execute against the application input files. Instead, they execute against the graph database model. Windup rules are independent and decoupled and they communicate with each other using the graph database model. Rules query the graph database to obtain information needed to test the rule condition. They also update the data model with information based on the result of the rule execution. This allows rules to easily interact with other rules and enables the creation of very complex rules.
+
+
+
The Windup distribution contains a large number of migration rules, but in some cases, you may need to create additional custom rules for your specific implementation. Windup’s architecture allows you to create Java-based rule addons or XML rules and add easily add them to Windup. Custom rule creation is covered in the Windup Rules Development Guide.
+
+
+
+
3.1.3. Generate Findings Based on the Rule Execution Results
+
+
The final step in the process is to pull data from the graph database model to generate of reports and optionally generate scripts. Again, Windup uses rules to generate the final output.
+
+
+
By default, Windup generates the following reports at the end of the application migration process. The reports are located in the reports/ subdirectory of the output report path specified when you execute Windup:
+
+
+
+
+
Application Report: This report provides a summary of the total estimated effort, or story points, that are required for the migration. It also provides a detailed list of issues and suggested changes, broken down by archive or folder.
+
+
+
RuleProvider report: This is a detailed listing of the rule providers that fired when running Windup and whether any errors occurred.
+
+
+
Additional reports are generated that provide detailed line-by-line migration tips for individual files.
+
+
+
+
+
Windup can also generate scripts to automate migration processes based on the findings. For example, some configuration files are easily mapped and can be automatically generated as part of the migration process.
+
+
+
+
+
3.2. Rule Execution Lifecycle
+
+
3.2.1. Rule Lifecycle
+
+
Windup executes each rule in a sequential order. The following
+sections describe the phases of rule execution and how rules may specify
+that one or more other rules must be executed before or after they are
+run.
+
+
+
For a graphical overview of rule processing, see
+this
+diagram.
By default, a rule runs during the MIGRATION_RULES phase. However, a
+rule may require certain processing or actions to occur before it
+executes, such as the extraction of archives and scanning of java or XML
+files.
+
+
+
Rule phases provide a way for rule authors to specify and control in
+which phase of the rule lifecycle the rule should execute. This is done
+by overriding the WindupRuleProvider.getPhase() method. The following
+example specifies this rule should execute during the INITIAL_ANALYSIS rule phase.
The following is the list of rule phases as defined in the RulePhase
+enum class. Note that there are also PRE_ processing and POST_
+processing phases for each of the following rule phases.
This phase is called during resource discovery. Static files are scanned
+by their basic properties, for example, the name, extension, location,
+and fully qualified Java class name. Archives are unzipped in this
+phase. Typically, any rule that only puts data into the graph is
+executed during this phase.
This phase is called to perform a basic analysis of the files content.
+It extracts all method names from class files, extracts metadata, such
+as the XML namespace and root element, from XML files.
This phase is called to perform high-level composition operations on the
+graph. For example, it may link items found in XML files to the related
+Java classes or references to server resources in Java classes.
This phase is the default phase for all rules unless overridden.
+During this phase, migration rules attach data to the graph associated
+with migration. This could include: - Hints to migrators for manual
+migration - Automated migration of schemas or source segments -
+Blacklists to indicate vendor specific APIs.
A rule may specify that one or more rules must be executed before it is
+run. In this case, all named rules will be fired in the order specified
+before executing the the current rule.
A rule may also specify that one or more rules must be executed after it
+is run. In this case, all named rules will be fired in the order
+specified after executing the the current rule.
Story points are an abstract metric commonly used in Scrum Agile software development methodology to estimate the level of effort needed to implement a feature or change. They are based on a modified Fibonacci sequence.
+
+
+
In a similar manner, Windup uses story points to express the level of effort needed to migrate particular application constructs, and in a sum, the application as a whole. It does not necessarily translate to man-hours, but the value should be consistent across tasks.
+
+
+
+
3.3.2. How Story Points are Estimated in Rules
+
+
Estimating story points for a rule can be tricky. The following are the general guidelines Windup uses when estimating the level of effort required for a rule.
+
+
+
+
+
+
+
+
+
+
Level of Effort
+
Story Points
+
Description
+
+
+
+
+
Lift and Shift
+
0
+
The code or file is standards-based and requires no effort.
+
+
+
Mapped
+
1- 2 per file
+
There is a standard mapping algorithm to port the code or file. The number of story points required is small, but is dependent on the number of files to port.
+
+
+
Custom
+
5 - 20 per change or component
+
+
The number of story points required to modify and rewrite code depends on the complexity of the change, the number of unknown imports, the size of the files, and the number of components. The following are examples of how to estimate story points.
+
+
+
+
+
Port MyBatis to JPA: '20' story points per query.
+
+
+
Port a web page from one web framework to another depends on the complexity and the number of components involved in the migration. You could estimate '20' story points per component.
+
+
+
+
+
+
+
+
+
+
3.4. Difference Between XML-based and Java-based Rules
+
+
3.4.1. First of all, to prevent confusion:
+
+
+
+
Rules can be written using XML or the Java API. We call them XML-based and Java-based Rules.
+
+
+
Independent of the syntax, the rules may inspect (classify) XML or Java code.
+
+
+
+
+
See the examples below.
+
+
+
+
3.4.2. Which one to choose?
+
+
The XML rules provide a quick, simple way to create rules to analyze Java and XML files. Java rules provide the ability to create very complex rules.
+
+
+
+
+
If you simply need to highlight a specific section of Java code or XML file content and provide hints for it, it is recommended that you create the rule using XML.
+
+
+
If you need to create a new custom report, you need to create the reporting rules using Java.
+
+
+
If you need to extend functionality beyond what the XML rules provide, you need to create the rule using Java.
+
+
+
+
+
+
3.4.3. Pros and cons - XML
+
+
Pros:
+
+
+
+
+
XML rules are fairly easy to write and require less code.
+
+
+
You do not need to configure Maven to build from source because there is no need for compilation of
+XML rules.
+
+
+
Deployment is simple. You simply drop the XML rule into the appropriate path and Windup automatically scans the new rule.
+
+
+
+
+
Cons:
+
+
+
+
+
XML rules only support a simple subset of conditions and operations.
+
+
+
XML rules do not provide for direct custom graph data manipulation.
+
+
+
XML rules do not support the ability to create custom reports.
+
+
+
+
+
+
3.4.4. Pros and Cons - Java
+
+
Pros:
+
+
+
+
+
Java rule add-ons allow you to write custom rules and provide a lot of flexibility.
+
+
+
You can set breakpoints and test Java rule add-ons using a debugger.
+
+
+
IDEs provide code completion for the Windup API.
+
+
+
+
+
Cons:
+
+
+
+
+
You must configure Maven to compile the Windup Java rule add-ons.
+
+
+
Java rule add-ons that are not included in the Windup core code base must be a full Forge add-on.
+
+
+
Java rule add-ons require writing a lot of Java code/
+
+
+
Writing Java rule add-ons are complex and required knowledge of Windup internals.
+
+
+
+
+
+
3.4.5. Examples
+
+
Example of a rule written in XML classifying Java code:
Ability to create complex conditions and operations?
+
No
+
Yes
+
+
+
Ability to directly manipulate the graph data?
+
No
+
Yes
+
+
+
+
+
+
+
+
+
4. Create and Test Java Rule Addons
+
+
+
4.1. Install and Configure Maven
+
+
If you plan to contribute to the core code base or create Java-based rule add-ons, you must first install and configure Maven to build Windup from source.
+
+
+
4.1.1. Download and Install Maven
+
+
If you plan to use Eclipse Luna (4.4) to build Windup, you can skip this
+step and go directly to the section entitled Configure Maven to Build Windup. This version of Eclipse embeds Maven 3.2.1 so you do not need to
+install it separately.
+
+
+
If you plan to run Maven using the command line or plan to use Red Hat
+JBoss Developer Studio 7.1.1 or an older version of Eclipse, you must
+install Maven 3.1.1. or later.
See the Maven documentation for information on how to download and
+install Apache Maven for your operating system.
+
+
+
+
+
+
4.1.2. Configure the Maven Installation in Your IDE
+
+
JBoss Developer Studio 7.1.1 is built upon Eclipse Kepler (4.3), which
+embeds Maven 3.0.4. If you plan to use JBoss Developer Studio 7.1.1 or
+an Eclipse version earier than Eclipse Luna (4.4), you must replace the
+embedded 3.0.4 version of Maven with this newer version.
+
+
+
+
+
From the menu, choose Window -→ Preferences.
+
+
+
Expand Maven and click on Installations.
+
+
+
Uncheck Embedded (3.0.4/1.4.0.20130531-2315)
+
+
+
Click Add and navigate to your Maven install directory. Select it
+and click OK.
+
+
+
Make sure the new external Maven installation is checked and click
+OK to return to JBoss Developer Studio.
+
+
+
+
+
Note: If you use another IDE, refer to the product documentation to
+update the Maven installation.
+
+
+
+
4.1.3. Configure Maven to Build Windup
+
+
Windup uses artifacts located in the
+JBoss Nexus
+repository. You must configure Maven to use this repository before you
+build Windup.
+
+
+
+
+
Open your ${user.home}/.m2/settings.xml file for editing.
+
+
+
Copy the following jboss-nexus-repository profile XML prior to the
+ending </profiles> element.
TO_DO: Add a how-to for compound rules, nested rules, rules over multiple sources, negative queries (not matched by anything).
+
+
+
4.2.1. Windup Rule Provider
+
+
Windup rules are based on OCPsoft Rewrite, an open source routing and URL rewriting solution for Servlets, Java Web Frameworks, and Java EE. The rewrite framework allows you to create rule providers and rules in an easy to read format.
If the rule should run in a phase other than the default MIGRATION_PHASE, you must implement the getPhase() method and specify in which Windup lifecycle phase the rule should be executed. For more information about rule phases, see Rule Execution Lifecycle.
+
+
+
Rules are added using the getConfiguration(GraphContext context) method. This method is inherited from the OCPsoft Rewrite interface org.ocpsoft.rewrite.config.ConfigurationProvider. Rules are discussed in more detail later.
+
+
+
If other rules must execute after or before the rules in this provider, you must provide the list of WindupRuleProvider classes using the getExecuteAfter() or getExecuteAfter() methods.
+
+
+
+
+
The following is an example of a simple Java-based rule add-on.
+
+
+
+
public class ExampleRuleProvider extends WindupRuleProvider
+{
+ @Override public RulePhase getPhase(){
+ return RulePhase.DISCOVERY;
+ }
+
+ // @formatter:off
+ @Override
+ public Configuration getConfiguration(GraphContext context)
+ {
+ return ConfigurationBuilder.begin()
+ .addRule()
+ .when(
+ // Some implementation of GraphCondition.
+ Query.find(...)....
+ )
+ .perform(
+ ...
+ );
+ }
+ // @formatter:on
+ // (@formatter:off/on prevents Eclipse from formatting the rules.)
+}
+
+
+
+
+
4.2.2. Add Rule Code Structure
+
+
Like most rule-based frameworks, Windup rules consist of the following:
+
+
+
+
+
Condition: This is the when(condition) that determines if the rule should execute.
+
+
+
Operation: This defines what to perform() if the condition is met.
+
+
+
+
+
Rules consist of the when part, the perform, the otherwise part,
+and some others, all of which are optional.
+
+
+
when()
+
+
+
.when(Query.fromType(XmlMetaFacetModel.class))
+
+
+
+
In the .when() part, the rule typically queries the graph, using the
+Query API. Results of the query are put on variables stack
+(Variables), many times indirectly through the querying API.
+
+
+
Other way to fill a when part is subclassing the GraphCondition.
+Actually, Query also implements it, and is only a convenient way to
+create a condition.
+You can also use multiple conditions within one when() call using and().
+Example:
Last noticable but important feature is the ability to use
+Gremlin queries. See
+Gremlin docs for reference manual.
+
+
+
+
perform()
+
+
+
.perform(
+ new AbstractIterationOperation<XmlMetaFacetModel>(XmlMetaFacetModel.class, "xml")
+ {
+ public void perform(GraphRewrite event, EvaluationContext context, XmlMetaFacetModel model)
+ {
+ // for each model, do something
+ }
+ }
+)
+
+
+
+
In the .perform() part, the rule typically iterates over the items of interest
+(Java files, XML files, querying services, …), processes them, and
+writes the findings into the graph.
+
+
+
For that, various operations are available. These are subclasses of
+GraphOperation. You can also implement your own. See
+Rules Operations for more information. Again, there are
+several convenient implementations for constructs like iteration
+(Iteration).
An iteration is also an operation, so everywhere an operation is expected, you can freely put the Iteration. If the Iteration is put inside the perform method of another Iteration, we speak about nested iterations.
+An example of such nested iteration may be:
Windup rules inherit the rule constructs from OCP Rewrite. For example,
+.otherwise() Gives you a chance to perform something in case the
+conditions in .when() return false (e.g. they do not match anything).
+For more information, see OCP Rewrite web.
+
+
+
+
.otherwise(
+ new AbstractIterationOperation<XmlMetaFacetModel>(XmlMetaFacetModel.class, "xml")
+ {
+ public void perform(GraphRewrite event, EvaluationContext context, XmlMetaFacetModel model)
+ {
+ // for each model, do something altenate
+ }
+ }
+)
+
+
+
+
+
+
Where
+
+
The where clause is used to provide information about used parameters within the rule. So for example if you have used a parameter in some condition like for example JavaClass.references("{myMatch}"), you may use the where clause to specify what the myMatch is like .where("myMatch").matches("java.lang.String.toString\(.*\)").
+
+Please note that within the where clause the regex is used in contrast to JavaClass.references() where a windup specific syntax is expected.
+
+
+
+
Metadata
+
+
Rules can specify metadata. Currently, the only appearing in some rules,
+and not actually used, is RuleMetadata.CATEGORY.
+
+
+
+
.withMetadata(RuleMetadata.CATEGORY, "Basic")
+
+
+
+
.withMetadata() is basically putting key/value to a
+Map<Object, Object>.
+
+
+
+
+
4.2.3. Available utilities
+
+
For a list of what key services and constructs can be used in the rule,
+see Available Rules Utilities.
+
+
+
Variable stack
+
+
The communication between the conditions and operations is done using the variable stack that is filled with the output of the condition/s and then given to the Iteration to be processed.
+Within conditions, you can specify the name of the result iterable that is saved in the stack using as() method, the iteration can specify the iterable to iterate over using the over() method and even specify the name of for each processed single model of the result being processed.
+Example:
The varstack may be accesed even from the second condition in order to narrow the result of the previous one. After that the iteration may choose which result it wants to iterate over (it is even possible to have multiple iterations listed in the perform, each of which may access different result saved in the variable stack).
Create a new Maven Java Project. These instructions will refer to the project folder location with the replaceable variable 'RULE_PROJECT_HOME'. Modify the project pom.xml file as follows
Add a <dependencies> section to include Windup, rulesets, and test dependencies required by your rule add-on. Windup is a Forge/Furnace based application and has a modular design, so the dependencies will vary depending on the Windup APIs used by the rule. For more information on Windup dependencies, see Windup Dependencies.
+
+
The following are examples of some dependencies you may need for your rule add-on.
Add beans.xml file to META-INF/ dir in resources - typically, $project-dir/src/main/resources/META-INF/beans.xml. This file can be empty. It tells CDI to scan your add-on for CDI beans.
+
+
+
Within your Maven project, create a Java class that extends the WindupRuleProvider class. It is suggested that you end the name of the class with RuleProvider. For example:
+
+
+
public class MyCustomRuleProvider extends WindupRuleProvider
+{
+}
+
+
+
+
+
If the rule provider must run in a phase other than the default MIGRATION_RULES phase, override the phase using the getPhase() method. For example, you may want the rule provider to perform a task during the initial DISCOVERY phase, for example, to ignore files with a specific name or extension.
Finally, add the rule or rules to the rule provider.
+
+
+
+
High-level Conditions and Operations
+
+
The following is a specific high-level rule which uses high-level conditions (JavaClass) and operations (Classification). See the documentation of those conditions and operations for the details.
For more examples of rule providers, see the
+BaseConfig.java
+rule.
+
+
+
+
Low-level Conditions and Operations
+
+
As you can see, the conditions and operations above are Java-specific.
+They come with the Java Basic ruleset. The list of existing rulesets
+will be part of the project documentation. Each ruleset will be
+accompanied with a documentation for its `Condition`s and `Operation`s
+(and also `Model`s).
+
+
+
These high-level elements provided by rulesets may cover majority of
+cases, but not all. Then, you will need to dive into the mid-level
+Windup building elements.
+
+
+
+
Mid-level Conditions and Operations
+
+
+
+
+
+
+
+
+
+
4.4.3. Install the Java-based Rule Add-on
+
+
The easiest and fastest way to build the rule add-on, install it into the local Maven repository, and install it into Windup as a rule add-on is to use the Windup addon-build-and-install command.
+
+
+
+
+
If you have not started Windup, follow the instructions to Execute Windup.
+
+
+
At the Windup console prompt, enter the addon-build-and-install command:
You must name the file containing an XML rule with the .windup.xml extension. Windup identifies files with this extension as XML-base rules, so be sure to use this naming convention, otherwise the rule will not be evaluated!
+
+
+
+
5.1.3. Basic XML Rule Template
+
+
XML rules consist of conditions and actions and follow the familiar "if/then/else" construct:
<?xml version="1.0"?>
+<ruleset xmlns="http://windup.jboss.org/v1/xml" id="XmlFileMappings">
+ <phase>
+ <!-- The phase in which to run the rules -->
+ </phase>
+ <rules>
+ <rule>
+ <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>
+
+
+
+
+
5.1.4. Create the Rule When Condition
+
+
The syntax is dependent on whether you are creating a rule to evaluate Java class, an XML file, a project, or file content and is described in more detail here: XML Rule - When Condition Syntax
+
+
+
+
5.1.5. Create the Rule Perform Action
+
+
Operations allowed 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. The syntax is described in detail here: XML Rule - Perform Action Syntax.
+
+
+
+
+
5.2. XML Rule - When Condition Syntax
+
+
Conditions allowed in the when portion of a rule must extend GraphOperaton 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.
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 a javaclass.
The package or class name to match on. Wildcard characters can be used.
+
+
+
Example: references="org.apache.commons.{*}"
+
+
+
+
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 attribute below.
+
+
+
Example: as="MyEjbRule"
+
+
+
+
in="PATH_FILTER"
+
+
Used to filter input files matching this regex (regular expression) naming pattern. Wildcard characters can be used.
+
+
+
Example: in="{*}File1"
+
+
+
+
from="VARIABLE_NAME"
+
+
Begin the search query with the filtered result from a previous search identified by its as VARIABLE_NAME.
+
+
+
Example: from="MyEjbRule"
+
+
+
+
+
+
+
+
JavaClass Element Child Elements
+
+
+
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.
+
+
+
Example: <location>IMPORT</location>
+
+
+
+
+
+
+
+
+
+
5.2.2. xmlfile Syntax
+
+
Summary
+
+
Use the xmlfile element to find information in XML files. For a better understanding of the xmlfile condition, see the XmlFile JavaDoc.
+
+
+
The following is an example of a rule that tests for an xmlfile.
Use the project element to query for the project charateristics. 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 a rule is dependent on the junit in the version between 2.0.0.Final and 2.2.0.Final.
+
+
+
+
<rule>
+ <when>
+ <project>
+ <artifact groupId="junit" artifactId="junit" from="2.0.0.Final" to="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
+
+
project Element Attributes
+
+
The project element is used to match against the project as a whole. You can use this condition to query for dependencies of the project. It does not have any attributes itself.
+
+
+
+
project Element Child Elements
+
+
+
artifact
+
+
Subcondition used within project to query against project dependencies. This element contains the following attributes:
+
+
+
+
groupId="PROJECT_GROUP_ID"
+
+
Match on the project <groupId> of the dependency
+
+
+
+
artifactId="PROJECT_ARTIFACT_ID"
+Match on the project <artifactId> of the dependency
+
+
+
fromVersion="FROM_VERSION"
+
+
Specify the lower version bound of the artifact. For example 2.0.0.Final
+
+
+
+
toVersion="TO_VERSION"
+
+
Specify the upper version bound of the artifact. For example 2.2.0.Final
+
+
+
+
+
+
+
+
+
+
+
+
5.2.4. filecontent Syntax
+
+
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.
+
+
+
+
+
5.3. XML Rule - Perform Action Syntax
+
+
Operations allowed 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.
The classification element is used to identify or classify application resources. It provides a level of effort and 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.
The link element is used in classifications or hints to identify or classify 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.
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.
Identify or classify links to informational content. See the section on link Syntax for details.
+
+
Example:
+
+
+
+
link href="http://java-x.blogspot.com/2009/03/invoking-web-services-through-proxy.html" description="JAX-WS Proxy Password Example"/>
+
+
+
+
+
+
+
+
+
+
5.3.4. 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.
The lineitem element is used to provide line item information about a hint 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.
+
+
+
Example:
+
+
+
+
<rule>
+ <when>
+ <javaclass references="weblogic.servlet.annotation.WLServlet" as="default">
+ <location>ANNOTATION</location>
+ </javaclass>
+ </when>
+ <perform>
+ <hint message="Replace the proprietary WebLogic @WLServlet annotation with the Java EE 6 standard @WebServlet annotation." effort="1">
+ <link href="https://access.redhat.com/articles/1249423" description="Migrate WebLogic Proprietary Servlet Annotations" />
+ <lineitem message="Proprietary WebLogic @WLServlet annotation found in file."/>
+ </hint>
+ </perform>
+</rule>
+
+
+
+
+
Construct a lineitem Element
+
+
lineitem Element: Attributes
+
+
+
message="MESSAGE"
+
+
A lineitem message
+
+
Example:
+
+
+
+
message="Proprietary code found."
+
+
+
+
+
+
+
+
+
+
5.3.6. 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 preforms an iteration.
iteration child elements include a when condition, along with the actions iteration, classification, hint, xslt, lineitem, and otherwise.
+
+
+
+
+
+
+
5.4. Test an XML Rule in Windup
+
+
5.4.1. Add the Rule to Windup
+
+
A Windup rule is installed simply by copying the rule to the appropriate Windup folder. Windup scans for rules in the following locations for files ending with .windup.groovy and .windup.xml:
+
+
+
+
+
The directory specified in the --userRulesDirectory option to the windup-migrate-app.
+
+
+
The WINDUP_HOME/rules/ directory.
+
+
WINDUP_HOME is the directory where you run the Windup executable (see here).
+
+
+
+
The ${user.home}/.windup/rules/ directory.
+
+
The ${user.home}/.windup is a directory created by Windup at first run and contains rules, add-ons, and the Windup log.
+
+
+
+
For Linux or Mac: ~/.windup/rules/
+For Windows: "\Documents and Settings\USER_NAME\.windup\rules\" -or- "\Users\USER_NAME\.windup\rules\"
+
+
+
+
+
+
+
+
5.4.2. Test the XML Rule
+
+
+
+
If you have not started Windup, follow the instructions to Execute Windup.
+
+
+
Test the XML rule against your application file by running the windup-migrate-app command in the Windup console prompt.
Run forge. For details, see Profiling
+Forge, but skip the first 2 points that direct you to copy the YourKit module and JAR into the Forge installation. Forge 2 already contains the YourKit module and JAR>.
+
+
+
Run windup-analyze-app.
+
+
+
forge -e windup-migrate-app
+
+
+
+
+
+
+
+
+
6.2. Troubleshoot Windup Issues
+
+
6.2.1. Logging
+
+
Logging is currently broken and will not be fixed any time soon.
Exceptions in Surefire reports are broken due to the way Forge wraps
+exceptions and the way Surefire handles them. You need to
+debug or rewrap exceptions using TestUtil.rewrap(ex).
Configuring dependencies in a Forge-based project can be a little tricky.
+See Dependencies for some hints.
+
+
+
+
Caused by: java.lang.IllegalArgumentException: Type value for model 'org.jboss.windup.rules.files.model.FileReferenceModel' is already registered with model org.jboss.windup.rules.files.model.FileReferenceModel
+
+
+
+
This means that the model class is loaded twice. I.e. the module containing it is loaded twice. Or, in tests, you may be (accidentally) adding the class to the deployment.
+This may especially happen after Maven coordinates of some module are changed.
+
+
+
+
+
+
+
7. Additional Resources
+
+
+
7.1. Get Involved
+
+
7.1.1. How can you help?
+
+
To help us make Windup cover most application constructs and server configurations, including yours, you can help with any of the following items. Some items require only a few minutes of your time!
+
+
+
+
+
Let us know what Windup migration rules should cover.
+
+
+
Provide example applications to test migration rules.
+
+
+
Identify application components and problem areas that may be difficult to migrate.
+
+
+
+
Write a short description of these problem migration areas.
+
+
+
Write a brief overview describing how to solve the problem migration areas.
You can also follow us on this IRC channel: irc.freenode.net#windup.
+
+
+
+
+
7.2. Review the Windup Quickstarts
+
+
The Windup 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. The quickstarts are available on GitHub here: https://github.com/windup/windup-quickstarts
+
+
+
You can fork and clone the project to have access to regular updates or you can download a ZIP file of the latest version.
This creates and populates a windup-quickstarts directory on your local file system. Navigate to the newly created directory, for example
+
+
+
cd windup-quickstarts/
+
+
+
+
+
If you want to be able to retrieve the lates code updates, add the remote upstream repository so you can fetch any changes to the original forked repository.
To get the latest files from the upstream repository.
+
+
+
git reset --hard upstream/master
+
+
+
+
+
+
+
+
+
7.3. Available Rule Utilities
+
+
7.3.1. Programmatically Access the Graph
+
+
Note: Needs update. This is out of date!
+
+
+
(Lower Level API, to cover cases not provided by high level API)
+
+
+
This topic describes how to to programmatically access or update graph data when you create a Java-based rule add-on.
+
+
+
Query the graph
+
+
There are several ways - including Query API, Gremlin support, or
+GraphService methods.
+
+
+
Query the Graph Within the .when() method
+
+
Building a rule contains the method when(), which is used to create a
+condition. Vertices that fulfill the condition, are passed to the
+perform() method.
+
+
+
For the queries in the when() method, class Query is used. There are
+several methods which you can use to specify the condition. For example:
+* find() specifies the Model type of the vertex * as() method
+specifies the name of the final list, that is passed to the perform()
+method * from(String name) starts the query not on the all vertices,
+but only on the vertices already stored in the the given name (used to
+begin query on the result of the other one) * withProperty() specify
+the property value of the given vertex
If you have not yet logged in, click the Log In link at the top right side of the page.
+
+
+
Enter your credentials and click the LOGIN button.
+
+
+
You are then redirected back to the Create Issue page.
+
+
+
+
+
+
Choose the following options and click the Next button.
+
+
+
+
Project: Windup
+
+
+
Issue Type: Bug
+
+
+
+
+
+
On the next screen complete the following fields:
+
+
+
+
Summary: Enter a brief description of the problem or issue.
+
+
+
Environment: Provide the details of your operating system, version of Java, and any other pertinent information.
+
+
+
Description: Provide a detailed description of the issue. Be sure to include logs and exceptions traces.
+
+
+
+
+
+
Click the Create button to create the JIRA issue.
+
+
+
If the application or archive causing the issue does not contain sensitive information and you are comfortable sharing it with the Windup development team, attach it to the issue by choosing More → Attach Files. You are provided with an option to restrict visibility to JBoss employees.
+
+
+
+
+
+
+
+
+
8. Appendix
+
+
+
8.1. Glossary of Terms Used in Windup
+
+
8.1.1. Rules Terms
+
+
+
Rule
+
+
A piece of code that performs a single unit of work during the migration process. Depending on the complexity of the rule, it may or may not include configuration data. Extensive configuration information may be externalized into external configuration, for example, a custom XML file. The following is an example of a Java-based rule added to the JDKConfig RuleProvider class.
+
+
+
+
+
+
.addRule()
+ .when(JavaClass.references("java.lang.ClassLoader$").at(TypeReferenceLocation.TYPE))
+ .perform(Classification.as("Java Classloader, must be migrated.")
+ .with(Link.to("Red Hat Customer Portal: How to get resources via the ClassLoader in a JavaEE application in JBoss EAP", "https://access.redhat.com/knowledge/solutions/239033"))
+ .withEffort(1))
+
+
+
+
+
RuleProvider
+
+
A class that implements one or more rules using the .addRule() method. The following are examples of legacy Java RulesProviders that are defined in rules-java-ee ruleset.
+
+
+
+
EjbConfig
+
+
+
JDKConfig
+
+
+
SeamToCDI
+
+
+
+
+
Ruleset
+
+
A ruleset is a group of one or more RuleProviders that targets a specific area of migration, for example, Spring → Java EE 6 or WebLogic → JBoss EAP. A ruleset is packaged as a JAR and contains additional information needed for the migration, such as operations, conditions, report templates, static files, metadata, and relationships to other rulesets. The following Windup projects are rulesets.
+
+
+
+
rules-java-ee
+
+
+
rules-xml
+
+
+
+
+
Rules Metadata
+
+
Information about whether a particular ruleset applies to a given situation. The metadata can include the source and target platform and frameworks.
+
+
Rules Pipeline
+
+
A collection of rules that feed information into the knowledge graph.
+
+
+
+
+
+
8.1.2. Reporting Terms
+
+
+
Lift and Shift (Level of effort)
+
+
The code or file is standards-based and can be ported to the new environment with no changes.
+
+
Mapped (Level of effort)
+
+
There is a standard mapping algorithm to port the code or file to the new environment.
+
+
Custom (Level of effort)
+
+
The code or file must be rewritten or modified to work in the new environment.
+
+
Story Point
+
+
A term commonly used in Scrum Agile software development methodology to estimate the level of effort needed to implement a feature or change. It does not necessarily translate to man-hours, but the value should be consistent across tasks.
+
+
+
+
+
+
+
8.2. Windup Architectural Components
+
+
The following open source software, tools, and APIs are used within
+Windup to analyze and provide migration information. If you plan to
+contribute source code to the core Windup 2.0 project, you should be
+familiar with them.
+
+
+
8.2.1. Forge
+
+
Forge is an open source, extendable, rapid application development tool
+for creating Java EE applications using Maven. For more information
+about Forge 2, see: JBoss Forge.
+
+
+
+
8.2.2. Forge Furnace
+
+
Forge Furnace is a modular runtime container behind Forge that provides
+the ability to run Forge add-ons in an embedded application. For more
+information about Forge Furnace, see:
+Run Forge Embedded.
+
+
+
+
8.2.3. TinkerPop
+
+
TinkerPop is an open source graph computing framework. For more
+information, see: TinkerPop.
Frames represents graph data in the form of interrelated Java Objects or
+a collection of annotated Java Interfaces. For more information, see:
+TinkerPop Frames.
+
+
+
Windup includes several Frames extensions, which are documented here:
+Frames Extensions.
+
+
+
+
8.2.6. Gremlin
+
+
Gremlin is a graph traversal language that allows you to query, analyze,
+and manipulate property graphs that implement the Blueprints property
+graph data model. For more information, see:
+TinkerPop Gremlin Wiki.
+
+
+
+
8.2.7. Blueprints
+
+
Blueprints is an industry standard API used to access graph databases.
+For more information about Blueprints, see:
+TinkerPop Blueprints Wiki.
+
+
+
+
8.2.8. Pipes
+
+
Pipes is a dataflow framework used to process graph data. It for the
+transformation of data from input to output. For more information, see:
+Tinkerpop Pipes Wiki.
+
+
+
+
8.2.9. Rexster
+
+
Rexster is a graph server that exposes any Blueprints graph through HTTP/REST and a binary protocol called RexPro. Rexster makes extensive use of Blueprints, Pipes, and Gremlin. For more information, see:
+TinkerPop Rexster Wiki.
+
+
+
+
8.2.10. OCPsoft Rewrite
+
+
OCPsoft Rewrite is an open source routing and URL rewriting solution for
+Servlets, Java Web Frameworks, and Java EE. For more information about
+Ocpsoft Rewrite, see: OCPsoft Rewrite.
+
+
+
+
+
8.3. Windup Models
+
+
Windup models are the classes extending WindupVertexFrame.
+They are used to model the data in the graph database to Java objects.
+
+
+
This is an overview of the most important models.
+The complete and up-to-date list of models is in Javadoc.