Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/Dev-Internal-API-Features.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ A `Rule` implements `Context`, which stores metadata. The following example gets
--------
WindupRuleProvider ruleProvider =
(WindupRuleProvider) context.get(RuleMetadata.RULE_PROVIDER);
[source,java]
--------

For more information about the metadata stored in the context, see xref:Rules-Metadata[Rules Metadata]
Expand Down
11 changes: 1 addition & 10 deletions docs/Known-Issues.adoc
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
[[Known-Issues]]
=== Known Windup Issues

The following is a list of currently known issues.

* https://issues.jboss.org/browse/WINDUP-73[WINDUP-73]
** If you do not see expected log messages, resort to `System.out.println()` for logging.
** You may see too much logging, especially from Forge. This is to be expected.

* https://issues.jboss.org/browse/WINDUP-197[WINDUP-197]
** 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).

Windup known issues are tracked here: https://issues.jboss.org/browse/WINDUP-496?jql=project%20%3D%20WINDUP%20AND%20issuetype%20%3D%20Bug%20AND%20status%20in%20%28Open%2C%20%22Coding%20In%20Progress%22%2C%20Reopened%2C%20%22Pull%20Request%20Sent%22%29[Open Windup issues]
4 changes: 2 additions & 2 deletions docs/Review-the-Report.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ Explore the Windup `OUTPUT_REPORT_DIRECTORY/reports` folder to find additional r

===== Rule Provider Execution Report

The `OUTPUT_REPORT_DIRECTORY/reports/ruleproviders.html` page provides the list of rule providers that executed when running the Windup migration command against the application.
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]

===== Rule Provider Execution Report

The `OUTPUT_REPORT_DIRECTORY/reports/ruleproviders.html` page provides the list of rule providers that executed when running the Windup migration command against the application.
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

Expand Down
2 changes: 1 addition & 1 deletion docs/Rules-Create-a-Basic-Java-based-Rule-Add-on.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ The following are examples of some dependencies you may need for your rule add-o
<plugin>
<groupId>org.jboss.forge.furnace</groupId>
<artifactId>furnace-maven-plugin</artifactId>
<version>${version.furnace}</version>
<version>${version.forge}</version>
<executions>
<execution>
<id>generate-dot</id>
Expand Down
47 changes: 33 additions & 14 deletions docs/Rules-Rule-Execution-Lifecycle.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,56 @@

==== Rule Lifecycle

Windup executes each rule in a single threaded mode. The following
Windup executes each rule in 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 graphical overview of rule processing, see
For a graphical overview of rule processing, see
https://docs.google.com/drawings/d/1IMnds3Qu8Wwcf7_mr7NJ9a3YgtcGJ7dejl09EhWl7Vc/edit[this
diagram].

==== Rule Phases

By default, a rule runs during the http://windup.github.io/windup/docs/javadoc/latest/org/jboss/windup/config/RulePhase.html#MIGRATION_RULES[MIGRATION_RULES] phase. However, a
rule may require certain processing or actions to occur before the it
-------------
INFO: Loaded [67] org.jboss.windup.config.WindupRuleProvider [
org.jboss.windup.config.phase.Implicit
org.jboss.windup.config.phase.Initialization
org.jboss.windup.config.phase.Discovery
org.jboss.windup.config.phase.ArchiveExtraction
org.jboss.windup.config.phase.ArchiveMetadataExtraction
org.jboss.windup.config.phase.ClassifyFileTypes
org.jboss.windup.config.phase.DiscoverProjectStructure
org.jboss.windup.config.phase.Decompilation
org.jboss.windup.config.phase.InitialAnalysis
org.jboss.windup.config.phase.MigrationRules
org.jboss.windup.config.phase.PostMigrationRules
org.jboss.windup.config.phase.PreReportGeneration
org.jboss.windup.config.phase.ReportGeneration
org.jboss.windup.config.phase.PostReportGeneration
org.jboss.windup.config.phase.ReportRendering
org.jboss.windup.config.phase.PostReportRendering
org.jboss.windup.config.phase.Finalize
org.jboss.windup.config.phase.PostFinalize
]
-------------


