Skip to content

Commit

Permalink
Add configuration for quarkus:create-extension mojo
Browse files Browse the repository at this point in the history
  • Loading branch information
ppalaga committed Jul 12, 2019
1 parent 0e0d0b7 commit 8d8bf56
Show file tree
Hide file tree
Showing 5 changed files with 146 additions and 0 deletions.
15 changes: 15 additions & 0 deletions extensions/create-extension-templates/Processor.java
Original file line number Diff line number Diff line change
@@ -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);
}

}
45 changes: 45 additions & 0 deletions extensions/create-extension-templates/deployment-pom.xml
Original file line number Diff line number Diff line change
@@ -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>
21 changes: 21 additions & 0 deletions extensions/create-extension-templates/parent-pom.xml
Original file line number Diff line number Diff line change
@@ -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][=nameSegmentDelimiter]Parent</name>
<packaging>pom</packaging>

<modules>
<module>deployment</module>
<module>runtime</module>
</modules>
</project>
44 changes: 44 additions & 0 deletions extensions/create-extension-templates/runtime-pom.xml
Original file line number Diff line number Diff line change
@@ -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>
21 changes: 21 additions & 0 deletions extensions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,25 @@
<module>servlet</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>

0 comments on commit 8d8bf56

Please sign in to comment.