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 a0d47b1ba7f CAMEL-21204: Remove camel-js-dsl
a0d47b1ba7f is described below

commit a0d47b1ba7fc9fbd4b88d1add18c9cdbc2ffcf88
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Oct 7 17:19:16 2024 +0200

    CAMEL-21204: Remove camel-js-dsl
---
 bom/camel-bom/pom.xml                              |   5 -
 .../org/apache/camel/catalog/others.properties     |   1 -
 .../org/apache/camel/catalog/others/js-dsl.json    |  16 ---
 docs/components/modules/others/nav.adoc            |   1 -
 docs/components/modules/others/pages/js-dsl.adoc   |   1 -
 .../ROOT/pages/camel-4x-upgrade-guide-4_9.adoc     |   7 +-
 .../dsl/jbang/core/commands/ExportBaseCommand.java |   2 -
 dsl/camel-js-dsl/pom.xml                           | 138 --------------------
 .../services/org/apache/camel/other.properties     |   8 --
 .../services/org/apache/camel/routes-loader/js     |   2 -
 .../src/generated/resources/js-dsl.json            |  16 ---
 dsl/camel-js-dsl/src/main/docs/js-dsl.adoc         |  59 ---------
 .../org/apache/camel/dsl/js/JavaScriptDSL.java     | 100 ---------------
 .../dsl/js/JavaScriptRoutesBuilderLoader.java      |  96 --------------
 .../dsl/js/JavaScriptRoutesBuilderLoaderTest.java  | 140 ---------------------
 .../src/test/resources/log4j2-test.properties      |  31 -----
 dsl/camel-js-dsl/src/test/resources/module.js      |  17 ---
 .../routes/routes-with-component-configuration.js  |  21 ----
 .../routes/routes-with-context-configuration.js    |  18 ---
 .../resources/routes/routes-with-endpoint-dsl.js   |  22 ----
 .../test/resources/routes/routes-with-modules.js   |  20 ---
 .../resources/routes/routes-with-processors.js     |  31 -----
 .../routes/routes-with-rest-configuration.js       |  20 ---
 .../test/resources/routes/routes-with-rest-dsl.js  |  25 ----
 .../src/test/resources/routes/routes.js            |  18 ---
 .../download/DependencyDownloaderRoutesLoader.java |   2 -
 dsl/pom.xml                                        |   1 -
 parent/pom.xml                                     |   5 -
 28 files changed, 5 insertions(+), 818 deletions(-)

diff --git a/bom/camel-bom/pom.xml b/bom/camel-bom/pom.xml
index 4c09a139943..f173e5e5a6f 100644
--- a/bom/camel-bom/pom.xml
+++ b/bom/camel-bom/pom.xml
@@ -1202,11 +1202,6 @@
         <artifactId>camel-jq</artifactId>
         <version>4.9.0-SNAPSHOT</version>
       </dependency>
-      <dependency>
-        <groupId>org.apache.camel</groupId>
-        <artifactId>camel-js-dsl</artifactId>
-        <version>4.9.0-SNAPSHOT</version>
-      </dependency>
       <dependency>
         <groupId>org.apache.camel</groupId>
         <artifactId>camel-jsch</artifactId>
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties
index 9e000195a09..a081b71faa4 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties
@@ -18,7 +18,6 @@ health
 jasypt
 java-joor-dsl
 jfr
-js-dsl
 jta
 kamelet-main
 langchain4j-tokenizer
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/js-dsl.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/js-dsl.json
deleted file mode 100644
index c5e22fc1d87..00000000000
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/js-dsl.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-  "other": {
-    "kind": "other",
-    "name": "js-dsl",
-    "title": "JavaScript DSL",
-    "description": "Camel DSL with JavaScript",
-    "deprecated": true,
-    "firstVersion": "3.9.0",
-    "label": "dsl",
-    "supportLevel": "Experimental",
-    "metadata": { "routes.language": "js" },
-    "groupId": "org.apache.camel",
-    "artifactId": "camel-js-dsl",
-    "version": "4.9.0-SNAPSHOT"
-  }
-}
diff --git a/docs/components/modules/others/nav.adoc 
b/docs/components/modules/others/nav.adoc
index a8928cbd20d..9100b52b5a9 100644
--- a/docs/components/modules/others/nav.adoc
+++ b/docs/components/modules/others/nav.adoc
@@ -15,7 +15,6 @@
 *** xref:dsl-modeline.adoc[DSL Modeline]
 *** xref:groovy-dsl.adoc[Groovy DSL]
 *** xref:java-joor-dsl.adoc[Java DSL (runtime compiled)]
