You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Tyler Durvik <ph...@gmail.com> on 2012/11/29 23:20:33 UTC

Main class load XML file

I have always used maven in development and generated projects using
the maven "archetype:generate" target.  I have performed those steps
again on my current project but now I want to load the XML
configuration file containing the Camel Context and route definitions
from a Main java class.  Is there a tutorial on how to do this?

So to explain better, I want a Java Main class that does the same as
"mvn camel:run".

Thank you.

Re: Main class load XML file

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Yes see this FAQ and the links it has, and you will find what you seek
http://camel.apache.org/running-camel-standalone.html


On Thu, Nov 29, 2012 at 11:20 PM, Tyler Durvik <ph...@gmail.com> wrote:
> I have always used maven in development and generated projects using
> the maven "archetype:generate" target.  I have performed those steps
> again on my current project but now I want to load the XML
> configuration file containing the Camel Context and route definitions
> from a Main java class.  Is there a tutorial on how to do this?
>
> So to explain better, I want a Java Main class that does the same as
> "mvn camel:run".
>
> Thank you.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen