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


The following commit(s) were added to refs/heads/main by this push:
     new 0973cdd4f4 Avoid overwriting existing Camel GAV catalog metadata
0973cdd4f4 is described below

commit 0973cdd4f469dbe1cbda5ba090398c280898c639
Author: James Netherton <[email protected]>
AuthorDate: Tue Sep 3 13:22:55 2024 +0100

    Avoid overwriting existing Camel GAV catalog metadata
---
 .../org/apache/camel/quarkus/maven/PrepareCatalogQuarkusMojo.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/tooling/maven-plugin/src/main/java/org/apache/camel/quarkus/maven/PrepareCatalogQuarkusMojo.java
 
b/tooling/maven-plugin/src/main/java/org/apache/camel/quarkus/maven/PrepareCatalogQuarkusMojo.java
index 1944571019..74a853567d 100644
--- 
a/tooling/maven-plugin/src/main/java/org/apache/camel/quarkus/maven/PrepareCatalogQuarkusMojo.java
+++ 
b/tooling/maven-plugin/src/main/java/org/apache/camel/quarkus/maven/PrepareCatalogQuarkusMojo.java
@@ -189,8 +189,8 @@ public class PrepareCatalogQuarkusMojo extends 
AbstractExtensionListMojo {
         final Map<String, Object> metadata = model.getMetadata();
         metadata.put(QUARKUS_VERSION, quarkusVersion);
         if (model.getArtifactId() != null && model.getGroupId() != null) {
-            metadata.put(CAMEL_ARTIFACT, model.getGroupId() + ":" + 
model.getArtifactId());
-            metadata.put(CAMEL_VERSION, model.getVersion());
+            metadata.putIfAbsent(CAMEL_ARTIFACT, model.getGroupId() + ":" + 
model.getArtifactId());
+            metadata.putIfAbsent(CAMEL_VERSION, model.getVersion());
         }
         // lets use the camel-quarkus version as first version instead of 
Apache Camel
         // version

Reply via email to