--- Todd Thiessen
> -----Original Message----- > From: Trevor Harmon [mailto:tre...@vocaro.com] > Sent: Tuesday, December 16, 2008 3:59 PM > To: Maven Users List > Subject: Re: Are Maven profiles like Ant targets? > > On Dec 16, 2008, at 2:54 PM, Todd Thiessen wrote: > > > They are more powerful in the sense that you can still call > any goal > > independantly > > But if I have two tasks implemented with AntRun, there's no > way to call them independently because there's only one goal: > run. I guess most of my problems boil down to the limitations > of the AntRun plugin. > > > Perhaps the doxia plugin would work? > > > > http://maven.apache.org/doxia/book/index.html > > That plugin is fine if you want to use DocBook as a source > for Doxia, but it's not designed for stand-alone > documentation created using DocBook and the DocBook XSL > stylesheets. The Xslt task in Ant works great for that, though. > > > Not sure what you are doing in your profile that solves your issue > > though. If you give some further info on this, perhaps some of the > > more experieced Maven users can provide you with a pure Maven > > solution. > > Let me use a different plugin as an example. Let's say I'm > developing a desktop application, and it runs in two > different modes depending on the command-line options. I > don't want to keep typing in the same long string of options > all the time, so I pickle them into two separate Ant targets, > "mode1" and "mode2". Then I can run them like this: > > ant mode1 > ant mode2 > > How would I accomplish this in Maven? There's the exec > plugin, but it has only one goal (exec:java). There's no way > to run the application in two different ways with just that > one goal. I believe that there is. I know you can configure a goal with different executions. There is a decent explanation here: > Not without profiles, that is. With profiles, I can > create two profiles, "mode1" and "mode2", and define an exec > plugin in each one. Then I can run them like this: > > mvn -Pmode1 exec:java > mvn -Pmode2 exec:java > > So there's an example where profiles have nothing to do with > build portability and are playing the same role as Ant targets. > > > If you wish to run something independently, you don't need ant or > > Maven for this. Run run the executable. > > Isn't that like saying Ant or Maven aren't necessary for > compiling Java code because you can just run the javac > executable? Doesn't make sense... > > Trevor > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org