davsclaus commented on code in PR #27206:
URL: https://github.com/apache/camel/pull/27206#discussion_r4163318065


##########
dsl/camel-jbang/camel-jbang-core/src/test/resources/JacksonKameletRoute.java:
##########
@@ -0,0 +1,30 @@
+/*
+ * 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.
+ */
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class JacksonKameletRoute extends org.apache.camel.builder.RouteBuilder 
{
+
+    @JsonProperty("name")
+    private String name;
+
+    @Override
+    public void configure() {
+        from("kamelet:timer-source")

Review Comment:
   CI fails here on both JDKs: `timer-source` has `message` as a required 
property, so creating the route from the template is vetoed during the export's 
silent run (`VetoCamelContextStartException: Failure creating route from 
template: timer-source`). Passing the parameter should fix it:
   ```suggestion
           from("kamelet:timer-source?message=Hello")
   ```



##########
dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java:
##########
@@ -669,7 +669,6 @@ protected Set<String> resolveDependencies(Path settings, 
Path profile) throws Ex
                 String name = StringHelper.after(line, "kamelet=");
                 if (officialKamelets.contains(name)) {
                     asfKamelets = true;

Review Comment:
   With the fallback removed, this `break` removal isn't needed anymore. Once 
`asfKamelets` is true, `kamelets` is already true and the loop has nothing else 
to detect, so it just keeps scanning. Could you restore the `break` so the PR 
only touches the known-imports mapping and the test?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to