You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pp...@apache.org on 2020/03/21 17:46:48 UTC

[camel-quarkus] branch master updated (5a90273 -> a08df1e)

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

ppalaga pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git.


    from 5a90273  Merge pull request #935 from jamesnetherton/quartz-cron
     new 6043bd8  Fix #937 SAP NetWeaver support (JVM only)
     new d4efcf3  Fix #781 Groovy language support (JVM only)
     new a08df1e  Fix #410 OGNL language support (JVM only)

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../pages/list-of-camel-quarkus-extensions.adoc    | 14 ++++++++--
 .../groovy}/deployment/pom.xml                     |  8 +++---
 .../groovy/deployment/GroovyProcessor.java         |  6 ++---
 .../{pubnub => groovy}/integration-test/pom.xml    | 12 ++++-----
 .../component/groovy/it/GroovyResource.java}       | 20 +++++++--------
 .../quarkus/component/groovy/it/GroovyTest.java}   |  8 +++---
 extensions-jvm/{kudu => groovy}/pom.xml            |  4 +--
 extensions-jvm/{nitrite => groovy}/runtime/pom.xml | 10 ++++----
 .../main/resources/META-INF/quarkus-extension.yaml | 10 ++++----
 .../ognl}/deployment/pom.xml                       |  8 +++---
 .../component/ognl/deployment/OgnlProcessor.java   |  6 ++---
 .../{kudu => ognl}/integration-test/pom.xml        | 12 ++++-----
 .../quarkus/component/ognl/it/OgnlResource.java}   | 20 +++++++--------
 .../camel/quarkus/component/ognl/it/OgnlTest.java} |  8 +++---
 extensions-jvm/{kudu => ognl}/pom.xml              |  4 +--
 .../cron => extensions-jvm/ognl}/runtime/pom.xml   | 10 ++++----
 .../main/resources/META-INF/quarkus-extension.yaml | 10 ++++----
 extensions-jvm/pom.xml                             |  3 +++
 .../deployment/pom.xml                             | 12 ++++-----
 .../deployment/SapNetweaverProcessor.java}         |  6 ++---
 .../integration-test/pom.xml                       | 12 ++++-----
 .../sap/netweaver/it/SapNetweaverResource.java}    | 20 +++++++--------
 .../sap/netweaver/it/SapNetweaverTest.java}        |  8 +++---
 .../{cassandraql => sap-netweaver}/pom.xml         |  4 +--
 .../sap-netweaver}/runtime/pom.xml                 | 16 ++++++------
 .../main/resources/META-INF/quarkus-extension.yaml |  9 +++----
 poms/bom-deployment/pom.xml                        | 15 +++++++++++
 poms/bom/pom.xml                                   | 30 ++++++++++++++++++++++
 28 files changed, 181 insertions(+), 124 deletions(-)
 copy {extensions/cron => extensions-jvm/groovy}/deployment/pom.xml (91%)
 copy extensions/ahc/deployment/src/main/java/org/apache/camel/quarkus/component/ahc/deployment/AhcProcessor.java => extensions-jvm/groovy/deployment/src/main/java/org/apache/camel/quarkus/component/groovy/deployment/GroovyProcessor.java (87%)
 copy extensions-jvm/{pubnub => groovy}/integration-test/pom.xml (89%)
 copy extensions-jvm/{pubnub/integration-test/src/main/java/org/apache/camel/quarkus/component/pubnub/it/PubnubResource.java => groovy/integration-test/src/main/java/org/apache/camel/quarkus/component/groovy/it/GroovyResource.java} (72%)
 copy extensions-jvm/{kudu/integration-test/src/test/java/org/apache/camel/quarkus/component/kudu/it/KuduTest.java => groovy/integration-test/src/test/java/org/apache/camel/quarkus/component/groovy/it/GroovyTest.java} (86%)
 copy extensions-jvm/{kudu => groovy}/pom.xml (94%)
 copy extensions-jvm/{nitrite => groovy}/runtime/pom.xml (90%)
 copy extensions-jvm/{nitrite => groovy}/runtime/src/main/resources/META-INF/quarkus-extension.yaml (82%)
 copy {extensions/cron => extensions-jvm/ognl}/deployment/pom.xml (92%)
 copy extensions/csv/deployment/src/main/java/org/apache/camel/quarkus/component/csv/deployment/CsvProcessor.java => extensions-jvm/ognl/deployment/src/main/java/org/apache/camel/quarkus/component/ognl/deployment/OgnlProcessor.java (88%)
 copy extensions-jvm/{kudu => ognl}/integration-test/pom.xml (89%)
 copy extensions-jvm/{cassandraql/integration-test/src/main/java/org/apache/camel/quarkus/component/cassandraql/it/CassandraqlResource.java => ognl/integration-test/src/main/java/org/apache/camel/quarkus/component/ognl/it/OgnlResource.java} (74%)
 copy extensions-jvm/{kudu/integration-test/src/test/java/org/apache/camel/quarkus/component/kudu/it/KuduTest.java => ognl/integration-test/src/test/java/org/apache/camel/quarkus/component/ognl/it/OgnlTest.java} (86%)
 copy extensions-jvm/{kudu => ognl}/pom.xml (94%)
 copy {extensions/cron => extensions-jvm/ognl}/runtime/pom.xml (90%)
 copy extensions-jvm/{nitrite => ognl}/runtime/src/main/resources/META-INF/quarkus-extension.yaml (82%)
 copy extensions-jvm/{debezium-mysql => sap-netweaver}/deployment/pom.xml (87%)
 copy extensions-jvm/{openstack/deployment/src/main/java/org/apache/camel/quarkus/component/openstack/deployment/OpenstackProcessor.java => sap-netweaver/deployment/src/main/java/org/apache/camel/quarkus/component/sap/netweaver/deployment/SapNetweaverProcessor.java} (86%)
 copy extensions-jvm/{couchdb => sap-netweaver}/integration-test/pom.xml (86%)
 copy extensions-jvm/{cassandraql/integration-test/src/main/java/org/apache/camel/quarkus/component/cassandraql/it/CassandraqlResource.java => sap-netweaver/integration-test/src/main/java/org/apache/camel/quarkus/component/sap/netweaver/it/SapNetweaverResource.java} (69%)
 copy extensions-jvm/{cassandraql/integration-test/src/test/java/org/apache/camel/quarkus/component/cassandraql/it/CassandraqlTest.java => sap-netweaver/integration-test/src/test/java/org/apache/camel/quarkus/component/sap/netweaver/it/SapNetweaverTest.java} (83%)
 copy extensions-jvm/{cassandraql => sap-netweaver}/pom.xml (93%)
 copy {extensions/google-mail => extensions-jvm/sap-netweaver}/runtime/pom.xml (85%)
 copy extensions-jvm/{nitrite => sap-netweaver}/runtime/src/main/resources/META-INF/quarkus-extension.yaml (79%)


