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

jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus-examples.git

commit 813ba65f5ac015701da1e98691df45b62bea8c46
Author: James Netherton <jamesnether...@gmail.com>
AuthorDate: Wed Oct 9 09:13:23 2024 +0100

    Check that kubernetes manifest file exists before attempting to modify it
---
 fhir/pom.xml                      | 4 ++++
 file-bindy-ftp/pom.xml            | 4 ++++
 jpa-idempotent-repository/pom.xml | 4 ++++
 3 files changed, 12 insertions(+)

diff --git a/fhir/pom.xml b/fhir/pom.xml
index 67bba74..916c72e 100644
--- a/fhir/pom.xml
+++ b/fhir/pom.xml
@@ -301,6 +301,10 @@
                                 ["kubernetes", "openshift"].each { k8sResource 
-&gt;
                                     String sanitizedBasedir = 
project.basedir.path.replace('\\', '/')
                                     File file = new 
File("${sanitizedBasedir}/src/main/kubernetes/${k8sResource}.yml")
+                                    if (!file.exists()) {
+                                        return
+                                    }
+
                                     String content = file.text
                                     Matcher matcher = pattern.matcher(content)
 
diff --git a/file-bindy-ftp/pom.xml b/file-bindy-ftp/pom.xml
index 0f161b5..2ebc938 100644
--- a/file-bindy-ftp/pom.xml
+++ b/file-bindy-ftp/pom.xml
@@ -296,6 +296,10 @@
                                 ["kubernetes", "openshift"].each { k8sResource 
-&gt;
                                     String sanitizedBasedir = 
project.basedir.path.replace('\\', '/')
                                     File file = new 
File("${sanitizedBasedir}/src/main/kubernetes/${k8sResource}.yml")
+                                    if (!file.exists()) {
+                                        return
+                                    }
+
                                     String content = file.text
                                     Matcher matcher = pattern.matcher(content)
 
diff --git a/jpa-idempotent-repository/pom.xml 
b/jpa-idempotent-repository/pom.xml
index 4da4b80..d251820 100644
--- a/jpa-idempotent-repository/pom.xml
+++ b/jpa-idempotent-repository/pom.xml
@@ -308,6 +308,10 @@
                                 ["kubernetes", "openshift"].each { k8sResource 
-&gt;
                                     String sanitizedBasedir = 
project.basedir.path.replace('\\', '/')
                                     File file = new 
File("${sanitizedBasedir}/src/main/kubernetes/${k8sResource}.yml")
+                                    if (!file.exists()) {
+                                        return
+                                    }
+
                                     String content = file.text
                                     Matcher matcher = pattern.matcher(content)
 

Reply via email to