Hi!

On 21 July 2012 10:45, Tamás Cservenák <ta...@cservenak.net> wrote:
> You cannot have that, you need to bind the goal at least (and goal usually
> have a "preferred" phase it will bind to).
> Plugin that does not have execution defined but it still executes (as you
> say you'd want) is usually bound to lifecycle of the packaging in it's
> lifecycle mapping. So, unless you write your own packaging (I doubt this is
> what you need), you are left to declare plugin _with_ executions.

This is what I want. I want to package my plugin so that it knows
which phase to execute in. It is also ok for my use case if the
execution phase is impossible to change.

But it is either a well guarded secret how to package a plugin so it
has knowledge about when it should be executed or impossible.

So, assuming that it is a matter of packaging, does anybody have any
good pointers I could look at?

/Thomas





>
> Thanks,
> ~t~
>
> On Sat, Jul 21, 2012 at 10:13 AM, Thomas Sundberg <t...@kth.se> wrote:
>
>> Hi!
>>
>> I am trying to write my own Maven plugin. I want to be able to specify
>> it in a build without specifying any additional parameters. I don't
>> seem to find any example after some googling. In a perfect world, I
>> would like to write my pom like this:
>>
>>     <build>
>>         <plugins>
>>             <plugin>
>>                 <groupId>se.somath</groupId>
>>                 <artifactId>publisher-plugin</artifactId>
>>                 <version>1.0-SNAPSHOT</version>
>>             </plugin>
>>         </plugins>
>>     </build>
>>
>> That is, just specify that this plugin should be used.
>>
>> At the moment I have to specify it like this:
>>
>>     <build>
>>         <plugins>
>>             <plugin>
>>                 <groupId>se.somath</groupId>
>>                 <artifactId>publisher-plugin</artifactId>
>>                 <version>1.0-SNAPSHOT</version>
>>                 <executions>
>>                     <execution>
>>                         <goals>
>>                             <goal>process</goal>
>>                         </goals>
>>                     </execution>
>>                 </executions>
>>             </plugin>
>>         </plugins>
>>     </build>
>>
>> Currently I have just one goal and it doesn't take any parameters.
>>
>> This question might be better to send to the developers list, but I
>> don't follow that list and I assume that there are some mojo
>> developers following this list that might be able to assist me.
>>
>> Thomas
>>
>> --
>> Thomas Sundberg
>> M. Sc. in Computer Science
>>
>> Mobile: +46 70 767 33 15
>> Blog: http://thomassundberg.wordpress.com/
>> Twitter: @thomassundberg
>>
>> Better software through faster feedback
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to