Bah. Ignore last. Hit send by mistake.

---
Todd Thiessen
  
> 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 there is. Plugin can have different executions. There is some
documentation about that here:

http://maven.apache.org/guides/introduction/introduction-to-the-lifecycl
e.html#Plugins

and I believe the definitive guide has some examples too.  You should be
able to execute the same exe with as many different parameters as you
like.

But you still would have to bind it to a phase, which you don't want to
do.  So I agree with you that Maven is definitely heavy weight if all
you wish to do is execute an exe with different parameters each time.
It doesn't do this nicely. You probably just want a simple script for
that.

> > 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...

Not at all.  If all I wanted to do is compile java code, then javac
would be the tool of choice.  But developers generally want to do a
whole lot more in conjuntion with compiling java code.  If all you want
to do is run some exe, then using ant or maven is somewhat overkill.  A
script does this just fine.

But if the reason why you are running this exe is somehow linked to
building your overall project, then binding it to a certain phase starts
to make sense. It all depends on what you want.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to