This is an automated email from the ASF dual-hosted git repository.
aldettinger pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/main by this push:
new a69d73d927 added camel-quarkus-javascript (#6369)
a69d73d927 is described below
commit a69d73d92778dbd5a1c5923cd468b40d5ba73c14
Author: mweissdigchg <[email protected]>
AuthorDate: Wed Aug 21 15:44:11 2024 +0200
added camel-quarkus-javascript (#6369)
---
catalog/pom.xml | 13 +++
docs/modules/ROOT/examples/languages/js.yml | 13 +++
docs/modules/ROOT/nav.adoc | 1 +
.../pages/reference/extensions/javascript.adoc | 41 +++++++++
extensions-jvm/javascript/deployment/pom.xml | 63 +++++++++++++
.../javascript/deployment/JavascriptProcessor.java | 46 ++++++++++
extensions-jvm/javascript/pom.xml | 39 ++++++++
extensions-jvm/javascript/runtime/pom.xml | 100 +++++++++++++++++++++
.../main/resources/META-INF/quarkus-extension.yaml | 33 +++++++
extensions-jvm/pom.xml | 1 +
integration-tests-jvm/javascript/pom.xml | 84 +++++++++++++++++
.../javascript/it/JavascriptResource.java | 50 +++++++++++
.../component/javascript/it/JavascriptTest.java | 34 +++++++
integration-tests-jvm/pom.xml | 1 +
poms/bom/pom.xml | 15 ++++
poms/bom/src/main/generated/flattened-full-pom.xml | 15 ++++
.../src/main/generated/flattened-reduced-pom.xml | 15 ++++
.../generated/flattened-reduced-verbose-pom.xml | 15 ++++
18 files changed, 579 insertions(+)
diff --git a/catalog/pom.xml b/catalog/pom.xml
index 7abd52b061..7aff46766d 100644
--- a/catalog/pom.xml
+++ b/catalog/pom.xml
@@ -1982,6 +1982,19 @@
</exclusion>
</exclusions>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-javascript</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-jaxb</artifactId>
diff --git a/docs/modules/ROOT/examples/languages/js.yml
b/docs/modules/ROOT/examples/languages/js.yml
new file mode 100644
index 0000000000..15261954d6
--- /dev/null
+++ b/docs/modules/ROOT/examples/languages/js.yml
@@ -0,0 +1,13 @@
+# Do not edit directly!
+# This file was generated by
camel-quarkus-maven-plugin:update-extension-doc-page
+cqArtifactId: camel-quarkus-javascript
+cqArtifactIdBase: javascript
+cqNativeSupported: false
+cqStatus: Preview
+cqDeprecated: false
+cqJvmSince: 3.14.0
+cqNativeSince: n/a
+cqCamelPartName: js
+cqCamelPartTitle: JavaScript
+cqCamelPartDescription: Evaluates a JavaScript expression.
+cqExtensionPageTitle: JavaScript
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index 6da7470cc0..1a6542a883 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -180,6 +180,7 @@
*** xref:reference/extensions/jacksonxml.adoc[JacksonXML]
*** xref:reference/extensions/jasypt.adoc[Jasypt]
*** xref:reference/extensions/java-joor-dsl.adoc[Java jOOR DSL]
+*** xref:reference/extensions/javascript.adoc[JavaScript]
*** xref:reference/extensions/js-dsl.adoc[JavaScript DSL]
*** xref:reference/extensions/jsh-dsl.adoc[JavaShell DSL]
*** xref:reference/extensions/jfr.adoc[Jfr]
diff --git a/docs/modules/ROOT/pages/reference/extensions/javascript.adoc
b/docs/modules/ROOT/pages/reference/extensions/javascript.adoc
new file mode 100644
index 0000000000..2c937598fe
--- /dev/null
+++ b/docs/modules/ROOT/pages/reference/extensions/javascript.adoc
@@ -0,0 +1,41 @@
+// Do not edit directly!
+// This file was generated by
camel-quarkus-maven-plugin:update-extension-doc-page
+[id="extensions-javascript"]
+= JavaScript
+:linkattrs:
+:cq-artifact-id: camel-quarkus-javascript
+:cq-native-supported: false
+:cq-status: Preview
+:cq-status-deprecation: Preview
+:cq-description: Evaluates a JavaScript expression.
+:cq-deprecated: false
+:cq-jvm-since: 3.14.0
+:cq-native-since: n/a
+
+ifeval::[{doc-show-badges} == true]
+[.badges]
+[.badge-key]##JVM since##[.badge-supported]##3.14.0##
[.badge-key]##Native##[.badge-unsupported]##unsupported##
+endif::[]
+
+Evaluates a JavaScript expression.
+
+[id="extensions-javascript-whats-inside"]
+== What's inside
+
+* xref:{cq-camel-components}:languages:js-language.adoc[JavaScript language]
+
+Please refer to the above link for usage and configuration details.
+
+[id="extensions-javascript-maven-coordinates"]
+== Maven coordinates
+
+[source,xml]
+----
+<dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-javascript</artifactId>
+</dependency>
+----
+ifeval::[{doc-show-user-guide-link} == true]
+Check the xref:user-guide/index.adoc[User guide] for more information about
writing Camel Quarkus applications.
+endif::[]
diff --git a/extensions-jvm/javascript/deployment/pom.xml
b/extensions-jvm/javascript/deployment/pom.xml
new file mode 100644
index 0000000000..d708d86627
--- /dev/null
+++ b/extensions-jvm/javascript/deployment/pom.xml
@@ -0,0 +1,63 @@
+<?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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-javascript-parent</artifactId>
+ <version>3.14.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-javascript-deployment</artifactId>
+ <name>Camel Quarkus :: JavaScript :: Deployment</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-core-deployment</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-javascript</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <annotationProcessorPaths>
+ <path>
+ <groupId>io.quarkus</groupId>
+
<artifactId>quarkus-extension-processor</artifactId>
+ <version>${quarkus.version}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git
a/extensions-jvm/javascript/deployment/src/main/java/org/apache/camel/quarkus/component/javascript/deployment/JavascriptProcessor.java
b/extensions-jvm/javascript/deployment/src/main/java/org/apache/camel/quarkus/component/javascript/deployment/JavascriptProcessor.java
new file mode 100644
index 0000000000..facad4b998
--- /dev/null
+++
b/extensions-jvm/javascript/deployment/src/main/java/org/apache/camel/quarkus/component/javascript/deployment/JavascriptProcessor.java
@@ -0,0 +1,46 @@
+/*
+ * 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.quarkus.component.javascript.deployment;
+
+import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.annotations.ExecutionTime;
+import io.quarkus.deployment.annotations.Record;
+import io.quarkus.deployment.builditem.FeatureBuildItem;
+import io.quarkus.deployment.pkg.steps.NativeOrNativeSourcesBuild;
+import org.apache.camel.quarkus.core.JvmOnlyRecorder;
+import org.jboss.logging.Logger;
+
+class JavascriptProcessor {
+
+ private static final Logger LOG =
Logger.getLogger(JavascriptProcessor.class);
+ private static final String FEATURE = "camel-javascript";
+
+ @BuildStep
+ FeatureBuildItem feature() {
+ return new FeatureBuildItem(FEATURE);
+ }
+
+ /**
+ * Remove this once this extension starts supporting the native mode.
+ */
+ @BuildStep(onlyIf = NativeOrNativeSourcesBuild.class)
+ @Record(value = ExecutionTime.RUNTIME_INIT)
+ void warnJvmInNative(JvmOnlyRecorder recorder) {
+ JvmOnlyRecorder.warnJvmInNative(LOG, FEATURE); // warn at build time
+ recorder.warnJvmInNative(FEATURE); // warn at runtime
+ }
+}
diff --git a/extensions-jvm/javascript/pom.xml
b/extensions-jvm/javascript/pom.xml
new file mode 100644
index 0000000000..1aae36ea01
--- /dev/null
+++ b/extensions-jvm/javascript/pom.xml
@@ -0,0 +1,39 @@
+<?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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-extensions-jvm</artifactId>
+ <version>3.14.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-javascript-parent</artifactId>
+ <name>Camel Quarkus :: JavaScript</name>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>deployment</module>
+ <module>runtime</module>
+ </modules>
+</project>
diff --git a/extensions-jvm/javascript/runtime/pom.xml
b/extensions-jvm/javascript/runtime/pom.xml
new file mode 100644
index 0000000000..b4b2c22a57
--- /dev/null
+++ b/extensions-jvm/javascript/runtime/pom.xml
@@ -0,0 +1,100 @@
+<?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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-javascript-parent</artifactId>
+ <version>3.14.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-javascript</artifactId>
+ <name>Camel Quarkus :: JavaScript :: Runtime</name>
+ <description>Evaluates a JavaScript expression.</description>
+
+ <properties>
+ <camel.quarkus.jvmSince>3.14.0</camel.quarkus.jvmSince>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-javascript</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-extension-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <annotationProcessorPaths>
+ <path>
+ <groupId>io.quarkus</groupId>
+
<artifactId>quarkus-extension-processor</artifactId>
+ <version>${quarkus.version}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+
+ <profiles>
+ <profile>
+ <id>full</id>
+ <activation>
+ <property>
+ <name>!quickly</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>update-extension-doc-page</id>
+ <goals>
+ <goal>update-extension-doc-page</goal>
+ </goals>
+ <phase>process-classes</phase>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
diff --git
a/extensions-jvm/javascript/runtime/src/main/resources/META-INF/quarkus-extension.yaml
b/extensions-jvm/javascript/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 0000000000..b5b586f95e
--- /dev/null
+++
b/extensions-jvm/javascript/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -0,0 +1,33 @@
+#
+# 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.
+#
+
+# This is a generated file. Do not edit directly!
+# To re-generate, run the following command from the top level directory:
+#
+# mvn -N cq:update-quarkus-metadata
+#
+---
+name: "Camel JavaScript"
+description: "Evaluates a JavaScript expression"
+metadata:
+ icon-url:
"https://raw.githubusercontent.com/apache/camel-website/main/antora-ui-camel/src/img/logo-d.svg"
+ unlisted: true
+ guide:
"https://camel.apache.org/camel-quarkus/latest/reference/extensions/javascript.html"
+ categories:
+ - "integration"
+ status:
+ - "preview"
diff --git a/extensions-jvm/pom.xml b/extensions-jvm/pom.xml
index f92e1141aa..6176020e0e 100644
--- a/extensions-jvm/pom.xml
+++ b/extensions-jvm/pom.xml
@@ -70,6 +70,7 @@
<module>iec60870</module>
<module>ignite</module>
<module>irc</module>
+ <module>javascript</module>
<module>jcr</module>
<module>jgroups</module>
<module>jgroups-raft</module>
diff --git a/integration-tests-jvm/javascript/pom.xml
b/integration-tests-jvm/javascript/pom.xml
new file mode 100644
index 0000000000..0649a91049
--- /dev/null
+++ b/integration-tests-jvm/javascript/pom.xml
@@ -0,0 +1,84 @@
+<?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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-build-parent-it</artifactId>
+ <version>3.14.0-SNAPSHOT</version>
+ <relativePath>../../poms/build-parent-it/pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-integration-test-javascript</artifactId>
+ <name>Camel Quarkus :: Integration Tests :: JavaScript</name>
+ <description>Integration tests for Camel Quarkus JavaScript
extension</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-javascript</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy</artifactId>
+ </dependency>
+
+ <!-- test dependencies -->
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-junit5</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>io.rest-assured</groupId>
+ <artifactId>rest-assured</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <id>virtualDependencies</id>
+ <activation>
+ <property>
+ <name>!noVirtualDependencies</name>
+ </property>
+ </activation>
+ <dependencies>
+ <!-- The following dependencies guarantee that this module is
built after them. You can update them by running `mvn process-resources
-Pformat -N` from the source tree root directory -->
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+
<artifactId>camel-quarkus-javascript-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+</project>
diff --git
a/integration-tests-jvm/javascript/src/main/java/org/apache/camel/quarkus/component/javascript/it/JavascriptResource.java
b/integration-tests-jvm/javascript/src/main/java/org/apache/camel/quarkus/component/javascript/it/JavascriptResource.java
new file mode 100644
index 0000000000..ca8a6c07ed
--- /dev/null
+++
b/integration-tests-jvm/javascript/src/main/java/org/apache/camel/quarkus/component/javascript/it/JavascriptResource.java
@@ -0,0 +1,50 @@
+/*
+ * 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.quarkus.component.javascript.it;
+
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.inject.Inject;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.Response;
+import org.apache.camel.CamelContext;
+import org.jboss.logging.Logger;
+
+@Path("/javascript")
+@ApplicationScoped
+public class JavascriptResource {
+
+ private static final Logger LOG =
Logger.getLogger(JavascriptResource.class);
+
+ private static final String LANGUAGE_JS = "js";
+ @Inject
+ CamelContext context;
+
+ @Path("/load/language/js")
+ @GET
+ @Produces(MediaType.TEXT_PLAIN)
+ public Response loadLanguageJs() throws Exception {
+ /* This is an autogenerated test */
+ if (context.resolveLanguage(LANGUAGE_JS) != null) {
+ return Response.ok().build();
+ }
+ LOG.warnf("Could not load [%s] from the Camel context", LANGUAGE_JS);
+ return Response.status(500, LANGUAGE_JS + " could not be loaded from
the Camel context").build();
+ }
+}
diff --git
a/integration-tests-jvm/javascript/src/test/java/org/apache/camel/quarkus/component/javascript/it/JavascriptTest.java
b/integration-tests-jvm/javascript/src/test/java/org/apache/camel/quarkus/component/javascript/it/JavascriptTest.java
new file mode 100644
index 0000000000..6d8e105175
--- /dev/null
+++
b/integration-tests-jvm/javascript/src/test/java/org/apache/camel/quarkus/component/javascript/it/JavascriptTest.java
@@ -0,0 +1,34 @@
+/*
+ * 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.quarkus.component.javascript.it;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import org.junit.jupiter.api.Test;
+
+@QuarkusTest
+class JavascriptTest {
+
+ @Test
+ public void loadLanguageJs() {
+ /* A simple autogenerated test */
+ RestAssured.get("/javascript/load/language/js")
+ .then()
+ .statusCode(200);
+ }
+
+}
diff --git a/integration-tests-jvm/pom.xml b/integration-tests-jvm/pom.xml
index 361ec20c2d..6cbf965539 100644
--- a/integration-tests-jvm/pom.xml
+++ b/integration-tests-jvm/pom.xml
@@ -69,6 +69,7 @@
<module>iec60870</module>
<module>ignite</module>
<module>irc</module>
+ <module>javascript</module>
<module>jcr</module>
<module>jgroups</module>
<module>jgroups-raft</module>
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index eba2b6d20b..16981ea32b 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -1556,6 +1556,11 @@
<artifactId>camel-java-joor-dsl</artifactId>
<version>${camel.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-javascript</artifactId>
+ <version>${camel.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jaxb</artifactId>
@@ -4386,6 +4391,16 @@
<artifactId>camel-quarkus-java-joor-dsl-deployment</artifactId>
<version>${camel-quarkus.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-javascript</artifactId>
+ <version>${camel-quarkus.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-javascript-deployment</artifactId>
+ <version>${camel-quarkus.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-jaxb</artifactId>
diff --git a/poms/bom/src/main/generated/flattened-full-pom.xml
b/poms/bom/src/main/generated/flattened-full-pom.xml
index 94fc628e7a..b669c4067d 100644
--- a/poms/bom/src/main/generated/flattened-full-pom.xml
+++ b/poms/bom/src/main/generated/flattened-full-pom.xml
@@ -1493,6 +1493,11 @@
<artifactId>camel-java-joor-dsl</artifactId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>4.7.0</version><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>camel-javascript</artifactId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <version>4.7.0</version><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<artifactId>camel-jaxb</artifactId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
@@ -4311,6 +4316,16 @@
<artifactId>camel-quarkus-java-joor-dsl-deployment</artifactId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>3.14.0-SNAPSHOT</version><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>camel-quarkus-javascript</artifactId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <version>3.14.0-SNAPSHOT</version><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>camel-quarkus-javascript-deployment</artifactId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <version>3.14.0-SNAPSHOT</version><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<artifactId>camel-quarkus-jaxb</artifactId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
diff --git a/poms/bom/src/main/generated/flattened-reduced-pom.xml
b/poms/bom/src/main/generated/flattened-reduced-pom.xml
index 617341ff68..d25ba5a9fa 100644
--- a/poms/bom/src/main/generated/flattened-reduced-pom.xml
+++ b/poms/bom/src/main/generated/flattened-reduced-pom.xml
@@ -1493,6 +1493,11 @@
<artifactId>camel-java-joor-dsl</artifactId>
<version>4.7.0</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-javascript</artifactId>
+ <version>4.7.0</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jaxb</artifactId>
@@ -4311,6 +4316,16 @@
<artifactId>camel-quarkus-java-joor-dsl-deployment</artifactId>
<version>3.14.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-javascript</artifactId>
+ <version>3.14.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-javascript-deployment</artifactId>
+ <version>3.14.0-SNAPSHOT</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-jaxb</artifactId>
diff --git a/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml
b/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml
index a0fb8d5f53..e16bbef347 100644
--- a/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml
+++ b/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml
@@ -1493,6 +1493,11 @@
<artifactId>camel-java-joor-dsl</artifactId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>4.7.0</version><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>camel-javascript</artifactId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <version>4.7.0</version><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<artifactId>camel-jaxb</artifactId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
@@ -4311,6 +4316,16 @@
<artifactId>camel-quarkus-java-joor-dsl-deployment</artifactId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>3.14.0-SNAPSHOT</version><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>camel-quarkus-javascript</artifactId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <version>3.14.0-SNAPSHOT</version><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>camel-quarkus-javascript-deployment</artifactId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <version>3.14.0-SNAPSHOT</version><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<artifactId>camel-quarkus-jaxb</artifactId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->