You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Milos Kleint <mk...@gmail.com> on 2005/04/13 11:48:02 UTC

[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?

thanks  alot

milos kleint

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


RE: [M2] plugin that uses ant targets?

Posted by Vincent Massol <vm...@pivolis.com>.

> -----Original Message-----
> From: Milos Kleint [mailto:mkleint@gmail.com]
> 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org