[ 
https://issues.apache.org/jira/browse/CAMEL-16662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Giacomo Carnevale updated CAMEL-16662:
--------------------------------------
    Description: 
Hi

I have cloned camel spring boot example 
[[https://github.com/apache/camel-spring-boot-examples/tree/main/xml] 
[camel-spring-boot-examples|https://github.com/apache/camel-spring-boot-examples/tree/main/xml]
 [/xml|https://github.com/apache/camel-spring-boot-examples/tree/main/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_
 --------> {color:#00875a}Routes startup summary (total:1 started:1){color}

 

_mvn clean package_
 _java -jar target/camel-example-spring-boot-xml-3.11.0-SNAPSHOT.jar_
 -------->{color:#ff0000} Routes startup summary (total:0 started:0){color}

 

_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_
 {color:#00875a}--------> Routes startup summary (total:1 started:1){color}

Giacomo

  was:
Hi

I have cloned camel spring boot example 
[[https://github.com/apache/camel-spring-boot-examples/tree/main/xml] 
[camel-spring-boot-examples|https://github.com/apache/camel-spring-boot-examples/tree/main/xml]
 [/xml|https://github.com/apache/camel-spring-boot-examples/tree/main/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_
 --------> {color:#00875a}Routes startup summary (total:1 started:1){color}

 

_mvn clean package_
 _java -jar target/camel-example-spring-boot-xml-3.11.0-SNAPSHOT.jar_
 -------->{color:#ff0000} Routes startup summary (total:0 started:0){color}

 

_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_
 {color:#00875a}--------> Routes startup summary (total:1 started:1){color}

Giacomo


> camel-spring-boot - Classloader cannot find xml route files inside spring 
> boots propriteraty layout
> ---------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-16662
>                 URL: https://issues.apache.org/jira/browse/CAMEL-16662
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-spring-boot, camel-spring-boot-starters
>    Affects Versions: 3.10.0
>            Reporter: Giacomo Carnevale
>            Priority: Major
>
> Hi
> I have cloned camel spring boot example 
> [[https://github.com/apache/camel-spring-boot-examples/tree/main/xml] 
> [camel-spring-boot-examples|https://github.com/apache/camel-spring-boot-examples/tree/main/xml]
>  [/xml|https://github.com/apache/camel-spring-boot-examples/tree/main/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_
>  --------> {color:#00875a}Routes startup summary (total:1 started:1){color}
>  
> _mvn clean package_
>  _java -jar target/camel-example-spring-boot-xml-3.11.0-SNAPSHOT.jar_
>  -------->{color:#ff0000} Routes startup summary (total:0 started:0){color}
>  
> _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_
>  {color:#00875a}--------> Routes startup summary (total:1 started:1){color}
> Giacomo



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to