Hi Wendell,
You have 3 options:
- invoke ant task directly within your mojo by setting up the neccesary
dependencies
then call the ant task class' execute method.
- Invoke the maven-executor-plugin, a generic mojo to invoke any java's
main method.
It is still in the sanbox of at http://mojo.codehause.com
- I also have maven-exec-plugin, still in my local diskspace, which can
invoke any
native executable. I have not proposed to check it into
mojo.codehaus.com<http://mojo.codehaus.com>'s
sanbox
yet, since i dont see a demand for it yet.
-D
On 9/7/05, Wendell Beckwith <[EMAIL PROTECTED]> wrote:
>
> I'm now trying to write a maven 2 plugin to execute a 2rd party's tools
> command line class. The class is written is java. The tool also has an ant
> task which just uses the Java task in ant to invoke the command line tool
> in
> a forked jvm. Does m2 already provide such functionality and I just haven
> seen it? Or barring that, can I add a dependency on a set of plugins that
> will allow my plugn to instantiate the the ant Java task, configure it and
> then call its execute() method.
>
> I'm trying to avoid having end users create an additional build.xml,
> instead
> I'd rather they just configure my plugin in the pom, and I can internally
> configure the ant Java task and invoke it.
>
> Wb
>
>