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

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git


The following commit(s) were added to refs/heads/main by this push:
     new 067619d4e62 Include dsl-starter in spring boot catalog
067619d4e62 is described below

commit 067619d4e62b3be676641bf714cb1051740c51f2
Author: Claus Ibsen <[email protected]>
AuthorDate: Sat Jun 18 10:55:19 2022 +0200

    Include dsl-starter in spring boot catalog
---
 .../apache/camel/springboot/catalog/others.properties |  9 +++++++++
 .../camel/springboot/catalog/others/componentdsl.json | 15 +++++++++++++++
 .../camel/springboot/catalog/others/endpointdsl.json  | 15 +++++++++++++++
 .../camel/springboot/catalog/others/groovy-dsl.json   | 15 +++++++++++++++
 .../springboot/catalog/others/java-joor-dsl.json      | 15 +++++++++++++++
 .../camel/springboot/catalog/others/js-dsl.json       | 15 +++++++++++++++
 .../camel/springboot/catalog/others/jsh-dsl.json      | 15 +++++++++++++++
 .../camel/springboot/catalog/others/kotlin-dsl.json   | 15 +++++++++++++++
 .../camel/springboot/catalog/others/xml-io-dsl.json   | 15 +++++++++++++++
 .../camel/springboot/catalog/others/xml-jaxb-dsl.json | 15 +++++++++++++++
 dsl-starter/pom.xml                                   | 19 +++++++++++++++++++
 .../springboot/maven/AbstractSpringBootGenerator.java |  7 ++++++-
 .../maven/PrepareCatalogSpringBootMojo.java           | 14 ++++++++------
 .../maven/SpringBootAutoConfigurationMojo.java        | 14 ++++++++------
 14 files changed, 185 insertions(+), 13 deletions(-)

diff --git 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others.properties
 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others.properties
index bed3905ce23..ce284d9d180 100644
--- 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others.properties
+++ 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others.properties
@@ -1,15 +1,22 @@
 aws-xray
 caffeine-lrucache
 cloudevents
+componentdsl
 console
 core-engine
 csimple-joor
 cxf-transport
 debug
+endpointdsl
 etcd3
+groovy-dsl
 jasypt
+java-joor-dsl
 jfr
 jq
+js-dsl
+jsh-dsl
+kotlin-dsl
 leveldb
 lra
 management
@@ -23,4 +30,6 @@ shiro
 spring-security
 swagger-java
 undertow-spring-security
+xml-io-dsl
+xml-jaxb-dsl
 zipkin
\ No newline at end of file
diff --git 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others/componentdsl.json
 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others/componentdsl.json
new file mode 100644
index 00000000000..3260705b64e
--- /dev/null
+++ 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others/componentdsl.json
@@ -0,0 +1,15 @@
+{
+  "other": {
+    "kind": "other",
+    "name": "componentdsl",
+    "title": "Java Component DSL",
+    "description": "The Camel Component DSL",
+    "deprecated": false,
+    "firstVersion": "3.1.0",
+    "label": "dsl",
+    "supportLevel": "Stable",
+    "groupId": "org.apache.camel.springboot",
+    "artifactId": "camel-componentdsl-starter",
+    "version": "3.18.0-SNAPSHOT"
+  }
+}
diff --git 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others/endpointdsl.json
 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others/endpointdsl.json
new file mode 100644
index 00000000000..bbf43dedeeb
--- /dev/null
+++ 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others/endpointdsl.json
@@ -0,0 +1,15 @@
+{
+  "other": {
+    "kind": "other",
+    "name": "endpointdsl",
+    "title": "Java Endpoint DSL",
+    "description": "The Camel Endpoint DSL",
+    "deprecated": false,
+    "firstVersion": "3.0.0",
+    "label": "dsl",
+    "supportLevel": "Stable",
+    "groupId": "org.apache.camel.springboot",
+    "artifactId": "camel-endpointdsl-starter",
+    "version": "3.18.0-SNAPSHOT"
+  }
+}
diff --git 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others/groovy-dsl.json
 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others/groovy-dsl.json
new file mode 100644
index 00000000000..05856fb7ddb
--- /dev/null
+++ 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others/groovy-dsl.json
@@ -0,0 +1,15 @@
+{
+  "other": {
+    "kind": "other",
+    "name": "groovy-dsl",
+    "title": "Groovy Dsl",
+    "description": "Camel DSL with Groovy",
+    "deprecated": false,
+    "firstVersion": "3.9.0",
+    "label": "dsl",
+    "supportLevel": "Experimental",
+    "groupId": "org.apache.camel.springboot",
+    "artifactId": "camel-groovy-dsl-starter",
+    "version": "3.18.0-SNAPSHOT"
+  }
+}
diff --git 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others/java-joor-dsl.json
 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others/java-joor-dsl.json
