On Fri, Jan 27, 2012 at 2:34 PM, Christian Schneider <ch...@die-schneider.net> wrote: > Sounds ok to me to have two archetypes then. We should make sure people > understand the purpose of the different archetypes though. > > In my opionion the archetypes are quite unflexible anyway. What we really > would need is the possibility to add "features" to an existing project. > Like "add a jms component", "add a RouteBuilder with javaDSL", ... a bit > like spring roo. >
Yeah that is a Maven issue, that the archetypes, can only be sort of used for creating an initial project. And they are in-light of "ruby on rails / grails / roo " shells, seems very inflexible. But thats the best we got with Maven. Yeah it would be nice with a kind of "roo" shell for developing Java applications, that is Maven based, and has a plugin system. However many IDE have wizards for doing certain tasks, such as web services / REST / JDBC etc. So there is some tooling there. However that said, I think we should have an archetype for creating a plain Java based project, and thus camel-archetype-java, should be changed to that. I will log a JIRA. > Christian > > > Am 27.01.2012 08:01, schrieb Claus Ibsen: > >> On Wed, Jan 25, 2012 at 4:14 PM, Christian Schneider >> <ch...@die-schneider.net> wrote: >>> >>> Am 25.01.2012 14:58, schrieb Claus Ibsen: >>> >>>> It is *not* trivial for people getting started with Camel to figure >>>> out how to use a Spring XML file for the regular Spring stuff. >>>> And then how to add Camel in there, and use the Java DSL. >>>> >>>> As you need to add<package>com.foo</package> or use a >>>> <routeBuilderRef> etc. to link the Spring XML file to the Java >>>> RouteBuilder. >>>> >>>> There are two kind of people getting started with Camel. >>>> >>>> 1) People who would avoid Java code and do as much in XML >>>> 2) People wo are more savy coders and want to use Java code, but >>>> Spring XML for their bean configuration. >>>> >>>> If you have a single archetype for 1+2 then it *confuses people*. >>>> >>> What I meant is that it is easy to add a camel route to a spring config >>> when >>> the camel context is already defined as a bean. >>> So if people have an archetype that uses a camel context in spring and a >>> Java route builder then adding an xml route >>> is easy and removing the a java route builder is also easy. We could even >>> define a route in java and another in xml to show both cases >>> in the same archetype. >>> >> IMHO this will confuse people. Best practice is that people either do >> routes in Java only, or XML only. >> Not really a mix of both worlds. >> >> The archetype is a great way for people getting started with Camel, >> and for end users, to quickly create a new Camel project. >> >> All they need to remember is to type >> mvn archetype:generate >> and then follow the instructions. >> >> The problem with an archetype that does both, is like some of our >> examples, they have too much in the same example. >> Then people do not know how to differentiate what is what. And why the >> pom.xml file has so many dependencies, or different moving parts etc. >> >> People will also be "afraid" what to remove? And how to do that. As >> you would need to modify both XML and java source code to remove it >> completely etc. >> >> >> >>> In my experience it is much easier for people to delete unneeded parts >>> than >>> adding new parts. So that could work. >>> >> Only for experienced developers. For people getting started, they do >> not know what to do and what to remove etc. >> >> >> >>> Christian >>> >>> -- >>> Christian Schneider >>> http://www.liquid-reality.de >>> >>> Open Source Architect >>> Talend Application Integration Division http://www.talend.com >>> >> >> > > > -- > Christian Schneider > http://www.liquid-reality.de > > Open Source Architect > Talend Application Integration Division http://www.talend.com > -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/