You're going to have to give the fully qualified path name to "mvn.bat"... like "-Dexec.executable=C:\maven2.0.4\bin\mvn.bat"... or you can set that value in the pom's properties file.
Now, don't think that I condone this at all - I think you'll be hard pressed to find anyone here who does. I'm just pointing out that it's possible. Eric On 12/11/06, Deluigi Marcus <[EMAIL PROTECTED]> wrote:
That's a great idea! However, how do I tell the exec-plugin where to find maven itself? When I try: --- mvn exec:exec -Dexec.executable="maven" -Dexec.args="clean" --- I get the following error message: [INFO] ------------------------------------------------------------------------ ---- [INFO] [exec:exec] [INFO] 'd:\SourceCode\web-app-template\refdb\web\mvn' is not recognized as an internal or external command, [INFO] operable program or batch file. [INFO] ------------------------------------------------------------------------ ---- It seems as if he tries to call the executable from the current directory, which is, of course, not possible. I also don't want to provide an absolute path. I want that the program searches the program within the defined path of the environments 'path' varariable. > -----Original Message----- > From: Eric Redmond [mailto:[EMAIL PROTECTED] > Sent: Donnerstag, 7. Dezember 2006 16:07 > To: Maven Users List > Subject: Re: User-defined phase > > The phases are community defined, and there are no plans to ever change > that. This is why Maven is easy to understand and use wherever you go - > rather than having to learn a bunch of "custom" stuff. If you really want to > coallate your work into a single command, try using the "exec" goal: > http://mojo.codehaus.org/exec-maven-plugin/ > > Eric > > On 12/7/06, Deluigi Marcus <[EMAIL PROTECTED]> wrote: > > > > Hi > > > > I want to abuse maven to perform a setup for a testing environment, such > > as starting derby, starting a tomcat and deploying a WAR file which is > > another project. > > > > Maven does a fine job in downloading all the required software if > > necessary and building the WAR file which it is another project. > > Besides, it is platform independent, so I am using it for all these > > tasks. > > > > But I don't want to enter all these commands on the command line all the > > time. I think a much nicer way would be to add a custom phase (such as > > 'start-environment') to the module. When I am developing, I would like > > to be able to execute only this phase, without the life-cycle. > > > > Is something like that possible? > > Of course, I can make a shell-script but I think adding a custom phase > > to the project would be a nice thing. > > > > > > > > Greetings > > Marcus > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > Eric Redmond > http://codehaus.org/~eredmond --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Eric Redmond http://codehaus.org/~eredmond