By default, a rule runs during the https://github.com/windup/windup/blob/master/config/api/src/main/java/org/jboss/windup/config/phase/MigrationRules.java[MigrationRules] 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 an way for rule authors to specify and control in
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 http://windup.github.io/windup/docs/javadoc/latest/org/jboss/windup/config/RulePhase.html#INITIAL_ANALYSIS[INITIAL_ANALYSIS]
rule phase.
example specifies this rule should execute during the https://github.com/windup/windup/blob/master/config/api/src/main/java/org/jboss/windup/config/phase/InitialAnalysis.java[InitialAnalysis] rule phase.

[source,java]
----
@Override
public RulePhase getPhase() {
return RulePhase.INITIAL_ANALYSIS;
return InitialAnalysis.class;
}
----

Expand Down Expand Up @@ -75,12 +98,10 @@ before executing the the current rule.

[source,java]
----
List<Class<? extends WindupRuleProvider>> executeBeforeList = new ArrayList<>();

@Override
public List<Class<? extends WindupRuleProvider>> getExecuteBefore()
{
return executeBeforeList.add(RuleToFireBefore.class);
return asClassList(RuleToFireBefore.class);
}
----

Expand All @@ -90,11 +111,9 @@ specified after executing the the current rule.

[source,java]
----
List<Class<? extends WindupRuleProvider>> executeAfterList = new ArrayList<>();

@Override
public List<Class<? extends WindupRuleProvider>> getExecuteAfter()
{
return executeAfterList.add(RuleToFireAfter.class);
return asClassList(RuleToFireAfter.class);
}
----
2 changes: 0 additions & 2 deletions docs/Windup-Core-Development-Guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
This guide is for developers who plan to contribute source code updates
or core rule add-ons to the Windup 2.0 project.

NOTE: This is a very rough first draft!

include::What-is-Windup.adoc[tabsize=4]
include::Features-of-Windup-2.0.adoc[tabsize=4]
include::Get-Involved.adoc[tabsize=4]
Expand Down
6 changes: 2 additions & 4 deletions docs/Windup-Rules-Development-Guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@

== Overview

This guide is for engineers, consultants, and others who plan to use
Windup 2.0 to migrate Java applications or other components.

NOTE: This is a very rough first draft!
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]

Expand Down
4 changes: 1 addition & 3 deletions docs/Windup-User-Guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
== Overview

This guide is for engineers, consultants, and others who plan to use
Windup 2.0 to migrate Java applications or other components.

NOTE: This is a very rough first draft!
Windup 2.0 to migrate Java applications or other components.

include::What-is-Windup.adoc[tabsize=4]

