Hi!

Am Dienstag, 10. November 2009 16:58:48 schrieb Gajo Csaba:
> Is there a way for a Maven plugin (Mojo) to detect if it has been called
> from the console, and not from pom.xml as part of the lifecycle? I have
> a Mojo which has @requiresProject false, and I execute it like mvn
> pluginname:dostuff
>
> But it also can be called from pom.xml, as part of a lifecycle.
>
> If it's called from the shell, I would like the user to input some
> parameters from the console.

Have a look at the release-plugin [0]. If the --batch-mode parameter of maven 
is given, it doesn't ask the user for input but expects some variables to be 
defined.

hth,
- martin

[0] 
http://maven.apache.org/plugins/maven-release-plugin/examples/non-interactive-release.html

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to