-*** xref:js-dsl.adoc[JavaScript DSL]
 *** xref:java-xml-jaxb-dsl.adoc[Jaxb XML Dsl]
 *** xref:kamelet-main.adoc[Kamelet Main]
 *** xref:java-xml-io-dsl.adoc[XML Io Dsl]
diff --git a/docs/components/modules/others/pages/js-dsl.adoc 
b/docs/components/modules/others/pages/js-dsl.adoc
deleted file mode 120000
index 6b6c1a71e6f..00000000000
--- a/docs/components/modules/others/pages/js-dsl.adoc
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../dsl/camel-js-dsl/src/main/docs/js-dsl.adoc
\ No newline at end of file
diff --git 
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_9.adoc 
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_9.adoc
index f91717e3fe8..4e18ff87fba 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_9.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_9.adoc
@@ -100,9 +100,12 @@ The logs will print a warning message if this behavior is 
detected.
 
 === Removed deprecated components
 
-The following components has been removed
+The following experimental DSL has been removed
 
-- `camel-jsh-dsl` - This DSL was an experiment. The Camel team is only 
focusing on Java, XML and YAML DSL.
+- `camel-js-dsl`
+- `camel-jsh-dsl`
+
+The Camel team is only focusing on Java, XML and YAML DSL.
 
 === Removed API
 
diff --git 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java
 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java
