You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2020/09/07 19:06:19 UTC

[camel-website] branch master updated: Fixed typos and polished blogs

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-website.git


The following commit(s) were added to refs/heads/master by this push:
     new c9cb821  Fixed typos and polished blogs
c9cb821 is described below

commit c9cb821ca79ae4c0ae9da72cafa00b2888b3e8f8
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Sep 7 21:00:43 2020 +0200

    Fixed typos and polished blogs
---
 content/blog/2020/09/Camel35-Whatsnew/index.md |  8 +++---
 content/blog/2020/09/windup/index.md           | 34 +++++++++++++++++---------
 2 files changed, 27 insertions(+), 15 deletions(-)

diff --git a/content/blog/2020/09/Camel35-Whatsnew/index.md b/content/blog/2020/09/Camel35-Whatsnew/index.md
index 60b542b..e19a5ee 100644
--- a/content/blog/2020/09/Camel35-Whatsnew/index.md
+++ b/content/blog/2020/09/Camel35-Whatsnew/index.md
@@ -117,7 +117,7 @@ For example given the below configuration:
     camel.beans.foo.countries[de].name = Germany
     camel.beans.foo.countries[de].language = DE
 
-Then the `foo` bean has a property named `country` that is a `java.util.Map` type.
+Then the `foo` bean has a property named `countries` that is a `java.util.Map` type.
 The Map contains element of type `com.foo.MyCountry` that has been explicit configured above.
 
 However Camel is now capable to know this information by source code generated _configuers_:
@@ -132,8 +132,8 @@ However Camel is now capable to know this information by source code generated _
 
 The `Foo` class has been annotated with `@Configurer` which allows Camel tooling to generate reflection free configurers source code.
 This is what Camel internally uses to do its vast configuration of all its EIPs, components and so on. Now we have exposed
-this for end users. Notice how the Map contains the collection type as a generic type with `Map<Country`. That information
-is now generated in the configuers, so Camel knows. Therefore the configuration can be shortened to:
+this for end users. Notice how the Map contains the collection type as a generic type with `Map<Country>`. That information
+is now generated in the configuers, so Camel knows the value types in the collections. The configuration can therefore be shortened to:
 
     camel.beans.foo.countries[usa].name = United States of America
     camel.beans.foo.countries[usa].language = EN
