2009/5/26 janszm <[email protected]> > > > Baptiste MATHUS wrote: > > > > Well, it depends on what you want to do. > > Maven is not designed to be used as a scripting engine for administration > > tasks. > > > > Do you want to do this as a part of your packaging/build process? If so, > > then look at Stephen answer. If you want to script something moving in a > > production envt, then just use shell or ant. > > > > Thanks (and Stephen also). I am trying to run this as part of my build > process, as the output files are then used to generate Java classes via > JAXB. > > So am I correct in thinking that the Maven approach would be to create a > plugin in this case, rather than using ant? >
Yes, that's it. > > I'm a bit confused to be honest after reading the latest Maven docs on > whether everything should now be done writing Java plugins (this sometimes Not completely true. See below. > feels like overkill to me). And also whether in the latest version of > Maven, > ant is still the preferred scripting approach, as I also see references to > beanshell. If you see it as overkill, you'll be happy to know that you can actually write the plugin in many different languages. Only the "plugin" approach is recommended to be able to cleanly manage what is done by what, but not the language. I didn't experiment other language than Java myself, but see Stan's answer to see how to use Groovy scripting, for example. Cheers. -- Baptiste <Batmat> MATHUS - http://batmat.net Sauvez un arbre, Mangez un castor !