Expand Down
108 changes: 42 additions & 66 deletions html/WindupCoreDevelopmentGuide.html
Original file line number Diff line number Diff line change
Expand Up @@ -521,18 +521,6 @@ <h2 id="_overview">Overview</h2>
<p>This guide is for developers who plan to contribute source code updates
or core rule add-ons to the Windup 2.0 project.</p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<div class="title">Note</div>
</td>
<td class="content">
This is a very rough first draft!
</td>
</tr>
</table>
</div>
<div class="sect2">
<h3 id="What-is-Windup">What is Windup?</h3>
<div class="paragraph">
Expand Down Expand Up @@ -2246,7 +2234,7 @@ <h4 id="_additional_reports">Additional Reports</h4>
<div class="sect4">
<h5 id="_rule_provider_execution_report">Rule Provider Execution Report</h5>
<div class="paragraph">
<p>The <code>OUTPUT_REPORT_DIRECTORY/reports/ruleproviders.html</code> page provides the list of rule providers that executed when running the Windup migration command against the application.</p>
<p>The <code>OUTPUT_REPORT_DIRECTORY/reports/windup_ruleproviders.html</code> page provides the list of rule providers that executed when running the Windup migration command against the application.</p>
</div>
<div class="paragraph">
<p><span class="image"><img src="images/report-javaee-ear-ruleprovider.png" alt="RuleProvider Report" width="500"></span></p>
Expand All @@ -2255,7 +2243,7 @@ <h5 id="_rule_provider_execution_report">Rule Provider Execution Report</h5>
<div class="sect4">
<h5 id="_rule_provider_execution_report_2">Rule Provider Execution Report</h5>
<div class="paragraph">
<p>The <code>OUTPUT_REPORT_DIRECTORY/reports/ruleproviders.html</code> page provides the list of rule providers that executed when running the Windup migration command against the application.</p>
<p>The <code>OUTPUT_REPORT_DIRECTORY/reports/windup_ruleproviders.html</code> page provides the list of rule providers that executed when running the Windup migration command against the application.</p>
</div>
</div>
<div class="sect4">
Expand Down Expand Up @@ -2331,37 +2319,60 @@ <h3 id="Rules-Rule-Execution-Lifecycle">Rule Execution Lifecycle</h3>
<div class="sect3">
<h4 id="_rule_lifecycle">Rule Lifecycle</h4>
<div class="paragraph">
<p>Windup executes each rule in a single threaded mode. The following
<p>Windup executes each rule in 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.</p>
</div>
<div class="paragraph">
<p>For graphical overview of rule processing, see
<p>For a graphical overview of rule processing, see
<a href="https://docs.google.com/drawings/d/1IMnds3Qu8Wwcf7_mr7NJ9a3YgtcGJ7dejl09EhWl7Vc/edit">this
diagram</a>.</p>
</div>
</div>
<div class="sect3">
<h4 id="_rule_phases">Rule Phases</h4>
<div class="paragraph">
<p>By default, a rule runs during the <a href="http://windup.github.io/windup/docs/javadoc/latest/org/jboss/windup/config/RulePhase.html#MIGRATION_RULES">MIGRATION_RULES</a> phase. However, a
rule may require certain processing or actions to occur before the it
<div class="listingblock">
<div class="content">
<pre>INFO: Loaded [67] org.jboss.windup.config.WindupRuleProvider [
org.jboss.windup.config.phase.Implicit
org.jboss.windup.config.phase.Initialization
org.jboss.windup.config.phase.Discovery
org.jboss.windup.config.phase.ArchiveExtraction
org.jboss.windup.config.phase.ArchiveMetadataExtraction
org.jboss.windup.config.phase.ClassifyFileTypes
org.jboss.windup.config.phase.DiscoverProjectStructure
org.jboss.windup.config.phase.Decompilation
org.jboss.windup.config.phase.InitialAnalysis
org.jboss.windup.config.phase.MigrationRules
org.jboss.windup.config.phase.PostMigrationRules
org.jboss.windup.config.phase.PreReportGeneration
org.jboss.windup.config.phase.ReportGeneration
org.jboss.windup.config.phase.PostReportGeneration
org.jboss.windup.config.phase.ReportRendering
org.jboss.windup.config.phase.PostReportRendering
org.jboss.windup.config.phase.Finalize
org.jboss.windup.config.phase.PostFinalize
]</pre>
</div>
</div>
<div class="paragraph">
<p>By default, a rule runs during the <a href="https://github.com/windup/windup/blob/master/config/api/src/main/java/org/jboss/windup/config/phase/MigrationRules.java">MigrationRules</a> 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.</p>
</div>
<div class="paragraph">
<p>Rule phases provide an way for rule authors to specify and control in
<p>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 <code>WindupRuleProvider.getPhase()</code> method. The following
example specifies this rule should execute during the <a href="http://windup.github.io/windup/docs/javadoc/latest/org/jboss/windup/config/RulePhase.html#INITIAL_ANALYSIS">INITIAL_ANALYSIS</a>
rule phase.</p>
example specifies this rule should execute during the <a href="https://github.com/windup/windup/blob/master/config/api/src/main/java/org/jboss/windup/config/phase/InitialAnalysis.java">InitialAnalysis</a> rule phase.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-java" data-lang="java">@Override
public RulePhase getPhase() {
return RulePhase.INITIAL_ANALYSIS;
return InitialAnalysis.class;
}</code></pre>
</div>
</div>
Expand Down Expand Up @@ -2428,12 +2439,10 @@ <h4 id="_execute_before_and_execute_after">Execute Before and Execute After</h4>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-java" data-lang="java">List&lt;Class&lt;? extends WindupRuleProvider&gt;&gt; executeBeforeList = new ArrayList&lt;&gt;();

