You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Igor Deruga <in...@hotbox.ru> on 2005/05/23 04:19:45 UTC
Plugins execution sequence
Dear list members,
I am trying to write a plugin that is performing some post-installation
actions. All that I have is a maven-install-plugin with InstallMojo.java
re-written to suit my needs. Due to completely rewritten execute()
procedure, I have to run my plugin this way: "m2 clean:clean install
myplgn:install". I'd like the original install target to be executed
automaticaly before myplgn:install target. Is there a way to do it?
One more thing: something was said in the list about plugin.xml
configuration file. Is there any documentation on this topic? I know
that m2 docs are raw but the hope remains ;)
Sincerely
Igor Deruga
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Plugins execution sequence
Posted by Igor Deruga <in...@hotbox.ru>.
Thanks, Brett!
Got it.
Brett Porter wrote:
>On 5/23/05, Igor Deruga <in...@hotbox.ru> wrote:
>
>
>>I am trying to write a plugin that is performing some post-installation
>>actions. All that I have is a maven-install-plugin with InstallMojo.java
>>re-written to suit my needs. Due to completely rewritten execute()
>>procedure, I have to run my plugin this way: "m2 clean:clean install
>>myplgn:install". I'd like the original install target to be executed
>>automaticaly before myplgn:install target. Is there a way to do it?
>>
>>
>
>If you add your plugin configuration to the POM, including a goal for
>install, and add:
>@phase install
>to your mojo, it will call your goal when the install goal is called.
>See the previous thread with Matthew for more explanation.
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Plugins execution sequence
Posted by Brett Porter <br...@gmail.com>.
On 5/23/05, Igor Deruga <in...@hotbox.ru> wrote:
> I am trying to write a plugin that is performing some post-installation
> actions. All that I have is a maven-install-plugin with InstallMojo.java
> re-written to suit my needs. Due to completely rewritten execute()
> procedure, I have to run my plugin this way: "m2 clean:clean install
> myplgn:install". I'd like the original install target to be executed
> automaticaly before myplgn:install target. Is there a way to do it?
If you add your plugin configuration to the POM, including a goal for
install, and add:
@phase install
to your mojo, it will call your goal when the install goal is called.
See the previous thread with Matthew for more explanation.
> One more thing: something was said in the list about plugin.xml
> configuration file. Is there any documentation on this topic? I know
> that m2 docs are raw but the hope remains ;)
http://maven.apache.org/maven2/developers/mojo-api-specification.html
It is unnecessary to know the format of the plugin descriptor as it is
generated automatically and used behind the scenes (but it can be
helpful to look into it to see if it matches what you thought you said
in your mojo). It is META-INF/maven/plugin.xml.
- Brett
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org