Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.10.0
-
None
-
Unknown
Description
Hi
I have cloned camel spring boot example [https://github.com/apache/camel-spring-boot-examples/tree/main/xml camel-spring-boot-examples /xml .|https://github.com/apache/camel-spring-boot-examples/tree/main/xml]
If I run the example with maven command mvn spring-boot:run It works (route camel/my-route.xml loaded).
Routes startup summary (total:1 started:1)
If I build the example and run with java -jar target/camel-example-spring-boot-xml-3.11.0-SNAPSHOT.jar It doesn't work (route camel/my-route.xml not loaded).
Routes startup summary (total:0 started:0)
I suppose that spring boot maven plugin works with classes file and not with jar file, so I modified (unzip and zip) the jar file moving BOOT-INF/classes/camel to jar root folder and It works.
git clone https://github.com/apache/camel-spring-boot-examples.git
cd camel-spring-boot-examples/xml
mvn spring-boot:run
--------> Routes startup summary (total:1 started:1)
mvn clean package
java -jar target/camel-example-spring-boot-xml-3.11.0-SNAPSHOT.jar
--------> Routes startup summary (total:0 started:0)
cp target/camel-example-spring-boot-xml-3.11.0-SNAPSHOT.jar .
cp -r src/main/resources/camel/ .
zip camel-example-spring-boot-xml-3.11.0-SNAPSHOT.jar camel/my-route.xml
java -jar camel-example-spring-boot-xml-3.11.0-SNAPSHOT.jar
--------> Routes startup summary (total:1 started:1)
Giacomo