I've created a custom component ("talend") which passes its own junit test. 
I've "mvn install"ed it to my local repo.  

Now I want to use the component.  So I have a separate blueprint project.  I
have camel.version set to 2.11.2 and the new component as a dependency in
this project's pom.xml - eclipse finds it just fine (listed as Maven
Dependency in Project tree view).  In the blueprint.xml file, a route sends
a message to the new component ("talend").  When I run the junit test in the
blueprint project (RouteTest.java) to exercise the camel route that calls my
custom component ("talend"), the camel output says:

[         Blueprint Extender: 2] BlueprintContainerImpl         INFO  Bundle
RouteTest is waiting for dependencies
[(&(component=talend)(objectClass=org.apache.camel.spi.ComponentResolver))]
[         Blueprint Extender: 1] BlueprintContainerImpl         INFO  Bundle
remitJob is waiting for dependencies
[(&(component=talend)(objectClass=org.apache.camel.spi.ComponentResolver))]

and eventually times out with the message:

testRoute(org.remitJob.RouteTest)  Time elapsed: 30.898 sec  <<< ERROR!
java.lang.RuntimeException: Gave up waiting for service
(objectClass=org.apache.camel.CamelContext)

The 'talend' custom component should be auto discovered:  in the custom
component jar file it has
META-INF/services/org/apache/camel/component/talend file contains
class=org.talend.camel.TalendComponent
which is located in the same jar file at
org/talend/camel/TalendComponent.class

The RouteTest class extends CamelBlueprintTestSupport.  So it appears that
the CamelBlueprintTestSupport cannot auto discover my component 'talend'. 
Yet it should be in the classpath since Maven has resolved the jar
dependency which contains the service file 'talend', no?

Perhaps there is an example, not just of how to create a custom component
with auto-discovery, but also how to then use it with a junit in a
CamelBlueprintTestSupport case?

Any ideas on why it can't find my service/component?




--
View this message in context: 
http://camel.465427.n5.nabble.com/Gave-up-waiting-for-service-dependencies-during-CamelBlueprintTestSupport-test-of-custom-camel-compot-tp5742737.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to