You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2025/12/18 21:35:44 UTC
(camel) branch camel-4.14.x updated (dd7962c5c573 -> f88fa02794a8)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a change to branch camel-4.14.x
in repository https://gitbox.apache.org/repos/asf/camel.git
from dd7962c5c573 Update known releases in catalog
new 1971af9fd80d Fix list of Spring Boot version from Camel JBang for Camel 4.15+
new f88fa02794a8 Fixed test
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../VersionListTest.java} | 31 +++++++++++++++++-----
.../main/download/MavenDependencyDownloader.java | 7 ++++-
.../org/apache/camel/tooling/maven/MavenGav.java | 13 ++++++++-
3 files changed, 43 insertions(+), 8 deletions(-)
copy dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/{update/UpdateListTest.java => version/VersionListTest.java} (51%)
(camel) 01/02: Fix list of Spring Boot version from Camel JBang for Camel 4.15+
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch camel-4.14.x
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 1971af9fd80d13d87c5af81598dc53ce969d66d6
Author: Aurélien Pupier <ap...@ibm.com>
AuthorDate: Thu Oct 9 15:07:15 2025 +0200
Fix list of Spring Boot version from Camel JBang for Camel 4.15+
with https://github.com/apache/camel-spring-boot/commit/71d09c68912f21c301519bbf0cfb9a325163ec10
the place to look for has been modified. This new place is in an
artifact (camel-parent) which has no jar artifact which then require to
improve the MavenDownloader.
Signed-off-by: Aurélien Pupier <ap...@ibm.com>
---
.../core/commands/version/VersionListTest.java | 58 ++++++++++++++++++++++
.../main/download/MavenDependencyDownloader.java | 7 ++-
.../org/apache/camel/tooling/maven/MavenGav.java | 13 ++++-
3 files changed, 76 insertions(+), 2 deletions(-)
diff --git a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/version/VersionListTest.java b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/version/VersionListTest.java
new file mode 100644
index 000000000000..de1d0884aba5
--- /dev/null
+++ b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/version/VersionListTest.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dsl.jbang.core.commands.version;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import org.apache.camel.dsl.jbang.core.commands.CamelCommandBaseTest;
+import org.apache.camel.dsl.jbang.core.commands.CamelJBangMain;
+import org.apache.camel.dsl.jbang.core.common.RuntimeType;
+import org.assertj.core.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+class VersionListTest extends CamelCommandBaseTest {
+
+ @Test
+ void springbootVersionIsAvailable() throws Exception {
+ VersionList versionList = new VersionList(new CamelJBangMain().withPrinter(printer));
+ versionList.sort = "version";
+ versionList.runtime = RuntimeType.springBoot;
+
+ versionList.doCall();
+
+ List<String> lines = printer.getLines();
+ // there was a change where the information is stored in 4.15, thus the test on 4.14.1 and 4.15.0
+ Assertions.assertThat(lines.stream().collect(Collectors.joining("\n")))
+ .contains("4.14.1 3.5.6 17,21 LTS")
+ .contains("4.15.0 3.5.6 17,21");
+ }
+
+ @Test
+ void quarkusVersionIsAvailable() throws Exception {
+ VersionList versionList = new VersionList(new CamelJBangMain().withPrinter(printer));
+ versionList.sort = "version";
+ versionList.runtime = RuntimeType.quarkus;
+
+ versionList.doCall();
+
+ List<String> lines = printer.getLines();
+ Assertions.assertThat(lines.stream().collect(Collectors.joining("\n")))
+ .contains("4.14.0 3.27.0 17,21 LTS");
+ }
+
+}
diff --git a/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/MavenDependencyDownloader.java b/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/MavenDependencyDownloader.java
index 190b1f509136..a9864d7a9105 100644
--- a/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/MavenDependencyDownloader.java
+++ b/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/MavenDependencyDownloader.java
@@ -632,7 +632,12 @@ public class MavenDependencyDownloader extends ServiceSupport implements Depende
private String resolveSpringBootVersionByCamelVersion(String camelVersion, Set<String> extraRepos)
throws Exception {
- String gav = "org.apache.camel.springboot" + ":" + "spring-boot" + ":pom:" + camelVersion;
+ String gav;
+ if (VersionHelper.isGE(camelVersion, "4.15.0")) {
+ gav = "org.apache.camel:camel-parent:pom:" + camelVersion;
+ } else {
+ gav = "org.apache.camel.springboot:spring-boot:pom:" + camelVersion;
+ }
List<MavenArtifact> artifacts = resolveDependenciesViaAether(List.of(gav), extraRepos, false, false);
if (!artifacts.isEmpty()) {
diff --git a/tooling/camel-tooling-maven/src/main/java/org/apache/camel/tooling/maven/MavenGav.java b/tooling/camel-tooling-maven/src/main/java/org/apache/camel/tooling/maven/MavenGav.java
index 2882abba4a68..26d8268fea16 100644
--- a/tooling/camel-tooling-maven/src/main/java/org/apache/camel/tooling/maven/MavenGav.java
+++ b/tooling/camel-tooling-maven/src/main/java/org/apache/camel/tooling/maven/MavenGav.java
@@ -97,7 +97,18 @@ public final class MavenGav {
answer.setArtifactId(parts[1]);
}
if (parts.length > 2) {
- answer.setVersion(parts[2]);
+ String thirdpart = parts[2];
+ // here it handles a single specific case, would be better to handle all packaging types
+ if ("pom".equals(thirdpart)) {
+ answer.setPackaging("pom");
+ if (parts.length > 3) {
+ answer.setVersion(parts[3]);
+ } else if (defaultVersion != null) {
+ answer.setVersion(defaultVersion);
+ }
+ } else {
+ answer.setVersion(parts[2]);
+ }
} else if (defaultVersion != null) {
answer.setVersion(defaultVersion);
}
(camel) 02/02: Fixed test
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch camel-4.14.x
in repository https://gitbox.apache.org/repos/asf/camel.git
commit f88fa02794a8d8761daab78f650119f9978e1a64
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Dec 18 22:35:34 2025 +0100
Fixed test
---
.../apache/camel/dsl/jbang/core/commands/version/VersionListTest.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/version/VersionListTest.java b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/version/VersionListTest.java
index de1d0884aba5..db31bd9de628 100644
--- a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/version/VersionListTest.java
+++ b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/version/VersionListTest.java
@@ -38,7 +38,7 @@ class VersionListTest extends CamelCommandBaseTest {
List<String> lines = printer.getLines();
// there was a change where the information is stored in 4.15, thus the test on 4.14.1 and 4.15.0
Assertions.assertThat(lines.stream().collect(Collectors.joining("\n")))
- .contains("4.14.1 3.5.6 17,21 LTS")
+ .contains("4.14.1 3.5.6 17,21 LTS")
.contains("4.15.0 3.5.6 17,21");
}
@@ -52,7 +52,7 @@ class VersionListTest extends CamelCommandBaseTest {
List<String> lines = printer.getLines();
Assertions.assertThat(lines.stream().collect(Collectors.joining("\n")))
- .contains("4.14.0 3.27.0 17,21 LTS");
+ .contains("4.14.0 3.27.0 17,21 LTS");
}
}