[
https://issues.apache.org/jira/browse/CAMEL-25116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-25116:
--------------------------------
Fix Version/s: 4.23.0
> camel-main - /q/download?classpath=true does not list project resources
> -----------------------------------------------------------------------
>
> Key: CAMEL-25116
> URL: https://issues.apache.org/jira/browse/CAMEL-25116
> Project: Camel
> Issue Type: Bug
> Components: camel-jbang, camel-main
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 4.23.0
>
>
> The management endpoint /q/download without a file name lists the route
> source files. With ?classpath=true it is meant to also list the resources on
> the classpath, but the project resources are missing from the list.
> Reproducer: a folder with 2 routes (*.camel.yaml), application.properties,
> openapi.json and form1.form.json, started with camel run * (4.22.1).
> * /q/download?classpath=true lists only the 2 route files
> * /q/download/*.json?classpath=true is empty
> * /q/download/openapi.json works (200)
> * /q/download/application.properties returns 204
> Cause: the listing scans with pattern **/* from the classpath root, which
> ends up in ClassLoader.getResources(""). That only returns directory
> classpath entries, not the root of a JAR, and the extra files that camel run
> adds via ExtraFilesClassLoader cannot be listed at all.
> application.properties is loaded by camel run as a file and is not on the
> classpath, so it cannot be downloaded by name either.
> The list should contain the project's own files, both in dev mode (camel run)
> and when exported and packaged.
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v8.20.10#820010)