This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/master by this push: new 859dc72 Add configuration for quarkus:create-extension mojo new e822d08 Merge pull request #102 from ppalaga/190712-create-extension 859dc72 is described below commit 859dc724707e6227f2100a6cd9306e99d9d983ec Author: Peter Palaga <ppal...@redhat.com> AuthorDate: Fri Jul 12 08:50:26 2019 +0200 Add configuration for quarkus:create-extension mojo --- .../create-extension-templates/Processor.java | 15 ++++++++ .../create-extension-templates/deployment-pom.xml | 45 ++++++++++++++++++++++ .../create-extension-templates/parent-pom.xml | 21 ++++++++++ .../create-extension-templates/runtime-pom.xml | 44 +++++++++++++++++++++ extensions/pom.xml | 21 ++++++++++ 5 files changed, 146 insertions(+) diff --git a/extensions/create-extension-templates/Processor.java b/extensions/create-extension-templates/Processor.java new file mode 100644 index 0000000..c718431 --- /dev/null +++ b/extensions/create-extension-templates/Processor.java @@ -0,0 +1,15 @@ +package [=javaPackageBase].deployment; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.FeatureBuildItem; + +class [=artifactIdBaseCamelCase]Processor { + + private static final String FEATURE = "camel-[=artifactIdBase]"; + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } + +} diff --git a/extensions/create-extension-templates/deployment-pom.xml b/extensions/create-extension-templates/deployment-pom.xml new file mode 100644 index 0000000..188c181 --- /dev/null +++ b/extensions/create-extension-templates/deployment-pom.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?> +<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>[=groupId]</groupId> + <artifactId>[=artifactId]-parent</artifactId> + <version>[=version]</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <artifactId>[=artifactId]-deployment</artifactId> + <name>[=namePrefix][=nameBase][=nameSegmentDelimiter]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-[=artifactIdBase]</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>[=quarkusVersion]</version> + </path> + </annotationProcessorPaths> + </configuration> + </plugin> + </plugins> + </build> + +</project> diff --git a/extensions/create-extension-templates/parent-pom.xml b/extensions/create-extension-templates/parent-pom.xml new file mode 100644 index 0000000..cc69517 --- /dev/null +++ b/extensions/create-extension-templates/parent-pom.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<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>[=version]</version> + <relativePath>../../build-parent/pom.xml</relativePath> + </parent> + + <artifactId>[=artifactId]-parent</artifactId> + <name>[=namePrefix][=nameBase]</name> + <packaging>pom</packaging> + + <modules> + <module>deployment</module> + <module>runtime</module> + </modules> +</project> diff --git a/extensions/create-extension-templates/runtime-pom.xml b/extensions/create-extension-templates/runtime-pom.xml new file mode 100644 index 0000000..5429606 --- /dev/null +++ b/extensions/create-extension-templates/runtime-pom.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> +<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>[=groupId]</groupId> + <artifactId>[=artifactId]-parent</artifactId> + <version>[=version]</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <artifactId>[=artifactId]</artifactId> + <name>[=namePrefix][=nameBase][=nameSegmentDelimiter]Runtime</name> + + <dependencies> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-core</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>[=quarkusVersion]</version> + </path> + </annotationProcessorPaths> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/extensions/pom.xml b/extensions/pom.xml index ec9b594..c7555c8 100644 --- a/extensions/pom.xml +++ b/extensions/pom.xml @@ -53,4 +53,25 @@ <module>xml</module> </modules> + <build> + <plugins> + <plugin> + <groupId>io.quarkus</groupId> + <artifactId>quarkus-maven-plugin</artifactId> + <version>999-SNAPSHOT</version> + <inherited>false</inherited> + <!-- Setting for stubbing new extensions via + mvn quarkus:create-extension -N -Dquarkus.artifactIdBase=my-new-extension + --> + <configuration> + <artifactIdPrefix>camel-quarkus-</artifactIdPrefix> + <namePrefix xml:space="preserve">Camel Quarkus :: </namePrefix> + <nameSegmentDelimiter xml:space="preserve"> :: </nameSegmentDelimiter> + <javaPackageInfix>component</javaPackageInfix> + <templatesUriBase>file:create-extension-templates</templatesUriBase> + </configuration> + </plugin> + </plugins> + </build> + </project>