This is an automated email from the ASF dual-hosted git repository. jamesnetherton pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 9acaa96e5a07674c215828df10eccb246439dea4 Author: Peter Palaga <[email protected]> AuthorDate: Fri Feb 28 15:45:45 2020 +0100 Document the additionalRuntimeDependencies option of the Quarkus create-extension mojo --- docs/modules/ROOT/pages/contributor-guide.adoc | 3 +++ extensions/pom.xml | 2 +- extensions/zip-deflater/runtime/pom.xml | 2 +- .../quarkus/component/compression/it/CompressionRouteBuilder.java | 5 +++++ .../camel/quarkus/component/compression/it/CompressionTest.java | 2 +- tooling/create-extension-templates/runtime-pom.xml | 5 +++++ 6 files changed, 16 insertions(+), 3 deletions(-) diff --git a/docs/modules/ROOT/pages/contributor-guide.adoc b/docs/modules/ROOT/pages/contributor-guide.adoc index f551030..af65cb9 100644 --- a/docs/modules/ROOT/pages/contributor-guide.adoc +++ b/docs/modules/ROOT/pages/contributor-guide.adoc @@ -69,12 +69,15 @@ $ cd extensions $ mvn quarkus:create-extension -N \ -Dquarkus.artifactIdBase=foo-abc \ -Dquarkus.nameBase="Foo ABC" + -Dquarkus.additionalRuntimeDependencies="org.apache.camel:camel-@{quarkus.artifactIdBase}:@{$}{camel.version}" ---- + where: + * `foo-abc` is the unique part of the new extension's `artifactId` without the `camel-quarkus-` prefix * `Foo ABC` is the unique part of the artifact name without the `Camel Quarkus :: ` prefix +* `additionalRuntimeDependencies` adds the `org.apache.camel:camel-foo-abc` dependency to the runtime + BOM (Bill of Materials) and to the runtime module. + The `artifactId` and artifact `name` prefixes and suffixes are added automatically by the plugin. + diff --git a/extensions/pom.xml b/extensions/pom.xml index ad47205..caaec22 100644 --- a/extensions/pom.xml +++ b/extensions/pom.xml @@ -155,7 +155,7 @@ <!-- Settings for stubbing new extensions. E.g. to add a new extension to support an imaginary Camel Foo ABC component, you would run - mvn quarkus:create-extension -N -Dquarkus.artifactIdBase=foo-abc -Dquarkus.nameBase="Foo ABC" + mvn quarkus:create-extension -N -Dquarkus.artifactIdBase=foo-abc -Dquarkus.nameBase="Foo ABC" -Dquarkus.additionalRuntimeDependencies="org.apache.camel:camel-@{quarkus.artifactIdBase}:@{$}{camel.version}" -Dquarkus.nameBase is optional. If you do not specify it, the plugin will derive it from artifactIdBase by replacing dashes with spaces and capitalizing the first letter of each token. diff --git a/extensions/zip-deflater/runtime/pom.xml b/extensions/zip-deflater/runtime/pom.xml index 47a5a28..7a216af 100644 --- a/extensions/zip-deflater/runtime/pom.xml +++ b/extensions/zip-deflater/runtime/pom.xml @@ -30,7 +30,7 @@ <artifactId>camel-quarkus-zip-deflater</artifactId> <name>Camel Quarkus :: Zip Deflate Compression :: Runtime</name> - <description>Camel Zip deflater dataformat</description> + <description>Camel dataformat for Gzip and Zip marshalling and unmarshalling</description> <properties> <firstVersion>1.2.0</firstVersion> diff --git a/integration-tests/compression/src/main/java/org/apache/camel/quarkus/component/compression/it/CompressionRouteBuilder.java b/integration-tests/compression/src/main/java/org/apache/camel/quarkus/component/compression/it/CompressionRouteBuilder.java index c14e665..b5e2fab 100644 --- a/integration-tests/compression/src/main/java/org/apache/camel/quarkus/component/compression/it/CompressionRouteBuilder.java +++ b/integration-tests/compression/src/main/java/org/apache/camel/quarkus/component/compression/it/CompressionRouteBuilder.java @@ -30,5 +30,10 @@ public class CompressionRouteBuilder extends RouteBuilder { .marshal().zipDeflater(); from("direct:zip-deflater-uncompress") .unmarshal().zipDeflater(); + + from("direct:gzip-deflater-compress") + .marshal().gzipDeflater(); + from("direct:gzip-deflater-uncompress") + .unmarshal().gzipDeflater(); } } diff --git a/integration-tests/compression/src/test/java/org/apache/camel/quarkus/component/compression/it/CompressionTest.java b/integration-tests/compression/src/test/java/org/apache/camel/quarkus/component/compression/it/CompressionTest.java index 94514da..49c549e 100644 --- a/integration-tests/compression/src/test/java/org/apache/camel/quarkus/component/compression/it/CompressionTest.java +++ b/integration-tests/compression/src/test/java/org/apache/camel/quarkus/component/compression/it/CompressionTest.java @@ -31,7 +31,7 @@ class CompressionTest { final byte[] UNCOMPRESSED = "Hello World!".getBytes(StandardCharsets.UTF_8); private static Stream<String> listJsonDataFormatsToBeTested() { - return Stream.of("zipfile", "zip-deflater"); + return Stream.of("zipfile", "zip-deflater", "gzip-deflater"); } @ParameterizedTest diff --git a/tooling/create-extension-templates/runtime-pom.xml b/tooling/create-extension-templates/runtime-pom.xml index 5cffa5a..c3e8a56 100644 --- a/tooling/create-extension-templates/runtime-pom.xml +++ b/tooling/create-extension-templates/runtime-pom.xml @@ -52,6 +52,11 @@ <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-core</artifactId> </dependency> +[#list additionalRuntimeDependencies as gav] <dependency> + <groupId>[=gav.groupId]</groupId> + <artifactId>[=gav.artifactId]</artifactId> + </dependency> +[/#list] </dependencies> <build>
