Hi Nicolas, This is a very good point. There exist a couple of options. CDI implementations offer APIs to bootstrap the containers, like [1]. You may be interested by DeltaSpike container control module [2] (which is actually being used by the camel:run plugin). CDI 2.0 will bring a standard way to bootstrap a CDI container in Java SE [3].
So in production, you could use one of the above options (CDI 2.0 is still a draft though), wrapping them in a script is necessary, and rely on the discovery mechanism provided by the container to scan bean archives in the classpath. You may want to create fat JARs if that ease your deployment though that’s not necessary and may not be currently well supported by the implementations out-of-the-box. I’ll update the Camel CDI examples to provide an example. [1]: https://docs.jboss.org/weld/reference/latest/en-US/html/environments.html#_bootstrapping_cdi_se [2]: https://deltaspike.apache.org/documentation/container-control.html [3]: https://docs.jboss.org/cdi/spec/2.0.EDR1/cdi-spec.html#bootstrap-se Antonin > On 26 Apr 2016, at 16:36, nicolasduminil > <nicolas.dumi...@simplex-software.fr> wrote: > > Hello, > > Using at several camel-cdi examples, they are all supposed to be ran with > camel:run plugin. Which is okay but how things are supposed to happen in > production, where using maven is often not an option ? Should one create fat > runnable run-with-dependencies or is there any other option ? > > I have to mention that I'm talking about Java SE projects. > > Many thanks in advance, > > Nicolas DUMINIL > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/How-to-run-camel-cdi-projects-tp5781727.html > Sent from the Camel - Users mailing list archive at Nabble.com.