@Override
<pre class="highlight"><code class="language-java" data-lang="java">@Override
public List&lt;Class&lt;? extends WindupRuleProvider&gt;&gt; getExecuteBefore()
{
return executeBeforeList.add(RuleToFireBefore.class);
return asClassList(RuleToFireBefore.class);
}</code></pre>
</div>
</div>
Expand All @@ -2444,12 +2453,10 @@ <h4 id="_execute_before_and_execute_after">Execute Before and Execute After</h4>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-java" data-lang="java">List&lt;Class&lt;? extends WindupRuleProvider&gt;&gt; executeAfterList = new ArrayList&lt;&gt;();

@Override
<pre class="highlight"><code class="language-java" data-lang="java">@Override
public List&lt;Class&lt;? extends WindupRuleProvider&gt;&gt; getExecuteAfter()
{
return executeAfterList.add(RuleToFireAfter.class);
return asClassList(RuleToFireAfter.class);
}</code></pre>
</div>
</div>
Expand Down Expand Up @@ -3032,7 +3039,7 @@ <h5 id="_create_a_maven_project">Create a Maven Project</h5>
&lt;plugin&gt;
&lt;groupId&gt;org.jboss.forge.furnace&lt;/groupId&gt;
&lt;artifactId&gt;furnace-maven-plugin&lt;/artifactId&gt;
&lt;version&gt;${version.furnace}&lt;/version&gt;
&lt;version&gt;${version.forge}&lt;/version&gt;
&lt;executions&gt;
&lt;execution&gt;
&lt;id&gt;generate-dot&lt;/id&gt;
Expand Down Expand Up @@ -4120,8 +4127,7 @@ <h4 id="_find_the_ruleprovider_that_provided_a_rule">Find the RuleProvider that
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-java" data-lang="java">WindupRuleProvider ruleProvider =
(WindupRuleProvider) context.get(RuleMetadata.RULE_PROVIDER);
[source,java]</code></pre>
(WindupRuleProvider) context.get(RuleMetadata.RULE_PROVIDER);</code></pre>
</div>
</div>
<div class="paragraph">
Expand Down Expand Up @@ -5822,37 +5828,7 @@ <h4 id="_fork_and_clone_the_github_project">Fork and Clone the GitHub Project</h
<div class="sect2">
<h3 id="Known-Issues">Known Windup Issues</h3>
<div class="paragraph">
<p>The following is a list of currently known issues.</p>
</div>
<div class="ulist">
<ul>
<li>
<p><a href="https://issues.jboss.org/browse/WINDUP-73">WINDUP-73</a></p>
<div class="ulist">
<ul>
<li>
<p>If you do not see expected log messages, resort to <code>System.out.println()</code> for logging.</p>
</li>
<li>
<p>You may see too much logging, especially from Forge. This is to be expected.</p>
</li>
</ul>
</div>
</li>
<li>
<p><a href="https://issues.jboss.org/browse/WINDUP-197">WINDUP-197</a></p>
<div class="ulist">
<ul>
<li>
<p>Exceptions in Surefire reports are broken due to the way Forge wraps exceptions and the way Surefire handles them.</p>
</li>
<li>
<p>You need to debug or rewrap exceptions using TestUtil.rewrap(ex).</p>
</li>
</ul>
</div>
</li>
</ul>
<p>Windup known issues are tracked here: <a href="https://issues.jboss.org/browse/WINDUP-496?jql=project%20%3D%20WINDUP%20AND%20issuetype%20%3D%20Bug%20AND%20status%20in%20%28Open%2C%20%22Coding%20In%20Progress%22%2C%20Reopened%2C%20%22Pull%20Request%20Sent%22%29">Open Windup issues</a></p>
</div>
</div>
<div class="sect2">
Expand Down Expand Up @@ -5949,7 +5925,7 @@ <h4 id="_reporting_terms">Reporting Terms</h4>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2015-01-16 15:13:07 EST
Last updated 2015-02-04 16:09:16 EST
</div>
</div>
</body>
Expand Down
Loading