> -----Original Message-----
> From: Milos Kleint [mailto:[EMAIL PROTECTED]
> Sent: mercredi 13 avril 2005 11:48
> To: dev@maven.apache.org
> Subject: [M2] plugin that uses ant targets?
> 
> hello,
> 
> I would like to rewrite the nbm plugin (generates Netbeans module
> files) from M1 to M2. Currently the plugin uses jelly to call ant
> targets coming from netbeans.org that take care of the correct
> packaging. I understand that in M2 I'm supposed to write java code.
> Any existing example of a M2 plugins that does simething like that?

Ant tasks are Java code! You can call them from Java easily as a standard
java class:

MyTask task = new MyTask();
task.setXXXX(...);
task.execute(...);

If they do need a Project object, then you can add:

Project project = new Project();

See also http://ant.apache.org/manual/index.html althouhg it's a bit old.
You can also check the Cargo source code which uses several Ant tasks. 

It's working great for me.

Thanks
-Vincent




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to