You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Philipp Kraus <ph...@tu-clausthal.de> on 2016/06/25 20:44:01 UTC

own Maven Site plugin

Hello,

I try to build my first Maven site plugin.
I have defined a class based on AbstractMojo and
put the annotation @Mojo( name = "rrd-antlr4", defaultPhase = LifecyclePhase.SITE )
on top.

I overload the execute-method and put my plugin content to the method. I build the plugin and deploy
it my local Maven repository. I’m testing my plugin in a testing project with the pom content
<reporting>

    <plugins>

        <plugin>
            <groupId>de.flashpixx</groupId>
            <artifactId>rrd-antlr4</artifactId>
            <version>0.1.0</version>
        </plugin>
…..

If I run "mvn site“ I get "[INFO] configuring report plugin de.flashpixx:rrd-antlr4:0.1.0“ but
the execute method is not run / called.

How I can debug the plugin or fix the execution of the plugin?

Thanks

Phil

Re: own Maven Site plugin

Posted by Benson Margulies <bi...@gmail.com>.
It has to be set up as a 'reporting' plugin. I recommend looking at
examples of other such plugins, such as
https://maven.apache.org/plugins/maven-project-info-reports-plugin/

On Sat, Jun 25, 2016 at 4:44 PM, Philipp Kraus
<ph...@tu-clausthal.de> wrote:
> Hello,
>
> I try to build my first Maven site plugin.
> I have defined a class based on AbstractMojo and
> put the annotation @Mojo( name = "rrd-antlr4", defaultPhase = LifecyclePhase.SITE )
> on top.
>
> I overload the execute-method and put my plugin content to the method. I build the plugin and deploy
> it my local Maven repository. I’m testing my plugin in a testing project with the pom content
> <reporting>
>
>     <plugins>
>
>         <plugin>
>             <groupId>de.flashpixx</groupId>
>             <artifactId>rrd-antlr4</artifactId>
>             <version>0.1.0</version>
>         </plugin>
> …..
>
> If I run "mvn site“ I get "[INFO] configuring report plugin de.flashpixx:rrd-antlr4:0.1.0“ but
> the execute method is not run / called.
>
> How I can debug the plugin or fix the execution of the plugin?
>
> Thanks
>
> Phil

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


Re: own Maven Site plugin

Posted by Hervé BOUTEMY <he...@free.fr>.
IIRC, you're trying to create a reporting plugin, ie a report that can 
contribute to a Maven site

maven-reporting-impl is the component you need, with included example:
http://maven.apache.org/shared/maven-reporting-impl/

Regards,

Hervé

Le samedi 25 juin 2016 22:44:01 Philipp Kraus a écrit :
> Hello,
> 
> I try to build my first Maven site plugin.
> I have defined a class based on AbstractMojo and
> put the annotation @Mojo( name = "rrd-antlr4", defaultPhase =
> LifecyclePhase.SITE ) on top.
> 
> I overload the execute-method and put my plugin content to the method. I
> build the plugin and deploy it my local Maven repository. I’m testing my
> plugin in a testing project with the pom content <reporting>
> 
>     <plugins>
> 
>         <plugin>
>             <groupId>de.flashpixx</groupId>
>             <artifactId>rrd-antlr4</artifactId>
>             <version>0.1.0</version>
>         </plugin>
> …..
> 
> If I run "mvn site“ I get "[INFO] configuring report plugin
> de.flashpixx:rrd-antlr4:0.1.0“ but the execute method is not run / called.
> 
> How I can debug the plugin or fix the execution of the plugin?
> 
> Thanks
> 
> Phil


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