[camel-quarkus] 01/03: Fix #937 SAP NetWeaver support (JVM only)

Posted by pp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 6043bd809a405dc7eac86d328fa43f8c2ee4571f
Author: Peter Palaga <pp...@redhat.com>
AuthorDate: Sat Mar 21 11:22:44 2020 +0100

    Fix #937 SAP NetWeaver support (JVM only)
---
 .../pages/list-of-camel-quarkus-extensions.adoc    |  6 +-
 extensions-jvm/pom.xml                             |  1 +
 extensions-jvm/sap-netweaver/deployment/pom.xml    | 83 ++++++++++++++++++++
 .../deployment/SapNetweaverProcessor.java          | 31 ++++++++
 .../sap-netweaver/integration-test/pom.xml         | 82 +++++++++++++++++++
 .../sap/netweaver/it/SapNetweaverResource.java     | 51 ++++++++++++
 .../sap/netweaver/it/SapNetweaverTest.java         | 34 ++++++++
 extensions-jvm/sap-netweaver/pom.xml               | 40 ++++++++++
 extensions-jvm/sap-netweaver/runtime/pom.xml       | 91 ++++++++++++++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml | 28 +++++++
 poms/bom-deployment/pom.xml                        |  5 ++
 poms/bom/pom.xml                                   | 10 +++
 12 files changed, 461 insertions(+), 1 deletion(-)

diff --git a/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc b/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
index bd57221..bc20992 100644
--- a/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
+++ b/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
@@ -18,7 +18,7 @@ In case you are missing some Camel feature in the list:
 == Camel Components
 
 // components: START
-Number of Camel components: 105 in 87 JAR artifacts (0 deprecated)
+Number of Camel components: 106 in 88 JAR artifacts (0 deprecated)
 
 [width="100%",cols="4,1,1,5",options="header"]
 |===
@@ -369,6 +369,10 @@ Level | Since | Description
 `salesforce:operationName:topicName` | Native +
  Stable | 0.2.0 | The salesforce component is used for integrating Camel with the massive Salesforce API.
 
+| link:https://camel.apache.org/components/latest/sap-netweaver-component.html[SAP NetWeaver] (camel-quarkus-sap-netweaver) +
+`sap-netweaver:url` | JVM +
+ Preview | 1.0.0-M6 | The sap-netweaver component integrates with the SAP NetWeaver Gateway using HTTP transports.
+
 | link:https://camel.apache.org/components/latest/scheduler-component.html[Scheduler] (camel-quarkus-scheduler) +
 `scheduler:name` | Native +
  Stable | 0.4.0 | The scheduler component is used for generating message exchanges when a scheduler fires.
diff --git a/extensions-jvm/pom.xml b/extensions-jvm/pom.xml
index 77b8a2c..5a2e6e6 100644
--- a/extensions-jvm/pom.xml
+++ b/extensions-jvm/pom.xml
@@ -49,6 +49,7 @@
         <module>openstack</module>
         <module>pubnub</module>
         <module>rabbitmq</module>
+        <module>sap-netweaver</module>
     </modules>
 
 </project>
