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 2023/07/10 11:33:19 UTC

[camel-examples] branch main updated: CAMEL-19593: camel-platform-http-main - Standalone developer web console for camel-main

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-examples.git


The following commit(s) were added to refs/heads/main by this push:
     new bdda124d CAMEL-19593: camel-platform-http-main - Standalone developer web console for camel-main
bdda124d is described below

commit bdda124d12b856b89729d97d0d5e9525eb4d14d2
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Jul 10 11:03:25 2023 +0200

    CAMEL-19593: camel-platform-http-main - Standalone developer web console for camel-main
---
 examples/main/README.adoc                               |  5 +++++
 examples/main/pom.xml                                   | 16 ++++++++++++++++
 examples/main/src/main/resources/application.properties |  6 ++++++
 examples/pom.xml                                        |  3 +--
 4 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/examples/main/README.adoc b/examples/main/README.adoc
index 22b8b91b..0dc939f4 100644
--- a/examples/main/README.adoc
+++ b/examples/main/README.adoc
@@ -46,6 +46,11 @@ And then use the CLI to see status:
      90491  org.apache.camel.example.My…  3.19.0-SNAPSHOT  Camel      1/1   Running  20s     11       0         0          0s
 
 
+=== Camel Web Console
+
+This example comes with embedded developer console that is accessible via `http://localhost:8080/q/dev`.
+You can also check status of health-check via `http://localhost:8080/q/health`.
+
 === How to configure for Camel Textual Route debugging
 
 Several IDEs are providing support for Camel Textual Route debugging. To enable this possibility, you need to launch this example with the profile `camel.debug`.
diff --git a/examples/main/pom.xml b/examples/main/pom.xml
index 700975e7..62c26ae1 100644
--- a/examples/main/pom.xml
+++ b/examples/main/pom.xml
@@ -64,6 +64,22 @@
             <artifactId>camel-timer</artifactId>
         </dependency>
 
+        <!-- camel-main web console -->
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-platform-http-main</artifactId>
+        </dependency>
+        <!-- developer consoles for web console -->
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-console</artifactId>
+        </dependency>
+        <!-- JMX metrics for web console -->
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-management</artifactId>
+        </dependency>
+
         <!-- camel-cli -->
         <dependency>
             <groupId>org.apache.camel</groupId>
diff --git a/examples/main/src/main/resources/application.properties b/examples/main/src/main/resources/application.properties
index e7493858..7bcf908e 100644
--- a/examples/main/src/main/resources/application.properties
+++ b/examples/main/src/main/resources/application.properties
@@ -22,5 +22,11 @@ camel.main.name = MyCoolCamel
 # allows source:line precise logging
 camel.main.sourceLocationEnabled=true
 
+# enable developer web console
+camel.server.enabled = true
+camel.context.dev-console = true
+camel.server.dev-console-enabled = true
+camel.server.health-check-enabled = true
+
 # application properties
 hi = Hello
diff --git a/examples/pom.xml b/examples/pom.xml
index 932c90c4..5cf8248c 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -148,12 +148,11 @@
         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
 
         <site-repo-url>scpexe://people.apache.org/www/camel.apache.org/maven/</site-repo-url>
-        <jdk.version>11</jdk.version>
+        <jdk.version>17</jdk.version>
         <compiler.fork>false</compiler.fork>
 
         <camel.version>${project.version}</camel.version>
 
-	<!-- Versions -->
         <activemq-version>5.17.4</activemq-version>
         <arquillian-version>1.7.0.Alpha10</arquillian-version>
         <arquillian-tomcat-version>1.1.0.Final</arquillian-tomcat-version>