new file mode 100644
index 00000000000..32743f1c437
--- /dev/null
+++ 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others/java-joor-dsl.json
@@ -0,0 +1,15 @@
+{
+  "other": {
+    "kind": "other",
+    "name": "java-joor-dsl",
+    "title": "Java DSL (runtime compiled)",
+    "description": "Camel Java DSL with jOOR",
+    "deprecated": false,
+    "firstVersion": "3.9.0",
+    "label": "dsl",
+    "supportLevel": "Stable",
+    "groupId": "org.apache.camel.springboot",
+    "artifactId": "camel-java-joor-dsl-starter",
+    "version": "3.18.0-SNAPSHOT"
+  }
+}
diff --git 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others/js-dsl.json
 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others/js-dsl.json
new file mode 100644
index 00000000000..9bad0096045
--- /dev/null
+++ 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others/js-dsl.json
@@ -0,0 +1,15 @@
+{
+  "other": {
+    "kind": "other",
+    "name": "js-dsl",
+    "title": "JavaScript DSL",
+    "description": "Camel DSL with JavaScript",
+    "deprecated": false,
+    "firstVersion": "3.9.0",
+    "label": "dsl",
+    "supportLevel": "Experimental",
+    "groupId": "org.apache.camel.springboot",
+    "artifactId": "camel-js-dsl-starter",
+    "version": "3.18.0-SNAPSHOT"
+  }
+}
diff --git 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others/jsh-dsl.json
 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others/jsh-dsl.json
new file mode 100644
index 00000000000..b6a84686add
--- /dev/null
+++ 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others/jsh-dsl.json
@@ -0,0 +1,15 @@
+{
+  "other": {
+    "kind": "other",
+    "name": "jsh-dsl",
+    "title": "JavaShell DSL",
+    "description": "Camel DSL with JavaShell",
+    "deprecated": false,
+    "firstVersion": "3.15.0",
+    "label": "dsl",
+    "supportLevel": "Experimental",
+    "groupId": "org.apache.camel.springboot",
+    "artifactId": "camel-jsh-dsl-starter",
+    "version": "3.18.0-SNAPSHOT"
+  }
+}
diff --git 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others/kotlin-dsl.json
 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others/kotlin-dsl.json
new file mode 100644
index 00000000000..dc11e60bc73
--- /dev/null
+++ 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others/kotlin-dsl.json
@@ -0,0 +1,15 @@
+{
+  "other": {
+    "kind": "other",
+    "name": "kotlin-dsl",
+    "title": "Kotlin DSL",
+    "description": "Camel DSL with Kotlin",
+    "deprecated": false,
+    "firstVersion": "3.9.0",
+    "label": "dsl",
+    "supportLevel": "Experimental",
+    "groupId": "org.apache.camel.springboot",
+    "artifactId": "camel-kotlin-dsl-starter",
+    "version": "3.18.0-SNAPSHOT"
+  }
+}
diff --git 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others/xml-io-dsl.json
 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others/xml-io-dsl.json
new file mode 100644
index 00000000000..84d69d98681
--- /dev/null
+++ 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others/xml-io-dsl.json
@@ -0,0 +1,15 @@
+{
+  "other": {
+    "kind": "other",
+    "name": "xml-io-dsl",
+    "title": "XML DSL",
+    "description": "Camel XML DSL with camel-xml-io",
+    "deprecated": false,
+    "firstVersion": "3.9.0",
+    "label": "dsl",
+    "supportLevel": "Stable",
+    "groupId": "org.apache.camel.springboot",
+    "artifactId": "camel-xml-io-dsl-starter",
+    "version": "3.18.0-SNAPSHOT"
+  }
+}
diff --git 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others/xml-jaxb-dsl.json
 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others/xml-jaxb-dsl.json
new file mode 100644
index 00000000000..c292e32e99b
--- /dev/null
+++ 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/others/xml-jaxb-dsl.json
@@ -0,0 +1,15 @@
+{
+  "other": {
+    "kind": "other",
+    "name": "xml-jaxb-dsl",
+    "title": "XML DSL (legacy)",
+    "description": "Camel XML DSL with camel-xml-jaxb",
+    "deprecated": false,
+    "firstVersion": "3.9.0",
+    "label": "dsl",
+    "supportLevel": "Stable",
+    "groupId": "org.apache.camel.springboot",
+    "artifactId": "camel-xml-jaxb-dsl-starter",
+    "version": "3.18.0-SNAPSHOT"
+  }
+}
diff --git a/dsl-starter/pom.xml b/dsl-starter/pom.xml
index b1724fd9a8e..63d412174af 100644
--- a/dsl-starter/pom.xml
+++ b/dsl-starter/pom.xml
@@ -48,4 +48,23 @@
         <module>camel-yaml-dsl-starter</module>
     </modules>
 
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.camel.springboot</groupId>
+                
<artifactId>camel-spring-boot-generator-maven-plugin</artifactId>
+                <version>${project.version}</version>
+                <executions>
+                    <execution>
+                        <id>generate</id>
+                        <goals>
+                            <goal>prepare-catalog-springboot</goal>
+                        </goals>
+                        <phase>generate-resources</phase>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
 </project>
