You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2020/01/03 07:49:00 UTC
[jira] [Assigned] (CAMEL-14350) camel-main: xml routes discovery
does not work outside the classpath
[ https://issues.apache.org/jira/browse/CAMEL-14350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen reassigned CAMEL-14350:
-----------------------------------
Assignee: Claus Ibsen
> camel-main: xml routes discovery does not work outside the classpath
> --------------------------------------------------------------------
>
> Key: CAMEL-14350
> URL: https://issues.apache.org/jira/browse/CAMEL-14350
> Project: Camel
> Issue Type: Bug
> Components: camel-core, camel-main
> Affects Versions: 3.0.0
> Reporter: Luca Burgazzoli
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 3.0.1, 3.1.0
>
>
> assuming that the xml-routes option on camel main is set to something like:
> {code}
> file:path/to/soures/camel-*.xml
> {code}
> then camel main is unable to locate the xml routes in the target path.
> The documentation states that "Files can be loaded from either classpath or file by prefixing with classpath: or file:" but looking at the code, seems that the DefaultPackageScanResourceResolver which is what DefaultRoutesCollector leverage under the hoods, takes into account class path only resources.
> To reproduce it, add the following tests to MainXmlTest
> {code:java}
> @Test
> public void testMainRoutesCollectorScanDir() throws Exception {
> doTestMain("file:src/test/resources/org/apache/camel/main/xml/camel-*.xml");
> }
> @Test
> public void testMainRoutesCollectorScanClasspath() throws Exception {
> doTestMain("classpath:org/apache/camel/main/xml/camel-*.xml");
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)