You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Michael Hartmeier <Mi...@softwareag.com> on 2003/05/21 10:34:50 UTC
dynamic goals
Hi!
I want to write a plugin that defines goals dynamically. MyPlugin
contains some Java classes and every suitable Java method has to be
defined as a goal. For example, the class Foo {
public static void bar() {
System.out.println("hello");
}
should result in a goal "MyPlugin:bar".
I have written a plugin.jelly goal "MyPlugin:init" that uses Java
reflection to get hold of the method names and defines the appropriate
goals. Everything works fine if I call init explicitly from maven.xml,
e.g. I can invoke
maven MyPlugin:foo
from the command line.
However, I want dynamic goals to be available like an arbitrary static
goal, without the need to define a maven.xml to initialize the plugin.
How can I get rid of this explicit init call in maven.xml? Is there a
mechanism to initialize plugin?
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org