[
https://issues.apache.org/jira/browse/CAMEL-25327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-25327.
---------------------------------
Fix Version/s: 4.23.0
Resolution: Fixed
Fixed by https://github.com/apache/camel/pull/27349 (ce2d847d55f2). Local-model
benchmark (round 4), run/order-generator k=5: 17/20 steps with the fix vs 11/20
before.
> camel-jbang - the source validator finds the project's classes under
> src/main/java
> ----------------------------------------------------------------------------------
>
> Key: CAMEL-25327
> URL: https://issues.apache.org/jira/browse/CAMEL-25327
> Project: Camel
> Issue Type: Bug
> Components: camel-jbang
> Reporter: Claus Ibsen
> Priority: Minor
> Fix For: 4.23.0
>
>
> The source validator (camel_write_file, camel_validate_source, camel validate
> source) refuses a bean whose class is in the Maven layout of the project:
> {code:yaml}
> - beans:
> - name: orderNumber
> type: "#class:camel.example.OrderNumber"
> {code}
> with {{src/main/java/camel/example/OrderNumber.java}} in the project fails
> with "class camel.example.OrderNumber was not found (check the package name;
> a class of your own goes in a .java file next to the route; ...)", although
> {{camel run --source-dir}} compiles and runs that layout (verified: the route
> logs New order ORD-1001, ORD-1002).
> Cause: {{SourceValidator.BeanDeclarations.scan}} lists only the files
> directly in the directory ({{Files.list}}), so the project's classes under
> src/main/java are not known.
> Found in the local-model benchmark (round 4, run/order-generator step 2,
> failed 3 of 3 early runs): the model put the class in the Maven layout, wrote
> a correct beans.yaml, was refused twice and gave up.
> Fix: the scan also reads the .java files under src/main/java; the hint
> mentions src/main/java.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)