You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ji...@apache.org on 2024/11/13 09:00:55 UTC
(camel-quarkus) 03/03: Use camel.version property value for catalog camelVersion metadata (#6774)
This is an automated email from the ASF dual-hosted git repository.
jiriondrusek pushed a commit to branch 3.15.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit e1d9a6822b8355ade8bccb2e86a1a7363220230c
Author: James Netherton <ja...@users.noreply.github.com>
AuthorDate: Tue Nov 12 23:59:28 2024 +0000
Use camel.version property value for catalog camelVersion metadata (#6774)
---
.../ROOT/pages/reference/extensions/rest-openapi.adoc | 2 +-
.../camel/quarkus/maven/PrepareCatalogQuarkusMojo.java | 14 ++++++++++----
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/docs/modules/ROOT/pages/reference/extensions/rest-openapi.adoc b/docs/modules/ROOT/pages/reference/extensions/rest-openapi.adoc
index bfcaeb004b..00a36119c2 100644
--- a/docs/modules/ROOT/pages/reference/extensions/rest-openapi.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/rest-openapi.adoc
@@ -184,7 +184,7 @@ Additional properties to be used in the mustache templates.
A comma separated list of OpenAPI spec locations.
| `string`
-|
+|
|===
[.configuration-legend]
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 22726478d9..5fd321020e 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
@@ -78,6 +78,12 @@ public class PrepareCatalogQuarkusMojo extends AbstractExtensionListMojo {
@Parameter(property = "quarkus.version", required = true)
String quarkusVersion;
+ /**
+ * Camel version the current source tree depends on.
+ */
+ @Parameter(property = "camel.version", required = true)
+ String camelVersion;
+
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
final Path catalogPath = catalogBaseDir.toPath().resolve(CqCatalog.CQ_CATALOG_DIR);
@@ -154,12 +160,12 @@ public class PrepareCatalogQuarkusMojo extends AbstractExtensionListMojo {
"description is missing in " + ext.getRuntimePomXmlPath())));
model.setDeprecated(CqUtils.isDeprecated(title, models, ext.isDeprecated()));
model.setLabel(ext.getLabel().orElse("quarkus"));
- update(model, ext, nativeSupported, quarkusVersion);
+ update(model, ext, nativeSupported, quarkusVersion, camelVersion);
CqCatalog.serialize(catalogPath, model);
schemesByKind.get(model.getKind().name()).add(model.getName());
} else {
for (ArtifactModel<?> model : models) {
- update(model, ext, nativeSupported, quarkusVersion);
+ update(model, ext, nativeSupported, quarkusVersion, camelVersion);
CqCatalog.serialize(catalogPath, model);
schemesByKind.get(model.getKind().name()).add(model.getName());
}
@@ -182,7 +188,7 @@ public class PrepareCatalogQuarkusMojo extends AbstractExtensionListMojo {
}
private static void update(ArtifactModel<?> model, CamelQuarkusExtension ext, boolean nativeSupported,
- String quarkusVersion) {
+ String quarkusVersion, String camelVersion) {
final String firstVersion = ext.getJvmSince()
.orElseThrow(() -> new RuntimeException(
"firstVersion property is missing in " + ext.getRuntimePomXmlPath()));
@@ -190,7 +196,7 @@ public class PrepareCatalogQuarkusMojo extends AbstractExtensionListMojo {
metadata.put(QUARKUS_VERSION, quarkusVersion);
if (model.getArtifactId() != null && model.getGroupId() != null) {
metadata.putIfAbsent(CAMEL_ARTIFACT, model.getGroupId() + ":" + model.getArtifactId());
- metadata.putIfAbsent(CAMEL_VERSION, model.getVersion());
+ metadata.put(CAMEL_VERSION, camelVersion);
}
// lets use the camel-quarkus version as first version instead of Apache Camel
// version