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 6ccd2fbce0e28a9dcfc28e37477fd14b6e21072a Author: Peter Palaga <[email protected]> AuthorDate: Thu Mar 25 22:37:26 2021 +0100 dsl: support for groovy-dsl --- catalog/pom.xml | 26 +++++ docs/modules/ROOT/nav.adoc | 1 + .../pages/reference/extensions/groovy-dsl.adoc | 27 +++++ extensions-jvm/groovy-dsl/deployment/pom.xml | 61 ++++++++++++ .../dsl/groovy/deployment/GroovyDslProcessor.java | 37 +++++++ extensions-jvm/groovy-dsl/integration-test/pom.xml | 110 +++++++++++++++++++++ .../quarkus/dsl/groovy/GroovyDslResource.java | 60 +++++++++++ .../src/main/resources/application.properties | 21 ++++ .../src/main/resources/routes/my-routes.groovy | 19 ++++ .../camel/quarkus/dsl/groovy/GroovyDslTest.java | 49 +++++++++ extensions-jvm/groovy-dsl/pom.xml | 38 +++++++ extensions-jvm/groovy-dsl/runtime/pom.xml | 109 ++++++++++++++++++++ .../main/resources/META-INF/quarkus-extension.yaml | 32 ++++++ extensions-jvm/pom.xml | 1 + poms/bom/pom.xml | 15 +++ 15 files changed, 606 insertions(+) diff --git a/catalog/pom.xml b/catalog/pom.xml index 177990a..ef60a64 100644 --- a/catalog/pom.xml +++ b/catalog/pom.xml @@ -1557,6 +1557,19 @@ </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-groovy-dsl</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-grpc</artifactId> <version>${project.version}</version> <type>pom</type> @@ -2389,6 +2402,19 @@ </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-main</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-management</artifactId> <version>${project.version}</version> <type>pom</type> diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index 92584b6..7003859 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -131,6 +131,7 @@ *** xref:reference/extensions/graphql.adoc[GraphQL] *** xref:reference/extensions/grok.adoc[Grok] *** xref:reference/extensions/groovy.adoc[Groovy] +*** xref:reference/extensions/groovy-dsl.adoc[Groovy DSL] *** xref:reference/extensions/gson.adoc[Gson] *** xref:reference/extensions/guava-eventbus.adoc[Guava EventBus] *** xref:reference/extensions/hbase.adoc[HBase] diff --git a/docs/modules/ROOT/pages/reference/extensions/groovy-dsl.adoc b/docs/modules/ROOT/pages/reference/extensions/groovy-dsl.adoc new file mode 100644 index 0000000..390b897 --- /dev/null +++ b/docs/modules/ROOT/pages/reference/extensions/groovy-dsl.adoc @@ -0,0 +1,27 @@ +// Do not edit directly! +// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page += Groovy DSL +:cq-artifact-id: camel-quarkus-groovy-dsl +:cq-native-supported: false +:cq-status: Preview +:cq-description: Support for parsing Groovy route definitions at runtime +:cq-deprecated: false +:cq-jvm-since: 1.8.0 +:cq-native-since: n/a + +[.badges] +[.badge-key]##JVM since##[.badge-supported]##1.8.0## [.badge-key]##Native##[.badge-unsupported]##unsupported## + +Support for parsing Groovy route definitions at runtime + +== Maven coordinates + +[source,xml] +---- +<dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-groovy-dsl</artifactId> +</dependency> +---- + +Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications. diff --git a/extensions-jvm/groovy-dsl/deployment/pom.xml b/extensions-jvm/groovy-dsl/deployment/pom.xml new file mode 100644 index 0000000..8cf5b88 --- /dev/null +++ b/extensions-jvm/groovy-dsl/deployment/pom.xml @@ -0,0 +1,61 @@ +<?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-dsl-parent</artifactId> + <version>1.8.0-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <artifactId>camel-quarkus-groovy-dsl-deployment</artifactId> + <name>Camel Quarkus :: Groovy DSL :: 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-groovy-dsl</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-dsl/deployment/src/main/java/org/apache/camel/quarkus/dsl/groovy/deployment/GroovyDslProcessor.java b/extensions-jvm/groovy-dsl/deployment/src/main/java/org/apache/camel/quarkus/dsl/groovy/deployment/GroovyDslProcessor.java new file mode 100644 index 0000000..de170e8 --- /dev/null +++ b/extensions-jvm/groovy-dsl/deployment/src/main/java/org/apache/camel/quarkus/dsl/groovy/deployment/GroovyDslProcessor.java @@ -0,0 +1,37 @@ +/* + * 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.dsl.groovy.deployment; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.FeatureBuildItem; +import io.quarkus.deployment.pkg.steps.NativeBuild; + +public class GroovyDslProcessor { + private static final String FEATURE = "camel-groovy-dsl"; + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } + + @BuildStep(onlyIf = NativeBuild.class) + void nativeUnsupported() { + throw new RuntimeException("The " + FEATURE + " extension is not supported in native mode " + + "as loading Groovy code at runtime is not supported on GraalVM"); + } +} diff --git a/extensions-jvm/groovy-dsl/integration-test/pom.xml b/extensions-jvm/groovy-dsl/integration-test/pom.xml new file mode 100644 index 0000000..a51f350 --- /dev/null +++ b/extensions-jvm/groovy-dsl/integration-test/pom.xml @@ -0,0 +1,110 @@ +<?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>1.8.0-SNAPSHOT</version> + <relativePath>../../../poms/build-parent-it/pom.xml</relativePath> + </parent> + + <artifactId>camel-quarkus-groovy-dsl-integration-test</artifactId> + <name>Camel Quarkus :: Groovy DSL :: Integration Test</name> + <description>Integration tests for Camel Groovy DSL extension</description> + + <dependencies> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-main</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-groovy-dsl</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-direct</artifactId> + </dependency> + <dependency> + <groupId>io.quarkus</groupId> + <artifactId>quarkus-resteasy-jsonb</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> + <dependency> + <groupId>org.assertj</groupId> + <artifactId>assertj-core</artifactId> + <scope>test</scope> + </dependency> + + <!-- 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-direct-deployment</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-groovy-dsl-deployment</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-main-deployment</artifactId> + <version>${project.version}</version> + <type>pom</type> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>*</groupId> + <artifactId>*</artifactId> + </exclusion> + </exclusions> + </dependency> + </dependencies> + +</project> diff --git a/extensions-jvm/groovy-dsl/integration-test/src/main/java/org/apache/camel/quarkus/dsl/groovy/GroovyDslResource.java b/extensions-jvm/groovy-dsl/integration-test/src/main/java/org/apache/camel/quarkus/dsl/groovy/GroovyDslResource.java new file mode 100644 index 0000000..6ccb0cb --- /dev/null +++ b/extensions-jvm/groovy-dsl/integration-test/src/main/java/org/apache/camel/quarkus/dsl/groovy/GroovyDslResource.java @@ -0,0 +1,60 @@ +/* + * 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.dsl.groovy; + +import javax.enterprise.context.ApplicationScoped; +import javax.inject.Inject; +import javax.json.Json; +import javax.json.JsonArrayBuilder; +import javax.json.JsonObject; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; + +import org.apache.camel.ExtendedCamelContext; +import org.apache.camel.dsl.groovy.GroovyRoutesBuilderLoader; +import org.apache.camel.quarkus.main.CamelMain; +import org.apache.camel.spi.RoutesBuilderLoader; + +@Path("/test") +@ApplicationScoped +public class GroovyDslResource { + @Inject + CamelMain main; + + @Path("/main/describe") + @GET + @Produces(MediaType.APPLICATION_JSON) + public JsonObject describeMain() { + final ExtendedCamelContext camelContext = main.getCamelContext().adapt(ExtendedCamelContext.class); + + JsonArrayBuilder routeBuilders = Json.createArrayBuilder(); + main.configure().getRoutesBuilders().forEach(builder -> routeBuilders.add(builder.getClass().getName())); + + JsonArrayBuilder routes = Json.createArrayBuilder(); + main.getCamelContext().getRoutes().forEach(route -> routes.add(route.getId())); + + return Json.createObjectBuilder() + .add("routes-builder-loader", + camelContext.getBootstrapFactoryFinder(RoutesBuilderLoader.FACTORY_PATH) + .findClass(GroovyRoutesBuilderLoader.EXTENSION).get().getName()) + .add("routeBuilders", routeBuilders) + .add("routes", routes) + .build(); + } +} diff --git a/extensions-jvm/groovy-dsl/integration-test/src/main/resources/application.properties b/extensions-jvm/groovy-dsl/integration-test/src/main/resources/application.properties new file mode 100644 index 0000000..2d233c8 --- /dev/null +++ b/extensions-jvm/groovy-dsl/integration-test/src/main/resources/application.properties @@ -0,0 +1,21 @@ +## --------------------------------------------------------------------------- +## 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. +## --------------------------------------------------------------------------- + +# +# Main +# +camel.main.routes-include-pattern = classpath:routes/my-routes.groovy diff --git a/extensions-jvm/groovy-dsl/integration-test/src/main/resources/routes/my-routes.groovy b/extensions-jvm/groovy-dsl/integration-test/src/main/resources/routes/my-routes.groovy new file mode 100644 index 0000000..f0136d0 --- /dev/null +++ b/extensions-jvm/groovy-dsl/integration-test/src/main/resources/routes/my-routes.groovy @@ -0,0 +1,19 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +from('direct:start') + .id('my-groovy-route') + .log('Hello Groovy !!!') \ No newline at end of file diff --git a/extensions-jvm/groovy-dsl/integration-test/src/test/java/org/apache/camel/quarkus/dsl/groovy/GroovyDslTest.java b/extensions-jvm/groovy-dsl/integration-test/src/test/java/org/apache/camel/quarkus/dsl/groovy/GroovyDslTest.java new file mode 100644 index 0000000..67fca5a --- /dev/null +++ b/extensions-jvm/groovy-dsl/integration-test/src/test/java/org/apache/camel/quarkus/dsl/groovy/GroovyDslTest.java @@ -0,0 +1,49 @@ +/* + * 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.dsl.groovy; + +import javax.ws.rs.core.MediaType; + +import io.quarkus.test.junit.QuarkusTest; +import io.restassured.RestAssured; +import io.restassured.path.json.JsonPath; +import org.apache.camel.dsl.groovy.GroovyRoutesBuilderLoader; +import org.junit.jupiter.api.Test; + +import static org.assertj.core.api.Assertions.assertThat; + +@QuarkusTest +public class GroovyDslTest { + @Test + public void testMainInstanceWithJavaRoutes() { + JsonPath p = RestAssured.given() + .accept(MediaType.APPLICATION_JSON) + .get("/test/main/describe") + .then() + .statusCode(200) + .extract() + .body() + .jsonPath(); + + assertThat(p.getString("routes-builder-loader")) + .isEqualTo(GroovyRoutesBuilderLoader.class.getName()); + assertThat(p.getList("routeBuilders", String.class)) + .isEmpty(); + assertThat(p.getList("routes", String.class)) + .contains("my-groovy-route"); + } +} diff --git a/extensions-jvm/groovy-dsl/pom.xml b/extensions-jvm/groovy-dsl/pom.xml new file mode 100644 index 0000000..74cea22 --- /dev/null +++ b/extensions-jvm/groovy-dsl/pom.xml @@ -0,0 +1,38 @@ +<?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.8.0-SNAPSHOT</version> + <relativePath>../../poms/build-parent/pom.xml</relativePath> + </parent> + + <artifactId>camel-quarkus-groovy-dsl-parent</artifactId> + <name>Camel Quarkus :: Groovy DSL</name> + <packaging>pom</packaging> + + <modules> + <module>deployment</module> + <module>runtime</module> + <module>integration-test</module> + </modules> +</project> diff --git a/extensions-jvm/groovy-dsl/runtime/pom.xml b/extensions-jvm/groovy-dsl/runtime/pom.xml new file mode 100644 index 0000000..3e8ae7e --- /dev/null +++ b/extensions-jvm/groovy-dsl/runtime/pom.xml @@ -0,0 +1,109 @@ +<?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-dsl-parent</artifactId> + <version>1.8.0-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <artifactId>camel-quarkus-groovy-dsl</artifactId> + <name>Camel Quarkus :: Groovy DSL :: Runtime</name> + <description>Support for parsing Groovy route definitions at runtime</description> + + <properties> + <camel.quarkus.jvmSince>1.8.0</camel.quarkus.jvmSince> + </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-dsl</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> + + <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/groovy-dsl/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions-jvm/groovy-dsl/runtime/src/main/resources/META-INF/quarkus-extension.yaml new file mode 100644 index 0000000..0635a7e --- /dev/null +++ b/extensions-jvm/groovy-dsl/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -0,0 +1,32 @@ +# +# 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 Groovy DSL" +description: "Support for parsing Groovy route definitions at runtime" +metadata: + unlisted: true + guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/groovy-dsl.html" + categories: + - "integration" + status: + - "preview" diff --git a/extensions-jvm/pom.xml b/extensions-jvm/pom.xml index 2a278a0..83805fc 100644 --- a/extensions-jvm/pom.xml +++ b/extensions-jvm/pom.xml @@ -65,6 +65,7 @@ <module>flink</module> <module>ganglia</module> <module>groovy</module> + <module>groovy-dsl</module> <module>guava-eventbus</module> <module>hbase</module> <module>hdfs</module> diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml index c6df7a8..cbefde3 100644 --- a/poms/bom/pom.xml +++ b/poms/bom/pom.xml @@ -927,6 +927,11 @@ </dependency> <dependency> <groupId>org.apache.camel</groupId> + <artifactId>camel-groovy-dsl</artifactId> + <version>${camel.version}</version> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> <artifactId>camel-grpc</artifactId> <version>${camel.version}</version> </dependency> @@ -3297,6 +3302,16 @@ </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-groovy-dsl</artifactId> + <version>${camel-quarkus.version}</version> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-groovy-dsl-deployment</artifactId> + <version>${camcamel-quarkus.version}</version> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-grpc</artifactId> <version>${camel-quarkus.version}</version> </dependency>