index a1f32bdf759..452d68ede83 100644
--- 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java
+++ 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java
@@ -448,8 +448,6 @@ public abstract class ExportBaseCommand extends 
CamelCommand {
                             // for the other DSLs we need to add dependencies
                             if ("groovy".equals(ext)) {
                                 
answer.add("mvn:org.apache.camel:camel-groovy-dsl");
-                            } else if ("js".equals(ext)) {
-                                
answer.add("mvn:org.apache.camel:camel-js-dsl");
                             } else if ("xml".equals(ext)) {
                                 
answer.add("mvn:org.apache.camel:camel-xml-io-dsl");
                             } else if ("yaml".equals(ext)) {
diff --git a/dsl/camel-js-dsl/pom.xml b/dsl/camel-js-dsl/pom.xml
deleted file mode 100644
index 55db4df7c02..00000000000
--- a/dsl/camel-js-dsl/pom.xml
+++ /dev/null
@@ -1,138 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.apache.camel</groupId>
-        <artifactId>dsl</artifactId>
-        <version>4.9.0-SNAPSHOT</version>
-    </parent>
-
-    <artifactId>camel-js-dsl</artifactId>
-    <packaging>jar</packaging>
-    <name>Camel :: JavaScript DSL (deprecated)</name>
-    <description>Camel DSL with JavaScript</description>
-
-    <properties>
-        <firstVersion>3.9.0</firstVersion>
-        <title>JavaScript DSL</title>
-        <label>dsl</label>
-        <supportLevel>Experimental</supportLevel>
-        <sourcecheckExcludes>
-            **/resources/**/My*.java
-        </sourcecheckExcludes>
-        <sourcecheckExcludesComma>
-            ${sourcecheckExcludes},
-        </sourcecheckExcludesComma>
-        <annotations>
-            routes.language=js
-        </annotations>
-    </properties>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>camel-endpointdsl-support</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.graalvm.js</groupId>
-            <artifactId>js-language</artifactId>
-            <version>${graaljs-version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>camel-main</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>camel-direct</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>camel-rest</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>camel-mock</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>camel-core-languages</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>camel-bean</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>camel-log</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>camel-telegram</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>camel-seda</artifactId>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.assertj</groupId>
-            <artifactId>assertj-core</artifactId>
-            <version>${assertj-version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test-junit5</artifactId>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.logging.log4j</groupId>
-            <artifactId>log4j-core</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.logging.log4j</groupId>
-            <artifactId>log4j-slf4j2-impl</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.logging.log4j</groupId>
-            <artifactId>log4j-jcl</artifactId>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-</project>
diff --git 
a/dsl/camel-js-dsl/src/generated/resources/META-INF/services/org/apache/camel/other.properties
 
b/dsl/camel-js-dsl/src/generated/resources/META-INF/services/org/apache/camel/other.properties
deleted file mode 100644
index f7c63c3c6e8..00000000000
--- 
a/dsl/camel-js-dsl/src/generated/resources/META-INF/services/org/apache/camel/other.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-# Generated by camel build tools - do NOT edit this file!
-name=js-dsl
-groupId=org.apache.camel
-artifactId=camel-js-dsl
-version=4.9.0-SNAPSHOT
-projectName=Camel :: JavaScript DSL (deprecated)
-projectDescription=Camel DSL with JavaScript
-annotations=routes.language=js
diff --git 
a/dsl/camel-js-dsl/src/generated/resources/META-INF/services/org/apache/camel/routes-loader/js
 
b/dsl/camel-js-dsl/src/generated/resources/META-INF/services/org/apache/camel/routes-loader/js
deleted file mode 100644
index 8ae3a3c8a1d..00000000000
--- 
a/dsl/camel-js-dsl/src/generated/resources/META-INF/services/org/apache/camel/routes-loader/js
+++ /dev/null
@@ -1,2 +0,0 @@
-# Generated by camel build tools - do NOT edit this file!
-class=org.apache.camel.dsl.js.JavaScriptRoutesBuilderLoader
diff --git a/dsl/camel-js-dsl/src/generated/resources/js-dsl.json 
b/dsl/camel-js-dsl/src/generated/resources/js-dsl.json
deleted file mode 100644
index c5e22fc1d87..00000000000
--- a/dsl/camel-js-dsl/src/generated/resources/js-dsl.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-  "other": {
-    "kind": "other",
-    "name": "js-dsl",
-    "title": "JavaScript DSL",
-    "description": "Camel DSL with JavaScript",
-    "deprecated": true,
-    "firstVersion": "3.9.0",
-    "label": "dsl",
-    "supportLevel": "Experimental",
-    "metadata": { "routes.language": "js" },
-    "groupId": "org.apache.camel",
-    "artifactId": "camel-js-dsl",
-    "version": "4.9.0-SNAPSHOT"
-  }
-}
diff --git a/dsl/camel-js-dsl/src/main/docs/js-dsl.adoc 
b/dsl/camel-js-dsl/src/main/docs/js-dsl.adoc
deleted file mode 100644
index 28f3414986e..00000000000
--- a/dsl/camel-js-dsl/src/main/docs/js-dsl.adoc
+++ /dev/null
@@ -1,59 +0,0 @@
-= JavaScript DSL Component (deprecated)
-:doctitle: JavaScript DSL
-:shortname: js-dsl
-:artifactid: camel-js-dsl
-:description: Camel DSL with JavaScript
-:since: 3.9
-:supportlevel: Experimental-deprecated
-:deprecated: *deprecated*
-:tabs-sync-option:
-//Manually maintained attributes
-:group: DSL
-
-*Since Camel {since}*
-
-IMPORTANT: This DSL is deprecated and experimental support level and is not 
recommended being used for production.
-
-The `js-dsl` is used for runtime compiling JavaScript routes in an existing 
running Camel integration.
-This was invented for Camel K and later ported to Apache Camel.
-
-This means that Camel will load the `.js` source during startup and via the 
JavaScript compiler transform
-this into Camel routes.
-
-
-== Example
-
-The following `hello.js` source file:
-
-.hello.js
-[source,javascript]
-----
-function proc(e) {
-    e.getIn().setBody('Hello Camel K!')
-}
-
-from('timer:tick')
-    .process(proc)
-    .to('log:info')
-----
-
-Can then be loaded and run with Camel CLI or Camel K.
-
-.Running with Camel K
-
-[source,bash]
-----
-kamel run hello.js
-----
-
-.Running with Camel CLI
-
-[source,bash]
-----
-camel run hello.js
-----
-
-
-== See Also
-
-See xref:manual:ROOT:dsl.adoc[DSL]
diff --git 
a/dsl/camel-js-dsl/src/main/java/org/apache/camel/dsl/js/JavaScriptDSL.java 
b/dsl/camel-js-dsl/src/main/java/org/apache/camel/dsl/js/JavaScriptDSL.java
deleted file mode 100644
index d3661ecb44f..00000000000
--- a/dsl/camel-js-dsl/src/main/java/org/apache/camel/dsl/js/JavaScriptDSL.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.dsl.js;
-
-import java.util.function.Consumer;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.ErrorHandlerFactory;
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.BuilderSupport;
-import org.apache.camel.builder.EndpointConsumerBuilder;
-import org.apache.camel.builder.endpoint.EndpointBuilderFactory;
-import org.apache.camel.builder.endpoint.EndpointRouteBuilder;
-import org.apache.camel.model.InterceptDefinition;
-import org.apache.camel.model.InterceptFromDefinition;
-import org.apache.camel.model.InterceptSendToEndpointDefinition;
-import org.apache.camel.model.OnCompletionDefinition;
-import org.apache.camel.model.OnExceptionDefinition;
-import org.apache.camel.model.RouteDefinition;
-import org.apache.camel.model.rest.RestConfigurationDefinition;
-import org.apache.camel.model.rest.RestDefinition;
-import org.apache.camel.spi.Registry;
-
-@Deprecated
-public class JavaScriptDSL extends BuilderSupport implements 
EndpointBuilderFactory {
-    public final Registry registry;
-    public final EndpointRouteBuilder builder;
-    public final CamelContext context;
-
-    public JavaScriptDSL(EndpointRouteBuilder builder) {
-        super(builder.getContext());
-
-        this.registry = builder.getContext().getRegistry();
-        this.builder = builder;
-        this.context = builder.getContext();
-    }
-
-    public RouteDefinition from(String endpoint) {
-        return builder.from(endpoint);
-    }
-
-    public RouteDefinition from(EndpointConsumerBuilder endpoint) {
-        return builder.from(endpoint);
-    }
-
-    public RestDefinition rest(String path) {
-        return builder.rest(path);
-    }
-
-    public RestConfigurationDefinition restConfiguration() {
-        return builder.restConfiguration();
-    }
-
-    public OnExceptionDefinition onException(Class<? extends Throwable> 
exception) {
-        return builder.onException(exception);
-    }
-
-    public OnCompletionDefinition onCompletion() {
-        return builder.onCompletion();
-    }
-
-    public InterceptDefinition intercept() {
-        return builder.intercept();
-    }
-
-    public InterceptFromDefinition interceptFrom() {
-        return builder.interceptFrom();
-    }
-
-    public InterceptFromDefinition interceptFrom(String uri) {
-        return builder.interceptFrom(uri);
-    }
-
-    public InterceptSendToEndpointDefinition interceptSendToEndpoint(String 
uri) {
-        return builder.interceptSendToEndpoint(uri);
-    }
-
-    public void errorHandler(ErrorHandlerFactory handler) {
-        builder.errorHandler(handler);
-    }
-
-    public Processor processor(Consumer<Exchange> consumer) {
-        return consumer::accept;
-    }
-}
diff --git 
a/dsl/camel-js-dsl/src/main/java/org/apache/camel/dsl/js/JavaScriptRoutesBuilderLoader.java
 
b/dsl/camel-js-dsl/src/main/java/org/apache/camel/dsl/js/JavaScriptRoutesBuilderLoader.java
deleted file mode 100644
index 9153a9706b0..00000000000
--- 
a/dsl/camel-js-dsl/src/main/java/org/apache/camel/dsl/js/JavaScriptRoutesBuilderLoader.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.dsl.js;
-
-import java.io.Reader;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.Experimental;
-import org.apache.camel.api.management.ManagedResource;
-import org.apache.camel.builder.endpoint.EndpointRouteBuilder;
-import org.apache.camel.endpointdsl.support.EndpointRouteBuilderLoaderSupport;
-import org.apache.camel.spi.annotations.RoutesLoader;
-import org.apache.camel.support.LifecycleStrategySupport;
-import org.apache.camel.util.FileUtil;
-import org.graalvm.polyglot.Context;
-import org.graalvm.polyglot.HostAccess;
-import org.graalvm.polyglot.PolyglotAccess;
-import org.graalvm.polyglot.Value;
-
-import static org.graalvm.polyglot.Source.newBuilder;
-
-@ManagedResource(description = "Managed JavaScriptRoutesBuilderLoader")
-@RoutesLoader(JavaScriptRoutesBuilderLoader.EXTENSION)
-@Experimental
-@Deprecated
-public class JavaScriptRoutesBuilderLoader extends 
EndpointRouteBuilderLoaderSupport {
-    public static final String EXTENSION = "js";
-    public static final String LANGUAGE_ID = "js";
-
-    public JavaScriptRoutesBuilderLoader() {
-        super(EXTENSION);
-    }
-
-    @Override
-    protected void doLoadEndpointRouteBuilder(Reader reader, 
EndpointRouteBuilder builder) {
-        final Context.Builder contextBuilder = Context.newBuilder(LANGUAGE_ID)
-                .allowHostAccess(HostAccess.ALL)
-                .allowExperimentalOptions(true)
-                .allowHostClassLookup(s -> true)
-                .allowPolyglotAccess(PolyglotAccess.NONE)
-                .allowIO(true)
-                .option("engine.WarnInterpreterOnly", "false");
-
-        final Context context = contextBuilder.build();
-        final Value bindings = context.getBindings(LANGUAGE_ID);
-        final String name = 
FileUtil.onlyName(builder.getResource().getLocation(), true) + "." + EXTENSION;
-
-        // configure bindings
-        bindings.putMember("__dsl", new JavaScriptDSL(builder));
-
-        //
-        // Expose JavaScriptDSL methods to global scope.
-        //
-        context.eval(
-                LANGUAGE_ID,
-                String.join(
-                        "\n",
-                        "Object.setPrototypeOf(globalThis, new 
Proxy(Object.prototype, {",
-                        "    has(target, key) {",
-                        "        return key in __dsl || key in target;",
-                        "    },",
-                        "    get(target, key, receiver) {",
-                        "        return Reflect.get((key in __dsl) ? __dsl : 
target, key, receiver);",
-                        "    }",
-                        "}));"));
-        //
-        // Run the script.
-        //
-        context.eval(
-                newBuilder(LANGUAGE_ID, reader, 
name).mimeType("application/javascript+module").buildLiteral());
-
-        //
-        // Close the polyglot context when the camel context stops
-        //
-        builder.getContext().addLifecycleStrategy(new 
LifecycleStrategySupport() {
-            @Override
-            public void onContextStopping(CamelContext camelContext) {
-                context.close(true);
-            }
-        });
-    }
-}
diff --git 
a/dsl/camel-js-dsl/src/test/java/org/apache/camel/dsl/js/JavaScriptRoutesBuilderLoaderTest.java
 
b/dsl/camel-js-dsl/src/test/java/org/apache/camel/dsl/js/JavaScriptRoutesBuilderLoaderTest.java
deleted file mode 100644
index 3451e103669..00000000000
--- 
a/dsl/camel-js-dsl/src/test/java/org/apache/camel/dsl/js/JavaScriptRoutesBuilderLoaderTest.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.dsl.js;
-
-import org.apache.camel.component.seda.SedaComponent;
-import org.apache.camel.impl.DefaultCamelContext;
-import org.apache.camel.model.FromDefinition;
-import org.apache.camel.model.ToDefinition;
-import org.apache.camel.model.TransformDefinition;
-import org.apache.camel.spi.Resource;
-import org.apache.camel.support.PluginHelper;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.ValueSource;
-
-import static org.assertj.core.api.Assertions.assertThat;
-
-public class JavaScriptRoutesBuilderLoaderTest {
-    @ParameterizedTest
-    @ValueSource(strings = {
-            "/routes/routes.js",
-            "/routes/routes-with-endpoint-dsl.js",
-    })
-    void routesCanBeLoaded(String location) throws Exception {
-        try (DefaultCamelContext context = new DefaultCamelContext()) {
-            Resource resource = 
PluginHelper.getResourceLoader(context).resolveResource(location);
-            PluginHelper.getRoutesLoader(context).loadRoutes(resource);
-
-            assertThat(context.getRouteDefinitions())
-                    .hasSize(1)
-                    .first()
-                    .satisfies(rd -> {
-                        
assertThat(rd.getInput().getEndpointUri()).matches("timer:.*tick");
-                        
assertThat(rd.getOutputs().get(0)).isInstanceOf(ToDefinition.class);
-                    });
-        }
-    }
-
-    @Test
-    void componentsCanBeCustomized() throws Exception {
-        try (DefaultCamelContext context = new DefaultCamelContext()) {
-            Resource resource = PluginHelper.getResourceLoader(context)
-                    
.resolveResource("/routes/routes-with-component-configuration.js");
-            PluginHelper.getRoutesLoader(context).loadRoutes(resource);
-
-            assertThat(context.getComponent("seda", 
SedaComponent.class)).satisfies(c -> {
-                assertThat(c.getQueueSize()).isEqualTo(1234);
-            });
-        }
-    }
-
-    @Test
-    void contextCanBeCustomized() throws Exception {
-        try (DefaultCamelContext context = new DefaultCamelContext()) {
-            Resource resource = PluginHelper.getResourceLoader(context)
-                    
.resolveResource("/routes/routes-with-context-configuration.js");
-            PluginHelper.getRoutesLoader(context).loadRoutes(resource);
-
-            assertThat(context.isTypeConverterStatisticsEnabled()).isTrue();
-        }
-    }
-
-    @Test
-    void processorsCanBeCreated() throws Exception {
-        try (DefaultCamelContext context = new DefaultCamelContext()) {
-            Resource resource = 
PluginHelper.getResourceLoader(context).resolveResource("/routes/routes-with-processors.js");
-            PluginHelper.getRoutesLoader(context).loadRoutes(resource);
-
-            context.start();
-
-            
assertThat(context.createFluentProducerTemplate().to("direct:arrow").request(String.class))
-                    .isEqualTo("arrow");
-            
assertThat(context.createFluentProducerTemplate().to("direct:wrapper").request(String.class))
-                    .isEqualTo("wrapper");
-            
assertThat(context.createFluentProducerTemplate().to("direct:function").request(String.class))
-                    .isEqualTo("function");
-        }
-    }
-
-    @Test
-    void restCanBeConfigured() throws Exception {
-        try (DefaultCamelContext context = new DefaultCamelContext()) {
-            Resource resource = PluginHelper.getResourceLoader(context)
-                    
.resolveResource("/routes/routes-with-rest-configuration.js");
-            PluginHelper.getRoutesLoader(context).loadRoutes(resource);
-
-            assertThat(context.getRestConfiguration()).satisfies(c -> {
-                assertThat(c.getComponent()).isEqualTo("undertow");
-                assertThat(c.getPort()).isEqualTo(1234);
-            });
-        }
-    }
-
-    @Test
-    void restDslCanBeDefined() throws Exception {
-        try (DefaultCamelContext context = new DefaultCamelContext()) {
-            Resource resource = 
PluginHelper.getResourceLoader(context).resolveResource("/routes/routes-with-rest-dsl.js");
-            PluginHelper.getRoutesLoader(context).loadRoutes(resource);
-
-            assertThat(context.getRestDefinitions()).hasSize(1);
-            // routes are inlined
-            assertThat(context.getRouteDefinitions()).hasSize(1);
-
-            assertThat(context.getRestDefinitions()).first().satisfies(d -> {
-                assertThat(d.getProduces()).isEqualTo("text/plain");
-                assertThat(d.getVerbs()).first().satisfies(v -> {
-                    assertThat(v.getPath()).isEqualTo("/say/hello");
-                });
-            });
-            assertThat(context.getRouteDefinitions()).first().satisfies(d -> {
-                assertThat(d.getInput()).isInstanceOf(FromDefinition.class);
-                
assertThat(d.getOutputs()).first().isInstanceOf(TransformDefinition.class);
-            });
-        }
-    }
-
-    @Test
-    void modulesCanBeImported() throws Exception {
-        try (DefaultCamelContext context = new DefaultCamelContext()) {
-            Resource resource = 
PluginHelper.getResourceLoader(context).resolveResource("/routes/routes-with-modules.js");
-            PluginHelper.getRoutesLoader(context).loadRoutes(resource);
-
-            assertThat(context.getRouteDefinitions()).hasSize(1);
-        }
-    }
-}
diff --git a/dsl/camel-js-dsl/src/test/resources/log4j2-test.properties 
b/dsl/camel-js-dsl/src/test/resources/log4j2-test.properties
deleted file mode 100644
index 10bac208940..00000000000
--- a/dsl/camel-js-dsl/src/test/resources/log4j2-test.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-##      http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-
-appender.file.type = File
-appender.file.name = file
-appender.file.fileName = target/camel-js-dsl-test.log
-appender.file.layout.type = PatternLayout
-appender.file.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
-
-appender.out.type = Console
-appender.out.name = out
-appender.out.layout.type = PatternLayout
-appender.out.layout.pattern = [%30.30t] %-30.30c{1} %-5p %m%n
-
-rootLogger.level = INFO
-rootLogger.appenderRef.file.ref = file
-#rootLogger.appenderRef.out.ref = out
diff --git a/dsl/camel-js-dsl/src/test/resources/module.js 
b/dsl/camel-js-dsl/src/test/resources/module.js
deleted file mode 100644
index 215be944e4e..00000000000
--- a/dsl/camel-js-dsl/src/test/resources/module.js
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-export const greeting = "Hello World!";
\ No newline at end of file
diff --git 
a/dsl/camel-js-dsl/src/test/resources/routes/routes-with-component-configuration.js
 
b/dsl/camel-js-dsl/src/test/resources/routes/routes-with-component-configuration.js
deleted file mode 100644
index c6174d94f64..00000000000
--- 
a/dsl/camel-js-dsl/src/test/resources/routes/routes-with-component-configuration.js
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-const SedaType = Java.type("org.apache.camel.component.seda.SedaComponent");
-
-const s = context.getComponent('seda', SedaType)
-s.setQueueSize(1234)
\ No newline at end of file
diff --git 
a/dsl/camel-js-dsl/src/test/resources/routes/routes-with-context-configuration.js
 
b/dsl/camel-js-dsl/src/test/resources/routes/routes-with-context-configuration.js
deleted file mode 100644
index 53817d73568..00000000000
--- 
a/dsl/camel-js-dsl/src/test/resources/routes/routes-with-context-configuration.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-context.setTypeConverterStatisticsEnabled(true)
\ No newline at end of file
diff --git 
a/dsl/camel-js-dsl/src/test/resources/routes/routes-with-endpoint-dsl.js 
b/dsl/camel-js-dsl/src/test/resources/routes/routes-with-endpoint-dsl.js
deleted file mode 100644
index eaf7eed0b0d..00000000000
--- a/dsl/camel-js-dsl/src/test/resources/routes/routes-with-endpoint-dsl.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-const f = timer("tick");
-const t = log("info");
-
-from(f)
-    .to(t);
\ No newline at end of file
diff --git a/dsl/camel-js-dsl/src/test/resources/routes/routes-with-modules.js 
b/dsl/camel-js-dsl/src/test/resources/routes/routes-with-modules.js
deleted file mode 100644
index 48e97a45827..00000000000
--- a/dsl/camel-js-dsl/src/test/resources/routes/routes-with-modules.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import { greeting } from "src/test/resources/module.js";
-
-from('timer:tick')
-    .to('log:info')
\ No newline at end of file
diff --git 
a/dsl/camel-js-dsl/src/test/resources/routes/routes-with-processors.js 
b/dsl/camel-js-dsl/src/test/resources/routes/routes-with-processors.js
deleted file mode 100644
index 64941bb3c20..00000000000
--- a/dsl/camel-js-dsl/src/test/resources/routes/routes-with-processors.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-const Processor = Java.type("org.apache.camel.Processor");
-const p = Java.extend(Processor);
-const f = new p(function(e) { e.getMessage().setBody('function') });
-const a = new p(e => { e.getMessage().setBody('arrow') });
-const w = processor(e => { e.getMessage().setBody('wrapper') });
-
-from('direct:function')
-    .process(f);
-
-from('direct:arrow')
-    .process(a);
-
-from('direct:wrapper')
-    .process(w);
-
diff --git 
a/dsl/camel-js-dsl/src/test/resources/routes/routes-with-rest-configuration.js 
b/dsl/camel-js-dsl/src/test/resources/routes/routes-with-rest-configuration.js
deleted file mode 100644
index d4a00ec2f37..00000000000
--- 
a/dsl/camel-js-dsl/src/test/resources/routes/routes-with-rest-configuration.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-const c = restConfiguration()
-c.setComponent('undertow')
-c.setPort('1234')
diff --git a/dsl/camel-js-dsl/src/test/resources/routes/routes-with-rest-dsl.js 
b/dsl/camel-js-dsl/src/test/resources/routes/routes-with-rest-dsl.js
deleted file mode 100644
index 7918418699b..00000000000
--- a/dsl/camel-js-dsl/src/test/resources/routes/routes-with-rest-dsl.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-rest('/')
-    .produces("text/plain")
-    .get('/say/hello')
-    .to('direct:hello');
-
-from('direct:hello')
-        .transform().constant("Hello World");
-
diff --git a/dsl/camel-js-dsl/src/test/resources/routes/routes.js 
b/dsl/camel-js-dsl/src/test/resources/routes/routes.js
deleted file mode 100644
index ceac9167cc0..00000000000
--- a/dsl/camel-js-dsl/src/test/resources/routes/routes.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-from('timer:tick')
-    .to('log:info')
\ No newline at end of file
diff --git 
a/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/DependencyDownloaderRoutesLoader.java
 
b/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/DependencyDownloaderRoutesLoader.java
index 9272fe3eee1..5f115b5c86f 100644
--- 
a/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/DependencyDownloaderRoutesLoader.java
+++ 
b/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/DependencyDownloaderRoutesLoader.java
@@ -64,8 +64,6 @@ public class DependencyDownloaderRoutesLoader extends 
DefaultRoutesLoader {
         } else if ("java".equals(extension)) {
             downloadLoader("camel-java-joor-dsl");
             downloadLoader("camel-endpointdsl");
-        } else if ("js".equals(extension)) {
-            downloadLoader("camel-js-dsl");
         } else if ("xml".equals(extension)
                 || "camel.xml".equals(extension)) {
             downloadLoader("camel-xml-io-dsl");
diff --git a/dsl/pom.xml b/dsl/pom.xml
index 5cb6e938494..c8b58eb2ef3 100644
--- a/dsl/pom.xml
+++ b/dsl/pom.xml
@@ -51,7 +51,6 @@
         <module>camel-xml-jaxb-dsl</module>
         <module>camel-xml-jaxb-dsl-test</module>
         <module>camel-yaml-dsl</module>
-        <module>camel-js-dsl</module>
         <module>camel-kamelet-main</module>
         <module>camel-jbang</module>
     </modules>
diff --git a/parent/pom.xml b/parent/pom.xml
index 567d355ddd7..53b58ffb8b6 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -2693,11 +2693,6 @@
                 <artifactId>camel-jbang-console</artifactId>
                 <version>${project.version}</version>
             </dependency>
-            <dependency>
-                <groupId>org.apache.camel</groupId>
-                <artifactId>camel-js-dsl</artifactId>
-                <version>${project.version}</version>
-            </dependency>
             <dependency>
                 <groupId>org.apache.camel</groupId>
                 <artifactId>camel-kamelet-main</artifactId>


Reply via email to