@@ -143,7 +143,7 @@ is now generated in the configuers, so Camel knows. Therefore the configuration
 The work did not stop there. By knowing the value type of the collection types, we allow to do reflection free
 [binding collections](https://camel.apache.org/manual/latest/property-binding.html).
 
-There has been many other smaller improvements in Camels properties bindind. Camel uses this heavily internally during
+There has been many other smaller improvements in Camels properties binding. Camel uses this heavily internally during
 startup to configure and setup all of its things such as components, EIPs, routes etc. This work has been streamlined
 across the various runtimes; whether its standalone, Spring Boot, Quarkus, Camel K, Camel Kafka Connector,
 or the good old XML routes.
diff --git a/content/blog/2020/09/windup/index.md b/content/blog/2020/09/windup/index.md
index df9f484..8959c5a 100644
--- a/content/blog/2020/09/windup/index.md
+++ b/content/blog/2020/09/windup/index.md
@@ -9,7 +9,9 @@ summary: "We'll show you how Windup can help you plan and estimate your upgrade
 
 ## TL;DR:
 
-[Install](https://github.com/windup/windup#installation-and-usage) Windup and generate your migration report to Camel 3.0.0 by running: _bin/mta-cli --input PATH_TO_CAMEL_PROJET --sourceMode --source camel:2 --target camel:3_
+[Install](https://github.com/windup/windup#installation-and-usage) Windup and generate your migration report to Camel 3.0.0 by running: 
+
+    _bin/mta-cli --input PATH_TO_CAMEL_PROJET --sourceMode --source camel:2 --target camel:3_
 
 Checkout sample reports for [Camel in Action, Second Edition](http://windup.surge.sh/cia2/reports/migration_issues.html), [Apache Camel Developer's Cookbook](http://windup.surge.sh/cookbook/reports/migration_issues.html) and [Mastering Apache Camel](http://windup.surge.sh/mastering/reports/migration_issues.html).
 
@@ -21,9 +23,9 @@ Camel 3.0.0 has been released in late 2019 which comes a decade after Camel 2.0.
 
 The easiest way to run Windup against your Camel 2 project is to follow the installation [instructions](https://github.com/windup/windup#installation-and-usage) which is just downloading a ZIP archive containing a _bin/mta-cli_ executable. Unfortunately, you will need to create a https://developers.redhat.com account if you don't have one already. You can then run it against your project:
 
-_./mta-cli --input PATH_TO_CAMEL_PROJET --sourceMode --source camel:2 --target camel:3_
+    _./mta-cli --input PATH_TO_CAMEL_PROJET --sourceMode --source camel:2 --target camel:3_
 
-and that's it! Once it's done, you should see a message containing the location of the generated Windup report which you can view by opening the generated _index.html_ file with your favorite brower.
+and that's it! Once it's done, you should see a message containing the location of the generated Windup report which you can view by opening the generated _index.html_ file with your favorite browser.
 
 To get an idea of what a Windup report looks like, I've generated and published Windup reports for source codes of well known Camel books: [Camel in Action, Second Edition](http://windup.surge.sh/cia2/reports/migration_issues.html), [Apache Camel Developer's Cookbook](http://windup.surge.sh/cookbook/reports/migration_issues.html) and [Mastering Apache Camel](http://windup.surge.sh/mastering/reports/migration_issues.html).
 
@@ -31,10 +33,18 @@ To get an idea of what a Windup report looks like, I've generated and published
 
 If you like what you see and want to contribute: good news! Windup loves [PRs](https://github.com/windup/windup#get-involved) 😁
 
-We've created tasks for Camel [3.0](https://issues.redhat.com/browse/WINDUPRULE-391)-->[3.1](https://issues.redhat.com/browse/WINDUPRULE-519)--><a href="">3.2</a>-->[3.3](https://issues.redhat.com/browse/WINDUPRULE-521). To get an idea of what needs to be done to create a new rule, let's look at some examples.
+We've created tasks for Camel [3.0](https://issues.redhat.com/browse/WINDUPRULE-391) --> [3.1](https://issues.redhat.com/browse/WINDUPRULE-519)--><a href="">3.2</a>-->[3.3](https://issues.redhat.com/browse/WINDUPRULE-521).
+
+To get an idea of what needs to be done to create a new rule, let's look at some examples.
+
+The [rules](https://github.com/windup/windup-rulesets/tree/master/rules-reviewed/camel3/camel2) can be either written in Groovy or XML. Groovy rules are more powerful than XML rules but if you prefer writting XML and the rule isn't too complicated, you can go for XML.
+Each file contains rules whose filename describes what kind of rules it holds. For example, the file [xml-removed-components.windup.xml](https://github.com/windup/windup-rulesets/blob/2cc95ff40536c31f8c836e3acf7339d53ab4b282/rules-reviewed/camel3/camel2/xml-removed-components.windup.xml)
+contains XML rules that check whether your project uses Camel Components that have been removed in Camel 3. As with programming in general, some file names are better than others. For each file there is a corresponding test file and a test folder that are used to test your rules.
 
-The [rules](https://github.com/windup/windup-rulesets/tree/master/rules-reviewed/camel3/camel2) can be either written in Groovy or XML. Groovy rules are more powerful than XML rules but if you prefer writting XML and the rule isn't too complicated, you can go for XML. Each file contains rules whose filename describes what kind of rules it holds. For example, the file [xml-removed-components.windup.xml](https://github.com/windup/windup-rulesets/blob/2cc95ff40536c31f8c836e3acf7339d53ab4b28 [...]
-```$xml
+For example, [xml-removed-components.windup.xml](https://github.com/windup/windup-rulesets/blob/2cc95ff40536c31f8c836e3acf7339d53ab4b282/rules-reviewed/camel3/camel2/xml-removed-components.windup.xml) contains the rule with id
+[xml-removed-components-00000](https://github.com/windup/windup-rulesets/blob/2cc95ff40536c31f8c836e3acf7339d53ab4b282/rules-reviewed/camel3/camel2/xml-removed-components.windup.xml#L15) that checks whether your Maven project is using the _camel-linkedin_ component,
+which has been removed in Camel 3, and if so, output a helpful message:
+```xml
 <rule id="xml-removed-components-00000">
     <when>
         <project>
@@ -49,7 +59,9 @@ The [rules](https://github.com/windup/windup-rulesets/tree/master/rules-reviewed
     </perform>
 </rule>
 ```
+
 It's corresponding test is located in [tests/xml-removed-components.windup.test.xml](https://github.com/windup/windup-rulesets/blob/2cc95ff40536c31f8c836e3acf7339d53ab4b282/rules-reviewed/camel3/camel2/tests/xml-removed-components.windup.test.xml#L10):
+
 ```xml
 <rule id="xml-removed-components-00000-test">
     <when>
@@ -65,13 +77,13 @@ It's corresponding test is located in [tests/xml-removed-components.windup.test.
 </rule>
 ```
 
-which tests that given the [test resources](https://github.com/windup/windup-rulesets/blob/2cc95ff40536c31f8c836e3acf7339d53ab4b282/rules-reviewed/camel3/camel2/tests/xml-removed-components.windup.test.xml#L5) located in the test [folder](https://github.com/windup/windup-rulesets/tree/2cc95ff40536c31f8c836e3acf7339d53ab4b282/rules-reviewed/camel3/camel2/tests/data/xml-removed-components), the camel-linkedin error message is produced exactly once. The syntax for writting rules is pretty s [...]
+which tests that given the [test resources](https://github.com/windup/windup-rulesets/blob/2cc95ff40536c31f8c836e3acf7339d53ab4b282/rules-reviewed/camel3/camel2/tests/xml-removed-components.windup.test.xml#L5) located in the test [folder](https://github.com/windup/windup-rulesets/tree/2cc95ff40536c31f8c836e3acf7339d53ab4b282/rules-reviewed/camel3/camel2/tests/data/xml-removed-components), the camel-linkedin error message is produced exactly once. The syntax for writting rules is pretty s [...]
 
-_mvn -DrunTestsMatching=xml-removed-components clean test_.
+    _mvn -DrunTestsMatching=xml-removed-components clean test_.
 
-Notice how the rule only checks if the project refers to _org.apache.camel:camel-linkedin_. But sometimes that dependency is pulled transitively and so a better idea would be to _also_ check whether your project contains Java, Blueprint or Spring files referencing the LinkedIn Camel Component. You can find how to do that in XML by looking at the rule that checks for usage of the [twitter-streaming](https://github.com/windup/windup-rulesets/blob/2cc95ff40536c31f8c836e3acf7339d53ab4b282/ru [...]
+Notice how the rule only checks if the project refers to _org.apache.camel:camel-linkedin_. Sometimes that dependency is pulled transitively and so a better idea would be to _also_ check whether your project contains Java, Blueprint or Spring files referencing the LinkedIn Camel Component. You can find how to do that in XML by looking at the rule that checks for usage of the [twitter-streaming](https://github.com/windup/windup-rulesets/blob/2cc95ff40536c31f8c836e3acf7339d53ab4b282/rules- [...]
 
-As you've probably figured out by now, the best way to write a new rule is to look at exisiting ones.
+As you've probably figured out by now, the best way to write a new rule is to look at existing ones.
 
 ## Limitations
 
@@ -95,7 +107,7 @@ As we've seen in the previous section, the rules are only as powerful as you've
 </rule>
 ```
 
-When running the rule, Windup will scan your Java files and try to find ones that import _org.apache.camel.CamelContext_ and then use the _{get|set}Propert{y|ies}({*})_ regular expression to match method names on declared variables of type _CamelContext_. One would think that it convers all use cases right? Well no. What if the class in question is a sublclass of another class that already imports _org.apache.camel.CamelContext_ ? Then the subclass doesn't need to reimport it and the Win [...]
+When running the rule, Windup will scan your Java files and try to find ones that import _org.apache.camel.CamelContext_ and then use the _{get|set}Propert{y|ies}({*})_ regular expression to match method names on declared variables of type _CamelContext_. One would think that it convers all use cases right? Well no. What if the class in question is a sublclass of another class that already imports _org.apache.camel.CamelContext_ ? Then the subclass doesn't need to reimport it and the Win [...]
 
 Another problem is string interpolation. When writting a rule that tries to match a certain String, for example: