You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/09/16 05:17:34 UTC

[camel] 01/02: Camel-package-maven-plugin: Check if endpoint dsl folder really exist and return eventually

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.git

commit 3531ae50e2b82fce807bec0d3a4f6b568f3ea2a5
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Sep 16 07:13:08 2020 +0200

    Camel-package-maven-plugin: Check if endpoint dsl folder really exist and return eventually
---
 .../java/org/apache/camel/maven/packaging/EndpointDslMojo.java     | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/EndpointDslMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/EndpointDslMojo.java
index dcc46e3..40f6855 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/EndpointDslMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/EndpointDslMojo.java
@@ -166,7 +166,12 @@ public class EndpointDslMojo extends AbstractGeneratorMojo {
 
     @Override
     public void execute() throws MojoExecutionException, MojoFailureException {
-        Path root = findCamelDirectory(baseDir, "core/camel-endpointdsl").toPath();
+        File camelDir = findCamelDirectory(baseDir, "core/camel-endpointdsl");
+        if (camelDir == null) {
+            getLog().info("No core/camel-endpointdsl folder found, skipping execution");
+            return;
+        }
+        Path root = camelDir.toPath();
         if (sourcesOutputDir == null) {
             sourcesOutputDir = root.resolve("src/generated/java").toFile();
         }