diff --git 
a/tooling/camel-spring-boot-generator-maven-plugin/src/main/java/org/apache/camel/springboot/maven/AbstractSpringBootGenerator.java
 
b/tooling/camel-spring-boot-generator-maven-plugin/src/main/java/org/apache/camel/springboot/maven/AbstractSpringBootGenerator.java
index 9314a3546e9..b428532d7a2 100644
--- 
a/tooling/camel-spring-boot-generator-maven-plugin/src/main/java/org/apache/camel/springboot/maven/AbstractSpringBootGenerator.java
+++ 
b/tooling/camel-spring-boot-generator-maven-plugin/src/main/java/org/apache/camel/springboot/maven/AbstractSpringBootGenerator.java
@@ -109,7 +109,12 @@ public abstract class AbstractSpringBootGenerator extends 
AbstractMojo {
     }
 
     protected JarFile getJarFile(String groupId, String artifactId) throws 
IOException {
-        return new JarFile(project.getArtifactMap().get(groupId + ":" + 
artifactId).getFile());
+        Artifact a = project.getArtifactMap().get(groupId + ":" + artifactId);
+        if (a != null) {
+            return new JarFile(a.getFile());
+        } else {
+            return null;
+        }
     }
 
     protected Map<String, Supplier<String>> getJSonFiles(JarFile componentJar) 
{
diff --git 
a/tooling/camel-spring-boot-generator-maven-plugin/src/main/java/org/apache/camel/springboot/maven/PrepareCatalogSpringBootMojo.java
 
b/tooling/camel-spring-boot-generator-maven-plugin/src/main/java/org/apache/camel/springboot/maven/PrepareCatalogSpringBootMojo.java
index 3d4c1b5ad05..36a2078c95b 100644
--- 
a/tooling/camel-spring-boot-generator-maven-plugin/src/main/java/org/apache/camel/springboot/maven/PrepareCatalogSpringBootMojo.java
+++ 
b/tooling/camel-spring-boot-generator-maven-plugin/src/main/java/org/apache/camel/springboot/maven/PrepareCatalogSpringBootMojo.java
@@ -63,12 +63,14 @@ public class PrepareCatalogSpringBootMojo extends 
AbstractSpringBootGenerator {
     }
 
     private void executeAll(String groupId, String artifactId) throws 
MojoExecutionException, MojoFailureException, IOException {
-        try (JarFile componentJar = getJarFile(groupId, artifactId)) {
-            Map<String, Supplier<String>> files = getJSonFiles(componentJar);
-            executeOthers(componentJar, files);
-            executeComponents(componentJar, files);
-            executeDataFormats(componentJar, files);
-            executeLanguages(componentJar, files);
+        try (JarFile jar = getJarFile(groupId, artifactId)) {
+            if (jar != null) {
+                Map<String, Supplier<String>> files = getJSonFiles(jar);
+                executeOthers(jar, files);
+                executeComponents(jar, files);
+                executeDataFormats(jar, files);
+                executeLanguages(jar, files);
+            }
         }
     }
 
diff --git 
a/tooling/camel-spring-boot-generator-maven-plugin/src/main/java/org/apache/camel/springboot/maven/SpringBootAutoConfigurationMojo.java
 
b/tooling/camel-spring-boot-generator-maven-plugin/src/main/java/org/apache/camel/springboot/maven/SpringBootAutoConfigurationMojo.java
index 8a727d11818..4bfdc73b286 100644
--- 
a/tooling/camel-spring-boot-generator-maven-plugin/src/main/java/org/apache/camel/springboot/maven/SpringBootAutoConfigurationMojo.java
+++ 
b/tooling/camel-spring-boot-generator-maven-plugin/src/main/java/org/apache/camel/springboot/maven/SpringBootAutoConfigurationMojo.java
@@ -151,12 +151,14 @@ public class SpringBootAutoConfigurationMojo extends 
AbstractSpringBootGenerator
     }
 
     private void executeAll(String groupId, String artifactId) throws 
MojoExecutionException, MojoFailureException, IOException {
-        try (JarFile componentJar = getJarFile(groupId, artifactId)) {
-            Map<String, Supplier<String>> files = getJSonFiles(componentJar);
-            executeModels(componentJar, files);
-            executeComponents(componentJar, files);
-            executeDataFormats(componentJar, files);
-            executeLanguages(componentJar, files);
+        try (JarFile jar = getJarFile(groupId, artifactId)) {
+            if (jar != null) {
+                Map<String, Supplier<String>> files = getJSonFiles(jar);
+                executeModels(jar, files);
+                executeComponents(jar, files);
+                executeDataFormats(jar, files);
+                executeLanguages(jar, files);
+            }
         }
     }
 

Reply via email to