This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push: new 87ec384 Polish and cleanup documentation 87ec384 is described below commit 87ec3843141f121aab232c9d3898d4716563ab6c Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Mon Aug 9 13:52:09 2021 +0200 Polish and cleanup documentation --- docs/user-manual/modules/ROOT/nav.adoc | 2 - .../modules/ROOT/pages/camel-jar-dependencies.adoc | 48 ------ .../modules/ROOT/pages/camel-jbang.adoc | 53 +++--- .../modules/ROOT/pages/camel-run-maven-goal.adoc | 185 --------------------- docs/user-manual/modules/ROOT/pages/cep.adoc | 38 ----- docs/user-manual/modules/ROOT/pages/index.adoc | 2 - 6 files changed, 31 insertions(+), 297 deletions(-) diff --git a/docs/user-manual/modules/ROOT/nav.adoc b/docs/user-manual/modules/ROOT/nav.adoc index 69d55f4..c98bc5f 100644 --- a/docs/user-manual/modules/ROOT/nav.adoc +++ b/docs/user-manual/modules/ROOT/nav.adoc @@ -5,7 +5,6 @@ ** link:/community/books/[Books] ** xref:building.adoc[Building] ** xref:camel-jbang.adoc[Camel JBang] -** xref:camel-jar-dependencies.adoc[Camel JAR Dependencies] ** xref:camel-boot.adoc[Camel Boot] ** xref:camel-maven-plugin.adoc[Camel Maven Plugin] ** xref:camel-component-maven-plugin.adoc[Camel Component Maven Plugin] @@ -43,7 +42,6 @@ ** xref:browsable-endpoint.adoc[BrowsableEndpoint] ** xref:camelcontext.adoc[Context] ** xref:clustering.adoc[Clustering and loadbalancing] -** xref:cep.adoc[Complex Event Processing] ** xref:component.adoc[Component] ** xref:data-format.adoc[Data Format] ** xref:debugger.adoc[Debugger] diff --git a/docs/user-manual/modules/ROOT/pages/camel-jar-dependencies.adoc b/docs/user-manual/modules/ROOT/pages/camel-jar-dependencies.adoc deleted file mode 100644 index 80609e7..0000000 --- a/docs/user-manual/modules/ROOT/pages/camel-jar-dependencies.adoc +++ /dev/null @@ -1,48 +0,0 @@ -[[CamelJARDependencies-CamelJARDependencies]] -= Camel JAR Dependencies - -Camel core itself is lightweight and can run with a few .jars. - -[[CamelJARDependencies-camel-coredependenciesforCamel2.0orlower]] -== `camel-core` dependencies for Camel 2.0 or lower - -* `commons-logging-api.jar` - API for commons logging -* JAXB 2.1.x - XML stuff - Is provided in the JDK core from Java 1.6 -* `activation.jar` - For Attachments support - Is provided in the JDK -core from Java 1.6 - -[[CamelJARDependencies-camel-coredependenciesforCamel2.1-2.6]] -== `camel-core` dependencies for Camel 2.1 - 2.6 - -* `commons-logging-api-1.1.jar` - API for commons logging -* `commons-management-1.0.jar` - API for JMX -* JAXB 2.1.x - XML stuff - Is provided in the JDK core from Java 1.6 -* `activation-1.1.jar` - For Attachments support - Is provided in the -JDK core from Java 1.6 - -[[CamelJARDependencies-camel-coredependenciesforCamel2.7-2.8]] -== `camel-core` dependencies for Camel 2.7 - 2.8 - -* `slf4j-api-1.5.11.jar` - API for slf4j logging -* `commons-management-1.0.jar` - API for JMX - -[[CamelJARDependencies-camel-coredependenciesforCamel2.9]] -== `camel-core` dependencies for Camel 2.9 - -* `slf4j-api-1.6.1.jar` - API for slf4j logging - -[[CamelJARDependencies-OptionaldependenciesforJMXforCamel1.x-2.8]] -== Optional dependencies for JMX for Camel 1.x - 2.8 - -* `spring-core.jar`, `spring-beans.jar`, -`spring-context.jar`, `spring-aop.jar` - All 4 jars needed to use JMX -with Camel (subject to change in the future). - -From *Camel 2.9*: the Spring JARs are no longer required for using JMX. - -[[CamelJARDependencies-OtherComponents]] -== Other Components - -All the other xref:component.adoc[Components] have a range of 3rd party -.jars they depend on. They are listed in the maven pom files which files -they require. diff --git a/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc b/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc index ff57168..cb7629a 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc @@ -1,7 +1,7 @@ [[CamelJBang]] = Camel JBang -A JBang-based Camel app for searching for kamelets, components, languages, running routes. This component is available from Camel 3.12 and newer versions. +A JBang-based Camel app for searching for kamelets, components, languages, running routes. This component is available from *Camel 3.12* and newer versions. [[CamelJBang-Installation]] @@ -9,9 +9,10 @@ A JBang-based Camel app for searching for kamelets, components, languages, runn JBang makes it easy for us by providing an installation feature that works with Github. If you have JBang installed on your system, then you can run the following command to install CamelJBang: -``` +[source,bash] +---- jbang app install CamelJBang@apache/camel -``` +---- [[CamelJBang-Usage]] @@ -19,9 +20,10 @@ jbang app install CamelJBang@apache/camel The CamelJBang supports multiple commands. Running the command below, will print all of them: -``` +[source,bash] +---- CamelJBang.java [command] -``` +---- All the commands support the `--help` and will display the appropriate help if that flag is provided. @@ -30,21 +32,24 @@ All the commands support the `--help` and will display the appropriate help if t You can use the CLI to search for kamelets, components, languages and miscelaneous components (others). Running the following command will present a list of items that can be searched: -``` +[source,bash] +---- CamelJBang.java search --help -``` +---- For example, to search for kamelets named `jms`, you can use: -``` +[source,bash] +---- CamelJBang.java search kamelets --search-term=jms -``` +---- To list all the kamelets, just run the command without any search term: -``` +[source,bash] +---- CamelJBang.java search kamelets -``` +---- The same behavior also works for all the other search commands. The table below lists all search commands available at the moment: @@ -55,11 +60,9 @@ The same behavior also works for all the other search commands. The table below |kamelets |search for kamelets - |components |search for components - |languages |search for languages @@ -76,9 +79,10 @@ The init sub-command can be used to simplify creating Kamelets. Through this com To bootstrap the Kamelet run: -``` +[source,bash] +---- CamelJBang init kamelet --bootstrap -``` +---- This will create a sub-directory called `work` in the current directory with a properties file named `init-template.properties` inside it. @@ -86,9 +90,10 @@ The keys of the properties file are commented with the details about what need t After you have filled the values, you can generate the Kamelet using: -``` +[source,bash] +---- CamelJBang init kamelet --properties-path work/init-template.properties -``` +---- Running this command will create a new file in the `work` directory. The name of the generated file is determined by the `kameletMetadataName` property in the properties file. As such, parsing the default properties file would generate a file named `my-sample-sink.kamelet.yaml` in the directory. @@ -102,7 +107,8 @@ At the moment it is possible to run YAML-based routes which also refer to Kamele In order to do so, write a YAML-based file with the `route`, the `steps` and the `to` destination for the route. The following example, shows a route that uses the Timer Source Kamelet to produce messages every second. The body of the messages will be logged to the standard output. Subsequently, they will be sent to a AMQP 1.0 compliant broker using the JMS AMQ 1.0 Sink Kamelet. -``` +[source,yaml] +---- - route: from: uri: "kamelet:timer-source" @@ -116,12 +122,15 @@ In order to do so, write a YAML-based file with the `route`, the `steps` and the parameters: remoteURI: amqp://localhost:61616 destinationName: test-queue -``` +---- Execute the following command to run this route: -``` +[source,bash] +---- CamelJBang run jms-amqp-10-sink-binding.yaml -``` +---- + +NOTE: it is necessary to have a AMQP 1.0 broker, such as Apache Artemis, running locally and listening on port 61616. Adjust the route accordingly if using a different address for the broker. + -*Note*: it is necessary to have a AMQP 1.0 broker, such as Apache Artemis, running locally and listening on port 61616. Adjust the route accordingly if using a different address for the broker. diff --git a/docs/user-manual/modules/ROOT/pages/camel-run-maven-goal.adoc b/docs/user-manual/modules/ROOT/pages/camel-run-maven-goal.adoc deleted file mode 100644 index d6a6062..0000000 --- a/docs/user-manual/modules/ROOT/pages/camel-run-maven-goal.adoc +++ /dev/null @@ -1,185 +0,0 @@ -= camel:run - -The *camel:run* goal of the xref:camel-maven-plugin.adoc[Camel Maven -Plugin] is used to run your Camel xref:spring.adoc[Spring] -configurations in a forked JVM from Maven. - -[source,shell] ----- -cd examples/camel-example-spring -mvn camel:run ----- - -This makes it very easy to spin up and test your routing rules without -having to write a main(…) method; it also lets you create multiple jars -to host different sets of routing rules and easily test them -independently. - -How this works is that the plugin will compile the source code in the -maven project, then boot up a Spring ApplicationContext using the XML -configuration files on the classpath at - -[source,syntaxhighlighter-pre] ----- -META-INF/spring/*.xml ----- - -== Running OSGi Blueprint - -From *Camel 2.10* onwards the `camel:run` plugin also supports running a -xref:using-osgi-blueprint-with-camel.adoc[Blueprint] application, and by -default it scans for OSGi blueprint files in - -[source,syntaxhighlighter-pre] ----- -OSGI-INF/blueprint/*.xml ----- - -You would need to configure the camel:run plugin to use blueprint, by -setting useBlueprint to true as shown below - -[source,xml] ----- -<plugin> - <groupId>org.apache.camel</groupId> - <artifactId>camel-maven-plugin</artifactId> - <configuration> - <useBlueprint>true</useBlueprint> - </configuration> -</plugin> ----- - -This allows you to boot up any Blueprint services you wish - whether -they are Camel-related, or any other Blueprint. - -From *Camel 2.17* onwards the camel:run goal is able to auto detect if -camel-blueprint is on the classpath or there is blueprint XML files in -the project, and therefore you no longer have to configure the -useBlueprint option. - -[NOTE] -==== - **Using limited Blueprint container** - -We use the https://code.google.com/p/pojosr/[PojoSR project] as the -blueprint container. This project is not a full fledged blueprint -container. For that you can use http://karaf.apache.org/[Apache Karaf] -or http://servicemix.apache.org/[Apache ServiceMix]. - -In *Camel 2.15.3* and later, we use -https://github.com/apache/felix/tree/trunk/connect[Felix Connect] -instead. PojoSR https://issues.apache.org/jira/browse/FELIX-4445[was -donated] to ASF and is now maintained under Felix project. - -==== - -You can use the `applicationContextUri` configuration to specify an -explicit blueprint XML file, such as: - -[source,xml] ----- -<plugin> - <groupId>org.apache.camel</groupId> - <artifactId>camel-maven-plugin</artifactId> - <configuration> - <useBlueprint>true</useBlueprint> - <applicationContextUri>myBlueprint.xml</applicationContextUri> - <!-- ConfigAdmin options which have been added since Camel 2.12.0 --> - <configAdminPid>test</configAdminPid> - <configAdminFileName>/user/test/etc/test.cfg</configAdminFileName> - </configuration> -</plugin> ----- - -The `applicationContextUri` will currently load the file from the -classpath, so in the example above the myBlueprint.xml file must be in -the root of the classpath. -The `configAdminPid` is the pid name which will be used as the pid name -for configuration admin service when loading the persistence properties -file. -The `configAdminFileName` is the file name which will be used to load -the configuration admin service properties file. - -== Running CDI - -From *Camel 2.11* onwards the `camel:run` plugin also supports running a -xref:components:others:cdi.adoc[CDI] application - -You would need to configure the camel:run plugin to use CDI, by setting -useCDI to true as shown below - -[source,xml] ----- -<plugin> - <groupId>org.apache.camel</groupId> - <artifactId>camel-maven-plugin</artifactId> - <configuration> - <useCDI>true</useCDI> - </configuration> -</plugin> ----- - -This allows you to boot up any CDI services you wish - whether they are -Camel-related, or any other CDI enabled services. - -You should add the CDI container of your choice (e.g. Weld or -OpenWebBeans) to the dependencies of the camel-maven-plugin such as -https://github.com/apache/camel-examples/tree/master/examples/camel-example-cdi/[in -this example]. - -From *Camel 2.17* onwards the camel:run goal is able to auto detect if -camel-cdi in on the classpath, and therefore you no longer have to -configure the useCDI option. - -From the source of Camel you can run a CDI example via - -[source,shell] ----- -cd examples/camel-example-cdi -mvn compile camel:run ----- - -== Logging the classpath - -From *Camel 2.10* onwards you can configure whether the classpath should -be logged when `camel:run` executes. In older releases the classpath is -always logged. -This can be verbose and noisy, so from Camel 2.10 onwards, the classpath -is not logged anymore. You can enable this in the configuration using: - -[source,xml] ----- -<plugin> - <groupId>org.apache.camel</groupId> - <artifactId>camel-maven-plugin</artifactId> - <configuration> - <logClasspath>true</logClasspath> - </configuration> -</plugin> ----- - -== Using live reload of XML files - -From *Camel 2.19* onwards you can configure the plugin to scan for XML -file changes and trigger a reload of the Camel routes which are -contained in those XML files. - -[source,xml] ----- -<plugin> - <groupId>org.apache.camel</groupId> - <artifactId>camel-maven-plugin</artifactId> - <configuration> - <fileWatcherDirectory>src/main/resources/META-INF/spring</fileWatcherDirectory> - </configuration> -</plugin> ----- - -Then the plugin watches this directory. This allows you to edit the -source code from your editor and save the file, and have the running -Camel application pickup those changes. - -Notice its only changes of Camel routes, eg `<routes>`, or -`<route>` which is supported. You cannot change Spring or OSGi Blueprint -`<bean>` elements. - diff --git a/docs/user-manual/modules/ROOT/pages/cep.adoc b/docs/user-manual/modules/ROOT/pages/cep.adoc deleted file mode 100644 index fd98e36..0000000 --- a/docs/user-manual/modules/ROOT/pages/cep.adoc +++ /dev/null @@ -1,38 +0,0 @@ -[[CEP-CamelCEP]] -= Camel CEP - -http://en.wikipedia.org/wiki/Complex_event_processing[Complex Event -Processing] or -http://en.wikipedia.org/wiki/Event_stream_processing[Event Stream -Processing] are approaches of processing streams of events, usually from -multiple sources. - -Another approach to CEP with Camel is to use Camel RX -which provides a typesafe DSL in Java, Scala, Groovy, clojure for -processing events in a natural collection-like way (while being high -performance and asynchronous under the covers). Camel RX -uses the https://github.com/Netflix/RxJava/wiki[RxJava] -http://netflix.github.com/RxJava/javadoc/[API] which is a JVM port of -the https://rx.codeplex.com/[Reactive Extensions] - -[[CEP-CEPwithCamelRX]] -== CEP with Camel RX - -Camel RX provides various ways to get an -http://netflix.github.com/RxJava/javadoc/rx/Observable.html[Observable<T>] -which provides the typesafe DSL for processing events on a single -stream. - -Once you have an -http://netflix.github.com/RxJava/javadoc/rx/Observable.html[Observable<T>] -you can then: - -* https://github.com/Netflix/RxJava/wiki/Filtering-Operators[filter -events] -* -https://github.com/Netflix/RxJava/wiki/Transformative-Operators[transform -events] -* https://github.com/Netflix/RxJava/wiki/Combinatorial-Operators[combine -event streams] -* https://github.com/Netflix/RxJava/wiki/Utility-Operators[other utility -methods] diff --git a/docs/user-manual/modules/ROOT/pages/index.adoc b/docs/user-manual/modules/ROOT/pages/index.adoc index ff05edf..ea5971f 100644 --- a/docs/user-manual/modules/ROOT/pages/index.adoc +++ b/docs/user-manual/modules/ROOT/pages/index.adoc @@ -46,7 +46,6 @@ For a deeper and better understanding of Apache Camel, an xref:faq:what-is-camel * xref:getting-started.adoc[Getting Started] * xref:book-getting-started.adoc[Longer Getting Started Guide] -* xref:camel-jar-dependencies.adoc[Camel JAR Dependencies] * xref:camel-boot.adoc[Camel Boot] * xref:components:others:cdi.adoc[Working with Camel and CDI] * xref:spring.adoc[Working with Camel and Spring] @@ -81,7 +80,6 @@ camel routes without them knowing * xref:batch-consumer.adoc[Batch Consumer] * xref:browsable-endpoint.adoc[BrowsableEndpoint] * xref:camelcontext.adoc[CamelContext] -* xref:cep.adoc[CEP] * xref:clustering.adoc[Clustering and loadbalancing] * xref:components::index.adoc[Component] * xref:componentconfiguration.adoc[ComponentConfiguration]