diff --git a/extensions-jvm/sap-netweaver/deployment/pom.xml b/extensions-jvm/sap-netweaver/deployment/pom.xml
new file mode 100644
index 0000000..38d3ea7
--- /dev/null
+++ b/extensions-jvm/sap-netweaver/deployment/pom.xml
@@ -0,0 +1,83 @@
+<?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-sap-netweaver-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-sap-netweaver-deployment</artifactId>
+    <name>Camel Quarkus :: SAP NetWeaver :: Deployment</name>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-bom-deployment</artifactId>
+                <version>${project.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <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-http-deployment</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-jackson-deployment</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-sap-netweaver</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/sap-netweaver/deployment/src/main/java/org/apache/camel/quarkus/component/sap/netweaver/deployment/SapNetweaverProcessor.java b/extensions-jvm/sap-netweaver/deployment/src/main/java/org/apache/camel/quarkus/component/sap/netweaver/deployment/SapNetweaverProcessor.java
new file mode 100644
index 0000000..62596dd
--- /dev/null
+++ b/extensions-jvm/sap-netweaver/deployment/src/main/java/org/apache/camel/quarkus/component/sap/netweaver/deployment/SapNetweaverProcessor.java
@@ -0,0 +1,31 @@
+/*
+ * 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.sap.netweaver.deployment;
+
+import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.builditem.FeatureBuildItem;
+
+class SapNetweaverProcessor {
+
+    private static final String FEATURE = "camel-sap-netweaver";
+
+    @BuildStep
+    FeatureBuildItem feature() {
+        return new FeatureBuildItem(FEATURE);
+    }
+
+}
diff --git a/extensions-jvm/sap-netweaver/integration-test/pom.xml b/extensions-jvm/sap-netweaver/integration-test/pom.xml
new file mode 100644
index 0000000..779f3b8
--- /dev/null
+++ b/extensions-jvm/sap-netweaver/integration-test/pom.xml
@@ -0,0 +1,82 @@
+<?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-sap-netweaver-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>camel-quarkus-sap-netweaver-integration-test</artifactId>
+    <name>Camel Quarkus :: SAP NetWeaver :: Integration Test</name>
+    <description>Integration tests for Camel Quarkus SAP NetWeaver extension</description>
+
+    <properties>
+        <!-- mvnd, a.k.a. Maven Daemon: https://github.com/gnodet/mvnd -->
+        <!-- The following rule tells mvnd to build the listed deployment modules before this module. -->
+        <!-- This is important because mvnd builds modules in parallel by default. The deployment modules are not -->
+        <!-- explicit dependencies of this module in the Maven sense, although they are required by the Quarkus Maven plugin. -->
+        <!-- Please update rule whenever you change the dependencies of this module by running -->
+        <!--     mvn process-resources -Pformat    from the root directory -->
+        <mvnd.builder.rule>camel-quarkus-sap-netweaver-deployment,camel-quarkus-support-policy-deployment</mvnd.builder.rule>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-sap-netweaver</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>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>io.quarkus</groupId>
+                <artifactId>quarkus-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>build</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/extensions-jvm/sap-netweaver/integration-test/src/main/java/org/apache/camel/quarkus/component/sap/netweaver/it/SapNetweaverResource.java b/extensions-jvm/sap-netweaver/integration-test/src/main/java/org/apache/camel/quarkus/component/sap/netweaver/it/SapNetweaverResource.java
new file mode 100644
index 0000000..e6fac41
--- /dev/null
+++ b/extensions-jvm/sap-netweaver/integration-test/src/main/java/org/apache/camel/quarkus/component/sap/netweaver/it/SapNetweaverResource.java
@@ -0,0 +1,51 @@
+/*
+ * 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.sap.netweaver.it;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.apache.camel.CamelContext;
+import org.jboss.logging.Logger;
+
+@Path("/sap-netweaver")
+@ApplicationScoped
+public class SapNetweaverResource {
+
+    private static final Logger LOG = Logger.getLogger(SapNetweaverResource.class);
+
+    private static final String COMPONENT_SAP_NETWEAVER = "sap-netweaver";
+    @Inject
+    CamelContext context;
+
+    @Path("/load/component/sap-netweaver")
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response loadComponentSapNetweaver() throws Exception {
+        /* This is an autogenerated test */
+        if (context.getComponent(COMPONENT_SAP_NETWEAVER) != null) {
+            return Response.ok().build();
+        }
+        LOG.warnf("Could not load [%s] from the Camel context", COMPONENT_SAP_NETWEAVER);
+        return Response.status(500, COMPONENT_SAP_NETWEAVER + " could not be loaded from the Camel context").build();
+    }
+}
diff --git a/extensions-jvm/sap-netweaver/integration-test/src/test/java/org/apache/camel/quarkus/component/sap/netweaver/it/SapNetweaverTest.java b/extensions-jvm/sap-netweaver/integration-test/src/test/java/org/apache/camel/quarkus/component/sap/netweaver/it/SapNetweaverTest.java
new file mode 100644
index 0000000..224d9e5
--- /dev/null
+++ b/extensions-jvm/sap-netweaver/integration-test/src/test/java/org/apache/camel/quarkus/component/sap/netweaver/it/SapNetweaverTest.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.sap.netweaver.it;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import org.junit.jupiter.api.Test;
+
+@QuarkusTest
+class SapNetweaverTest {
+
+    @Test
+    public void loadComponentSapNetweaver() {
+        /* A simple autogenerated test */
+        RestAssured.get("/sap-netweaver/load/component/sap-netweaver")
+                .then()
+                .statusCode(200);
+    }
+
+}
diff --git a/extensions-jvm/sap-netweaver/pom.xml b/extensions-jvm/sap-netweaver/pom.xml
new file mode 100644
index 0000000..4ca1f94
--- /dev/null
+++ b/extensions-jvm/sap-netweaver/pom.xml
@@ -0,0 +1,40 @@
+<?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</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../../poms/build-parent/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-sap-netweaver-parent</artifactId>
+    <name>Camel Quarkus :: SAP NetWeaver</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>deployment</module>
+        <module>runtime</module>
+        <module>integration-test</module>
+    </modules>
+</project>
diff --git a/extensions-jvm/sap-netweaver/runtime/pom.xml b/extensions-jvm/sap-netweaver/runtime/pom.xml
new file mode 100644
index 0000000..2407f0e
--- /dev/null
+++ b/extensions-jvm/sap-netweaver/runtime/pom.xml
@@ -0,0 +1,91 @@
+<?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-sap-netweaver-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-sap-netweaver</artifactId>
+    <name>Camel Quarkus :: SAP NetWeaver :: Runtime</name>
+    <description>The sap-netweaver component integrates with the SAP NetWeaver Gateway using HTTP transports.</description>
+
+    <properties>
+        <firstVersion>1.0.0-M6</firstVersion>
+    </properties>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-bom</artifactId>
+                <version>${project.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-http</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-jackson</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-sap-netweaver</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>io.quarkus</groupId>
+                <artifactId>quarkus-bootstrap-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>
+</project>
diff --git a/extensions-jvm/sap-netweaver/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions-jvm/sap-netweaver/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 0000000..02f860a
--- /dev/null
+++ b/extensions-jvm/sap-netweaver/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -0,0 +1,28 @@
+#
+# 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.
+#
+
+---
+name: "SAP NetWeaver"
+description: "The sap-netweaver component integrates with the SAP NetWeaver Gateway using HTTP transports."
+metadata:
+  unlisted: true
+  keywords:
+  - "sap"
+  guide: "https://camel.apache.org/components/latest/sap-netweaver-component.html"
+  categories:
+  - "integration"
+  status: "preview"
diff --git a/poms/bom-deployment/pom.xml b/poms/bom-deployment/pom.xml
index c89ac11..a416372 100644
--- a/poms/bom-deployment/pom.xml
+++ b/poms/bom-deployment/pom.xml
@@ -544,6 +544,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-sap-netweaver-deployment</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
                 <artifactId>camel-quarkus-scheduler-deployment</artifactId>
                 <version>${camel-quarkus.version}</version>
             </dependency>
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index 0382bee..7436396 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -697,6 +697,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel</groupId>
+                <artifactId>camel-sap-netweaver</artifactId>
+                <version>${camel.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel</groupId>
                 <artifactId>camel-scheduler</artifactId>
                 <version>${camel.version}</version>
             </dependency>
@@ -1335,6 +1340,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-sap-netweaver</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
                 <artifactId>camel-quarkus-scheduler</artifactId>
                 <version>${camel-quarkus.version}</version>
             </dependency>


[camel-quarkus] 03/03: Fix #410 OGNL language support (JVM only)

Posted by pp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit a08df1ea70e10f070d3625a2fef325bb0951f75d
Author: Peter Palaga <pp...@redhat.com>
AuthorDate: Sat Mar 21 11:49:07 2020 +0100

    Fix #410 OGNL language support (JVM only)
---
 .../pages/list-of-camel-quarkus-extensions.adoc    |  5 +-
 extensions-jvm/ognl/deployment/pom.xml             | 75 +++++++++++++++++++
 .../component/ognl/deployment/OgnlProcessor.java   | 31 ++++++++
 extensions-jvm/ognl/integration-test/pom.xml       | 82 +++++++++++++++++++++
 .../quarkus/component/ognl/it/OgnlResource.java    | 51 +++++++++++++
 .../camel/quarkus/component/ognl/it/OgnlTest.java  | 34 +++++++++
 extensions-jvm/ognl/pom.xml                        | 40 +++++++++++
 extensions-jvm/ognl/runtime/pom.xml                | 83 ++++++++++++++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml | 29 ++++++++
 extensions-jvm/pom.xml                             |  1 +
 poms/bom-deployment/pom.xml                        |  5 ++
 poms/bom/pom.xml                                   | 10 +++
 12 files changed, 445 insertions(+), 1 deletion(-)

diff --git a/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc b/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
index 0347564..9b39168 100644
--- a/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
+++ b/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
@@ -539,7 +539,7 @@ Level | Since | Description
 == Camel Languages
 
 // languages: START
-Number of Camel languages: 12 in 6 JAR artifacts (0 deprecated)
+Number of Camel languages: 13 in 7 JAR artifacts (0 deprecated)
 
 [width="100%",cols="4,1,1,5",options="header"]
 |===
@@ -567,6 +567,9 @@ Level | Since | Description
 | link:https://camel.apache.org/components/latest/jsonpath-language.html[JsonPath] (camel-quarkus-jsonpath) | Native +
  Stable | 1.0.0-M3 | To use JsonPath in Camel expressions or predicates.
 
+| link:https://camel.apache.org/components/latest/ognl-language.html[OGNL] (camel-quarkus-ognl) | JVM +
+ Preview | 1.0.0-M6 | To use OGNL scripts in Camel expressions or predicates.
+
 | link:https://camel.apache.org/components/latest/ref-language.html[Ref] (camel-quarkus-core) | Native +
  Stable | 0.2.0 | Reference to an existing Camel expression or predicate, which is looked up from the Camel registry.
 
diff --git a/extensions-jvm/ognl/deployment/pom.xml b/extensions-jvm/ognl/deployment/pom.xml
new file mode 100644
index 0000000..49c2641
--- /dev/null
+++ b/extensions-jvm/ognl/deployment/pom.xml
@@ -0,0 +1,75 @@
+<?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-ognl-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-ognl-deployment</artifactId>
+    <name>Camel Quarkus :: OGNL :: Deployment</name>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-bom-deployment</artifactId>
+                <version>${project.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <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-ognl</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/ognl/deployment/src/main/java/org/apache/camel/quarkus/component/ognl/deployment/OgnlProcessor.java b/extensions-jvm/ognl/deployment/src/main/java/org/apache/camel/quarkus/component/ognl/deployment/OgnlProcessor.java
new file mode 100644
index 0000000..7018d41
--- /dev/null
+++ b/extensions-jvm/ognl/deployment/src/main/java/org/apache/camel/quarkus/component/ognl/deployment/OgnlProcessor.java
@@ -0,0 +1,31 @@
+/*
+ * 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.ognl.deployment;
+
+import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.builditem.FeatureBuildItem;
+
+class OgnlProcessor {
+
+    private static final String FEATURE = "camel-ognl";
+
+    @BuildStep
+    FeatureBuildItem feature() {
+        return new FeatureBuildItem(FEATURE);
+    }
+
+}
diff --git a/extensions-jvm/ognl/integration-test/pom.xml b/extensions-jvm/ognl/integration-test/pom.xml
new file mode 100644
index 0000000..50b7cb9
--- /dev/null
+++ b/extensions-jvm/ognl/integration-test/pom.xml
@@ -0,0 +1,82 @@
+<?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-ognl-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>camel-quarkus-ognl-integration-test</artifactId>
+    <name>Camel Quarkus :: OGNL :: Integration Test</name>
+    <description>Integration tests for Camel Quarkus OGNL extension</description>
+
+    <properties>
+        <!-- mvnd, a.k.a. Maven Daemon: https://github.com/gnodet/mvnd -->
+        <!-- The following rule tells mvnd to build the listed deployment modules before this module. -->
+        <!-- This is important because mvnd builds modules in parallel by default. The deployment modules are not -->
+        <!-- explicit dependencies of this module in the Maven sense, although they are required by the Quarkus Maven plugin. -->
+        <!-- Please update rule whenever you change the dependencies of this module by running -->
+        <!--     mvn process-resources -Pformat    from the root directory -->
+        <mvnd.builder.rule>camel-quarkus-ognl-deployment,camel-quarkus-support-policy-deployment</mvnd.builder.rule>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-ognl</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>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>io.quarkus</groupId>
+                <artifactId>quarkus-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>build</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/extensions-jvm/ognl/integration-test/src/main/java/org/apache/camel/quarkus/component/ognl/it/OgnlResource.java b/extensions-jvm/ognl/integration-test/src/main/java/org/apache/camel/quarkus/component/ognl/it/OgnlResource.java
new file mode 100644
index 0000000..678a72c
--- /dev/null
+++ b/extensions-jvm/ognl/integration-test/src/main/java/org/apache/camel/quarkus/component/ognl/it/OgnlResource.java
@@ -0,0 +1,51 @@
+/*
+ * 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.ognl.it;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.apache.camel.CamelContext;
+import org.jboss.logging.Logger;
+
+@Path("/ognl")
+@ApplicationScoped
+public class OgnlResource {
+
+    private static final Logger LOG = Logger.getLogger(OgnlResource.class);
+
+    private static final String LANGUAGE_OGNL = "ognl";
+    @Inject
+    CamelContext context;
+
+    @Path("/load/language/ognl")
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response loadLanguageOgnl() throws Exception {
+        /* This is an autogenerated test */
+        if (context.resolveLanguage(LANGUAGE_OGNL) != null) {
+            return Response.ok().build();
+        }
+        LOG.warnf("Could not load [%s] from the Camel context", LANGUAGE_OGNL);
+        return Response.status(500, LANGUAGE_OGNL + " could not be loaded from the Camel context").build();
+    }
+}
diff --git a/extensions-jvm/ognl/integration-test/src/test/java/org/apache/camel/quarkus/component/ognl/it/OgnlTest.java b/extensions-jvm/ognl/integration-test/src/test/java/org/apache/camel/quarkus/component/ognl/it/OgnlTest.java
new file mode 100644
index 0000000..152c415
--- /dev/null
+++ b/extensions-jvm/ognl/integration-test/src/test/java/org/apache/camel/quarkus/component/ognl/it/OgnlTest.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.ognl.it;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import org.junit.jupiter.api.Test;
+
+@QuarkusTest
+class OgnlTest {
+
+    @Test
+    public void loadLanguageOgnl() {
+        /* A simple autogenerated test */
+        RestAssured.get("/ognl/load/language/ognl")
+                .then()
+                .statusCode(200);
+    }
+
+}
diff --git a/extensions-jvm/ognl/pom.xml b/extensions-jvm/ognl/pom.xml
new file mode 100644
index 0000000..cab2a98
--- /dev/null
+++ b/extensions-jvm/ognl/pom.xml
@@ -0,0 +1,40 @@
+<?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</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../../poms/build-parent/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-ognl-parent</artifactId>
+    <name>Camel Quarkus :: OGNL</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>deployment</module>
+        <module>runtime</module>
+        <module>integration-test</module>
+    </modules>
+</project>
diff --git a/extensions-jvm/ognl/runtime/pom.xml b/extensions-jvm/ognl/runtime/pom.xml
new file mode 100644
index 0000000..d38d2c2
--- /dev/null
+++ b/extensions-jvm/ognl/runtime/pom.xml
@@ -0,0 +1,83 @@
+<?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-ognl-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-ognl</artifactId>
+    <name>Camel Quarkus :: OGNL :: Runtime</name>
+    <description>To use OGNL scripts in Camel expressions or predicates.</description>
+
+    <properties>
+        <firstVersion>1.0.0-M6</firstVersion>
+    </properties>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-bom</artifactId>
+                <version>${project.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-ognl</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>io.quarkus</groupId>
+                <artifactId>quarkus-bootstrap-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>
+</project>
diff --git a/extensions-jvm/ognl/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions-jvm/ognl/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 0000000..831aebe
--- /dev/null
+++ b/extensions-jvm/ognl/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -0,0 +1,29 @@
+#
+# 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.
+#
+
+---
+name: "OGNL"
+description: "To use OGNL scripts in Camel expressions or predicates."
+metadata:
+  unlisted: true
+  keywords:
+  - "java"
+  - "language"
+  guide: "https://camel.apache.org/components/latest/ognl-language.html"
+  categories:
+  - "integration"
+  status: "preview"
diff --git a/extensions-jvm/pom.xml b/extensions-jvm/pom.xml
index 9b0ecb5..286dedd 100644
--- a/extensions-jvm/pom.xml
+++ b/extensions-jvm/pom.xml
@@ -47,6 +47,7 @@
         <module>kudu</module>
         <module>mongodb-gridfs</module>
         <module>nitrite</module>
+        <module>ognl</module>
         <module>openstack</module>
         <module>pubnub</module>
         <module>rabbitmq</module>
diff --git a/poms/bom-deployment/pom.xml b/poms/bom-deployment/pom.xml
index ff024bc..33e94d6 100644
--- a/poms/bom-deployment/pom.xml
+++ b/poms/bom-deployment/pom.xml
@@ -474,6 +474,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-ognl-deployment</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
                 <artifactId>camel-quarkus-olingo4-deployment</artifactId>
                 <version>${camel-quarkus.version}</version>
             </dependency>
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index a43cb52..2f92b51 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -610,6 +610,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel</groupId>
+                <artifactId>camel-ognl</artifactId>
+                <version>${camel.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel</groupId>
                 <artifactId>camel-olingo4</artifactId>
                 <version>${camel.version}</version>
                 <exclusions>
@@ -1270,6 +1275,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-ognl</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
                 <artifactId>camel-quarkus-olingo4</artifactId>
                 <version>${camel-quarkus.version}</version>
             </dependency>


[camel-quarkus] 02/03: Fix #781 Groovy language support (JVM only)

Posted by pp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit d4efcf3197fe204c2514934b6958abbaccd56320
Author: Peter Palaga <pp...@redhat.com>
AuthorDate: Sat Mar 21 11:45:05 2020 +0100

    Fix #781 Groovy language support (JVM only)
---
 .../pages/list-of-camel-quarkus-extensions.adoc    |  5 +-
 extensions-jvm/groovy/deployment/pom.xml           | 75 +++++++++++++++++++
 .../groovy/deployment/GroovyProcessor.java         | 31 ++++++++
 extensions-jvm/groovy/integration-test/pom.xml     | 82 +++++++++++++++++++++
 .../component/groovy/it/GroovyResource.java        | 51 +++++++++++++
 .../quarkus/component/groovy/it/GroovyTest.java    | 34 +++++++++
 extensions-jvm/groovy/pom.xml                      | 40 +++++++++++
 extensions-jvm/groovy/runtime/pom.xml              | 83 ++++++++++++++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml | 29 ++++++++
 extensions-jvm/pom.xml                             |  1 +
 poms/bom-deployment/pom.xml                        |  5 ++
 poms/bom/pom.xml                                   | 10 +++
 12 files changed, 445 insertions(+), 1 deletion(-)

diff --git a/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc b/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
index bc20992..0347564 100644
--- a/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
+++ b/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
@@ -539,7 +539,7 @@ Level | Since | Description
 == Camel Languages
 
 // languages: START
-Number of Camel languages: 11 in 5 JAR artifacts (0 deprecated)
+Number of Camel languages: 12 in 6 JAR artifacts (0 deprecated)
 
 [width="100%",cols="4,1,1,5",options="header"]
 |===
@@ -558,6 +558,9 @@ Level | Since | Description
 | link:https://camel.apache.org/components/latest/file-language.html[File] (camel-quarkus-core) | Native +
  Stable | 0.2.0 | For expressions and predicates using the file/simple language.
 
+| link:https://camel.apache.org/components/latest/groovy-language.html[Groovy] (camel-quarkus-groovy) | JVM +
+ Preview | 1.0.0-M6 | To use Groovy scripts in Camel expressions or predicates.
+
 | link:https://camel.apache.org/components/latest/header-language.html[Header] (camel-quarkus-core) | Native +
  Stable | 0.2.0 | To use a Camel Message header in expressions or predicates.
 
diff --git a/extensions-jvm/groovy/deployment/pom.xml b/extensions-jvm/groovy/deployment/pom.xml
new file mode 100644
index 0000000..5bca7c8
--- /dev/null
+++ b/extensions-jvm/groovy/deployment/pom.xml
@@ -0,0 +1,75 @@
+<?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-groovy-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-groovy-deployment</artifactId>
+    <name>Camel Quarkus :: Groovy :: Deployment</name>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-bom-deployment</artifactId>
+                <version>${project.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <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-groovy</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/groovy/deployment/src/main/java/org/apache/camel/quarkus/component/groovy/deployment/GroovyProcessor.java b/extensions-jvm/groovy/deployment/src/main/java/org/apache/camel/quarkus/component/groovy/deployment/GroovyProcessor.java
new file mode 100644
index 0000000..123fc0a
--- /dev/null
+++ b/extensions-jvm/groovy/deployment/src/main/java/org/apache/camel/quarkus/component/groovy/deployment/GroovyProcessor.java
@@ -0,0 +1,31 @@
+/*
+ * 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.groovy.deployment;
+
+import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.builditem.FeatureBuildItem;
+
+class GroovyProcessor {
+
+    private static final String FEATURE = "camel-groovy";
+
+    @BuildStep
+    FeatureBuildItem feature() {
+        return new FeatureBuildItem(FEATURE);
+    }
+
+}
diff --git a/extensions-jvm/groovy/integration-test/pom.xml b/extensions-jvm/groovy/integration-test/pom.xml
new file mode 100644
index 0000000..2913acb
--- /dev/null
+++ b/extensions-jvm/groovy/integration-test/pom.xml
@@ -0,0 +1,82 @@
+<?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-groovy-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>camel-quarkus-groovy-integration-test</artifactId>
+    <name>Camel Quarkus :: Groovy :: Integration Test</name>
+    <description>Integration tests for Camel Quarkus Groovy extension</description>
+
+    <properties>
+        <!-- mvnd, a.k.a. Maven Daemon: https://github.com/gnodet/mvnd -->
+        <!-- The following rule tells mvnd to build the listed deployment modules before this module. -->
+        <!-- This is important because mvnd builds modules in parallel by default. The deployment modules are not -->
+        <!-- explicit dependencies of this module in the Maven sense, although they are required by the Quarkus Maven plugin. -->
+        <!-- Please update rule whenever you change the dependencies of this module by running -->
+        <!--     mvn process-resources -Pformat    from the root directory -->
+        <mvnd.builder.rule>camel-quarkus-groovy-deployment,camel-quarkus-support-policy-deployment</mvnd.builder.rule>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-groovy</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>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>io.quarkus</groupId>
+                <artifactId>quarkus-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>build</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/extensions-jvm/groovy/integration-test/src/main/java/org/apache/camel/quarkus/component/groovy/it/GroovyResource.java b/extensions-jvm/groovy/integration-test/src/main/java/org/apache/camel/quarkus/component/groovy/it/GroovyResource.java
new file mode 100644
index 0000000..ffe67ff
--- /dev/null
+++ b/extensions-jvm/groovy/integration-test/src/main/java/org/apache/camel/quarkus/component/groovy/it/GroovyResource.java
@@ -0,0 +1,51 @@
+/*
+ * 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.groovy.it;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.apache.camel.CamelContext;
+import org.jboss.logging.Logger;
+
+@Path("/groovy")
+@ApplicationScoped
+public class GroovyResource {
+
+    private static final Logger LOG = Logger.getLogger(GroovyResource.class);
+
+    private static final String LANGUAGE_GROOVY = "groovy";
+    @Inject
+    CamelContext context;
+
+    @Path("/load/language/groovy")
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response loadLanguageGroovy() throws Exception {
+        /* This is an autogenerated test */
+        if (context.resolveLanguage(LANGUAGE_GROOVY) != null) {
+            return Response.ok().build();
+        }
+        LOG.warnf("Could not load [%s] from the Camel context", LANGUAGE_GROOVY);
+        return Response.status(500, LANGUAGE_GROOVY + " could not be loaded from the Camel context").build();
+    }
+}
diff --git a/extensions-jvm/groovy/integration-test/src/test/java/org/apache/camel/quarkus/component/groovy/it/GroovyTest.java b/extensions-jvm/groovy/integration-test/src/test/java/org/apache/camel/quarkus/component/groovy/it/GroovyTest.java
new file mode 100644
index 0000000..a5237ef
--- /dev/null
+++ b/extensions-jvm/groovy/integration-test/src/test/java/org/apache/camel/quarkus/component/groovy/it/GroovyTest.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.groovy.it;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import org.junit.jupiter.api.Test;
+
+@QuarkusTest
+class GroovyTest {
+
+    @Test
+    public void loadLanguageGroovy() {
+        /* A simple autogenerated test */
+        RestAssured.get("/groovy/load/language/groovy")
+                .then()
+                .statusCode(200);
+    }
+
+}
diff --git a/extensions-jvm/groovy/pom.xml b/extensions-jvm/groovy/pom.xml
new file mode 100644
index 0000000..4db83da
--- /dev/null
+++ b/extensions-jvm/groovy/pom.xml
@@ -0,0 +1,40 @@
+<?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</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../../poms/build-parent/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-groovy-parent</artifactId>
+    <name>Camel Quarkus :: Groovy</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>deployment</module>
+        <module>runtime</module>
+        <module>integration-test</module>
+    </modules>
+</project>
diff --git a/extensions-jvm/groovy/runtime/pom.xml b/extensions-jvm/groovy/runtime/pom.xml
new file mode 100644
index 0000000..da522e3
--- /dev/null
+++ b/extensions-jvm/groovy/runtime/pom.xml
@@ -0,0 +1,83 @@
+<?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-groovy-parent</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-groovy</artifactId>
+    <name>Camel Quarkus :: Groovy :: Runtime</name>
+    <description>To use Groovy scripts in Camel expressions or predicates.</description>
+
+    <properties>
+        <firstVersion>1.0.0-M6</firstVersion>
+    </properties>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-bom</artifactId>
+                <version>${project.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-groovy</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>io.quarkus</groupId>
+                <artifactId>quarkus-bootstrap-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>
+</project>
diff --git a/extensions-jvm/groovy/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions-jvm/groovy/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 0000000..5fe3523
--- /dev/null
+++ b/extensions-jvm/groovy/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -0,0 +1,29 @@
+#
+# 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.
+#
+
+---
+name: "Groovy"
+description: "To use Groovy scripts in Camel expressions or predicates."
+metadata:
+  unlisted: true
+  keywords:
+  - "language"
+  - "script"
+  guide: "https://camel.apache.org/components/latest/groovy-language.html"
+  categories:
+  - "integration"
+  status: "preview"
diff --git a/extensions-jvm/pom.xml b/extensions-jvm/pom.xml
index 5a2e6e6..9b0ecb5 100644
--- a/extensions-jvm/pom.xml
+++ b/extensions-jvm/pom.xml
@@ -42,6 +42,7 @@
         <module>debezium-postgres</module>
         <module>debezium-sqlserver</module>
         <module>elasticsearch-rest</module>
+        <module>groovy</module>
         <module>influxdb</module>
         <module>kudu</module>
         <module>mongodb-gridfs</module>
diff --git a/poms/bom-deployment/pom.xml b/poms/bom-deployment/pom.xml
index a416372..ff024bc 100644
--- a/poms/bom-deployment/pom.xml
+++ b/poms/bom-deployment/pom.xml
@@ -329,6 +329,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-groovy-deployment</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
                 <artifactId>camel-quarkus-gson-deployment</artifactId>
                 <version>${camel-quarkus.version}</version>
             </dependency>
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index 7436396..a43cb52 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -376,6 +376,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel</groupId>
+                <artifactId>camel-groovy</artifactId>
+                <version>${camel.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel</groupId>
                 <artifactId>camel-gson</artifactId>
                 <version>${camel.version}</version>
             </dependency>
@@ -1115,6 +1120,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-groovy</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
                 <artifactId>camel-quarkus-gson</artifactId>
                 <version>${camel-quarkus.version}</version>
             </dependency>