Wendy Smoak wrote:
On Fri, Jul 4, 2008 at 6:35 PM, Morgovsky, Alexander (US - Glen Mills)
<[EMAIL PROTECTED]> wrote:
However, when I bound this plugin to a phase in the pom.xml (e.g.
deploy) and ran the following:
mvn deploy
Then the plugin executed correctly. Why doesnt the plugin work from the
command line when invoked directly but only works in the POM.xml when
bound to a phase? Please let me know what Im doing wrong. Thanks.
When you type 'mvn deploy' you are not invoking the deploy plugin,
you're telling Maven to go through the build lifecycle and execute all
the plugins bound to the various phases up to and including the deploy
phase. The default executions will depend on the packaging for that
pom, and then whatever additional plugins you have configured will
also be executed.
My guess is that the plugin goal needs something from one of the
earlier phases, so executing it in isolation doesn't work.
If your plugin requires the results of another phase, you might want to
add a @phase annotation [1] for it in the source code of the mojo.
[1]
http://maven.apache.org/developers/mojo-api-specification.html#The_Descriptor_and_Annotations
--
Dennis Lundberg
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]