Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.0.0
-
None
-
Unknown
Description
assuming that the xml-routes option on camel main is set to something like:
file:path/to/soures/camel-*.xml
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
@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"); }