You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Taylor Gautier <tg...@terracottatech.com> on 2008/03/09 18:29:30 UTC

How to specify a custom component, or endpoint, mapping from a jar?

I have written a custom component.  I was successful at creating a file that
implemented the mapping, by following the instructions on the site to create
a file:

META-INF/services/org/apache/camel/component/tc

However, I could not figure out how to take my component, and this file, and
wrap them in a jar to be used as a standalone dependency within my
application.  How does one wrap the implementation and the definition into
one?  Is it posssible? 

For example, I want this:

my_app
  --> depends on tc-camel.jar

tc-camel.jar has the component implementation and file that defines the
mapping.

Thanks in advance!

Taylor


-- 
View this message in context: http://www.nabble.com/How-to-specify-a-custom-component%2C-or-endpoint%2C-mapping-from-a-jar--tp15943843s22882p15943843.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How to specify a custom component, or endpoint, mapping from a jar?

Posted by Taylor Gautier <tg...@terracottatech.com>.


James.Strachan wrote:
> 
> On 09/03/2008, Taylor Gautier <tg...@terracottatech.com> wrote:
>>
>>  I have written a custom component.  I was successful at creating a file
>> that
>>  implemented the mapping, by following the instructions on the site to
>> create
>>  a file:
>>
>>  META-INF/services/org/apache/camel/component/tc
>>
>>  However, I could not figure out how to take my component, and this file,
>> and
>>  wrap them in a jar to be used as a standalone dependency within my
>>  application.  How does one wrap the implementation and the definition
>> into
>>  one?  Is it posssible?
>>
>>  For example, I want this:
>>
>>  my_app
>>   --> depends on tc-camel.jar
>>
>>  tc-camel.jar has the component implementation and file that defines the
>>  mapping.
>>
>>  Thanks in advance!
> 
> If you are using maven, there's a ton of components you can copy
> inside the Camel source repository; you just put the java code in
> src/main/java and the META-INF files in src/main/resources and you're
> done.
> 
> If you are using Ant you could just use the jar task to include the
> META-INF files as well as the java code and you're done.
> 
> 

Thanks that worked.  I thought I did exactly what was listed there, but
apparently I had some glitch.  It worked just as I expected.


-- 
View this message in context: http://www.nabble.com/How-to-specify-a-custom-component%2C-or-endpoint%2C-mapping-from-a-jar--tp15943843s22882p15973950.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How to specify a custom component, or endpoint, mapping from a jar?

Posted by James Strachan <ja...@gmail.com>.
On 09/03/2008, Taylor Gautier <tg...@terracottatech.com> wrote:
>
>  I have written a custom component.  I was successful at creating a file that
>  implemented the mapping, by following the instructions on the site to create
>  a file:
>
>  META-INF/services/org/apache/camel/component/tc
>
>  However, I could not figure out how to take my component, and this file, and
>  wrap them in a jar to be used as a standalone dependency within my
>  application.  How does one wrap the implementation and the definition into
>  one?  Is it posssible?
>
>  For example, I want this:
>
>  my_app
>   --> depends on tc-camel.jar
>
>  tc-camel.jar has the component implementation and file that defines the
>  mapping.
>
>  Thanks in advance!

If you are using maven, there's a ton of components you can copy
inside the Camel source repository; you just put the java code in
src/main/java and the META-INF files in src/main/resources and you're
done.

If you are using Ant you could just use the jar task to include the
META-INF files as well as the java code and you're done.

-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com