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


##########
dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ExportTest.java:
##########
@@ -393,6 +394,30 @@ public void shouldExportOfficialKamelet(RuntimeType rt) 
throws Exception {
         Assertions.assertTrue(f.exists());
     }
 
+    @ParameterizedTest
+    @MethodSource("runtimeProvider")
+    public void shouldExportKameletUsedByJavaRouteWithKnownImport(RuntimeType 
rt) throws Exception {

Review Comment:
   This test passes on `main` without the change: jackson-annotations is always 
on the export's classpath through `camel-kamelet-main` → `camel-jackson`. I ran 
it from this PR's head against a `camel-kamelet-main` jar without the new 
mapping, and all three runtimes passed. A test that fails on `main` needs a 
route whose import is *only* provided by the kamelet's dependency. For example:
   
   ```java
   import org.apache.camel.component.aws2.s3.AWS2S3Constants;
   
   public class S3KameletRoute extends org.apache.camel.builder.RouteBuilder {
       @Override
       public void configure() {
           
from("kamelet:aws-s3-source?bucketNameOrArn=mybucket&region=eu-west-1&accessKey=x&secretKey=y")
               .log("${header." + AWS2S3Constants.KEY + "}");
       }
   }
   ```
   
   On `main`, `camel export` of this fails with `package 
org.apache.camel.component.aws2.s3 does not exist`.



##########
dsl/camel-kamelet-main/src/main/known-third-party-libraries.properties:
##########
@@ -140,6 +140,7 @@ com.twilio = com.twilio.sdk:twilio:${twilio-version}
 com.stripe = com.stripe:stripe-java:${stripe-java-version}
 
 # Data: JSON, YAML, CSV, XML, binary formats and transformations
+com.fasterxml.jackson.annotation = 
com.fasterxml.jackson.core:jackson-annotations:${jackson2-annotations-version}

Review Comment:
   The mapping is correct (and the version property is right). To guard it, a 
single line in 
`KnownDependenciesResolverTest#theShippedMappingResolvesThirdPartyClassesByPackage`
 fails without it, which is how the curated list is tested (CAMEL-24809):
   
   ```java
   assertGav(resolver, "com.fasterxml.jackson.annotation.JsonProperty", 
"com.fasterxml.jackson.core", "jackson-annotations");
   ```



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