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

acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 358133d7c134d60e4c090995de7f9df9ab978975
Author: Andrea Cosentino <[email protected]>
AuthorDate: Mon Apr 4 11:27:43 2022 +0200

    CAMEL-17686 - Support ability to load properties from Vault/Secrets cloud 
services - Azure Key Vault
---
 .../camel/maven/packaging/PrepareCamelMainMojo.java      | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git 
a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCamelMainMojo.java
 
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCamelMainMojo.java
index 169fe6ee38d..830a3059634 100644
--- 
a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCamelMainMojo.java
+++ 
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCamelMainMojo.java
@@ -200,6 +200,9 @@ public class PrepareCamelMainMojo extends 
AbstractGeneratorMojo {
                 } else if (file.getName().contains("GcpVault")) {
                     prefix = "camel.vault.gcp.";
                     // TODO: add more vault providers here
+                } else if (file.getName().contains("AzureVault")) {
+                    prefix = "camel.vault.azure.";
+                    // TODO: add more vault providers here
                 } else if (file.getName().contains("Health")) {
                     prefix = "camel.health.";
                 } else if (file.getName().contains("Lra")) {
@@ -250,6 +253,15 @@ public class PrepareCamelMainMojo extends 
AbstractGeneratorMojo {
             throw new MojoFailureException("Error parsing file " + 
gcpVaultConfig + " due " + e.getMessage(), e);
         }
 
+        File azureVaultConfig = new File(camelApiDir, 
"src/main/java/org/apache/camel/vault/AzureVaultConfiguration.java");
+        try {
+            List<MainModel.MainOptionModel> model = 
parseConfigurationSource(azureVaultConfig);
+            model.forEach(m -> m.setName("camel.vault.azure." + m.getName()));
+            data.addAll(model);
+        } catch (Exception e) {
+            throw new MojoFailureException("Error parsing file " + 
azureVaultConfig + " due " + e.getMessage(), e);
+        }
+
         // lets sort so they are always ordered (but camel.main in top)
         data.sort((o1, o2) -> {
             if (o1.getName().startsWith("camel.main.") && 
!o2.getName().startsWith("camel.main.")) {
@@ -284,6 +296,10 @@ public class PrepareCamelMainMojo extends 
AbstractGeneratorMojo {
                     new MainGroupModel(
                             "camel.vault.gcp", "Camel GCP Vault 
configurations",
                             "org.apache.camel.vault.GcpVaultConfiguration"));
+            model.getGroups().add(
+                    new MainGroupModel(
+                            "camel.vault.azure", "Camel Azure Key Vault 
configurations",
+                            "org.apache.camel.vault.AzureVaultConfiguration"));
             // TODO: add more vault providers here
             model.getGroups()
                     .add(new MainGroupModel(

Reply via email to