You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by David Sag <ds...@epo.org> on 2005/10/17 09:30:54 UTC

[m2] writing a Mojo for a plugin that requires Reports to have been run

Hi all,

I am writing an M2 plugin for QALab.  QALab aggregates the reports from 
other plugins such as checkstyle etc.

In my plugin.xml file there is a tag 
<requiresReports>false</requiresReports> and so I guessed that setting

@requiresReports

 at the to of my Mojo would change this flat to true when i regenerate the 
plugin.xml file.  but it does not.

also while I am at it, I am curious as to the role of the aggregator tag

Kind regards,
Dave Sag 




 

Re: [m2] writing a Mojo for a plugin that requires Reports to have been run

Posted by David Sag <ds...@epo.org>.
Done.  see http://jira.codehaus.org/browse/MNG-1298

Kind regards,
Dave Sag 




 



Brett Porter <br...@gmail.com> 
21/10/05 09:51 PM
Please respond to
"Maven Users List" <us...@maven.apache.org>


To
Maven Users List <us...@maven.apache.org>
cc

Subject
Re: [m2] writing a Mojo for a plugin that requires Reports to have been 
run






I see. This capability is not really available right now other than by
correctly ordering them in the POM. Please file a JIRA issue.

-Brett

On 10/19/05, David Sag <ds...@epo.org> wrote:
>
>
> Hmm sorry we seem to be t cross-purposes here.
>
> All I want to do is to ensure that the various reports have been run. I
> don't need to access the liost of registered reports specifically. 
unless i
> suppose i wish to check from within my mojo that the other reports have 
been
> run. i am probably just failing to understand you properly.
>
> Kind regards,
> Dave Sag
>
>
>
>
>
>
> Brett Porter <br...@gmail.com> wrote on 20/10/2005 03:09:30 AM:
>
> > It's not a dummy parameter, it's the parameter that will give you the
> > reports. Without it, how do you hope to access the list of registered
> > reports at all?
> >
> > - Brett
> >
> > On 10/18/05, David Sag <ds...@epo.org> wrote:
> > >
> > >
> > > What I need is acccess to the various checkstyle (etc) reports in an
> xml
> > > format.
> > >
> > > what you describe below doesn't seem appropriate to me. My 
parameters
> > > already have various expressions and default values but i do need to
> ensure
> > > that the checkstyle (etc) plugins have already been run, before
> myplugin is
> > > run.
> > >
> > > requiresReports is a goal-wide setting, not specific to a parameter,
> so i
> > > guess what i am assking is
> > >
> > > 1) what is that tag actually for
> > > 2) how to set it to true
> > >
> > > if you are saying that to set that tag to true i need to create a
> dummy
> > > parameter with @parameter expression="${reports}" set then i really
> feel
> > > that's a very stupid hack.
> > >
> > > why not just let me set @requiresReports in the very top of my mojo
> where
> > > the @goal, @phase and @requiresDependencyResolution tags live.
> > >
> > > Kind regards,
> > > Dave Sag
> > >
> > >
> > >
> > >
> > >
> > >
> > > Brett Porter <br...@gmail.com> wrote on 18/10/2005 04:58:26 
AM:
> > >
> > > > You need to use the reports, so declare:
> > > >
> > > > @parameter expression="${reports}"
> > > >
> > > > That will trigger it. But are you sure you relly need access to 
the
> > > reports?
> > > > That's generally only for the site plugin.
> > > >
> > > > The aggregator tag causes the mojo not to be run for subprojects,
> > > instead it
> > > > is run at the root and you have access to ${reactorProjects}
> > > >
> > > > On 10/17/05, David Sag <ds...@epo.org> wrote:
> > > > >
> > > > >
> > > > > Hi all,
> > > > >
> > > > > I am writing an M2 plugin for QALab. QALab aggregates the 
reports
> from
> > > > > other plugins such as checkstyle etc.
> > > > >
> > > > > In my plugin.xml file there is a tag
> > > > > <requiresReports>false</requiresReports> and so I guessed that
> setting
> > > > >
> > > > > @requiresReports
> > > > >
> > > > > at the to of my Mojo would change this flat to true when i
> regenerate
> > > the
> > > > > plugin.xml file. but it does not.
> > > > >
> > > > > also while I am at it, I am curious as to the role of the
> aggregator
> > > tag
> > > > >
> > > > > Kind regards,
> > > > > Dave Sag
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > >
>


Re: [m2] writing a Mojo for a plugin that requires Reports to have been run

Posted by Brett Porter <br...@gmail.com>.
I see. This capability is not really available right now other than by
correctly ordering them in the POM. Please file a JIRA issue.

-Brett

On 10/19/05, David Sag <ds...@epo.org> wrote:
>
>
> Hmm sorry we seem to be t cross-purposes here.
>
> All I want to do is to ensure that the various reports have been run. I
> don't need to access the liost of registered reports specifically. unless i
> suppose i wish to check from within my mojo that the other reports have been
> run. i am probably just failing to understand you properly.
>
> Kind regards,
> Dave Sag
>
>
>
>
>
>
> Brett Porter <br...@gmail.com> wrote on 20/10/2005 03:09:30 AM:
>
> > It's not a dummy parameter, it's the parameter that will give you the
> > reports. Without it, how do you hope to access the list of registered
> > reports at all?
> >
> > - Brett
> >
> > On 10/18/05, David Sag <ds...@epo.org> wrote:
> > >
> > >
> > > What I need is acccess to the various checkstyle (etc) reports in an
> xml
> > > format.
> > >
> > > what you describe below doesn't seem appropriate to me. My parameters
> > > already have various expressions and default values but i do need to
> ensure
> > > that the checkstyle (etc) plugins have already been run, before
> myplugin is
> > > run.
> > >
> > > requiresReports is a goal-wide setting, not specific to a parameter,
> so i
> > > guess what i am assking is
> > >
> > > 1) what is that tag actually for
> > > 2) how to set it to true
> > >
> > > if you are saying that to set that tag to true i need to create a
> dummy
> > > parameter with @parameter expression="${reports}" set then i really
> feel
> > > that's a very stupid hack.
> > >
> > > why not just let me set @requiresReports in the very top of my mojo
> where
> > > the @goal, @phase and @requiresDependencyResolution tags live.
> > >
> > > Kind regards,
> > > Dave Sag
> > >
> > >
> > >
> > >
> > >
> > >
> > > Brett Porter <br...@gmail.com> wrote on 18/10/2005 04:58:26 AM:
> > >
> > > > You need to use the reports, so declare:
> > > >
> > > > @parameter expression="${reports}"
> > > >
> > > > That will trigger it. But are you sure you relly need access to the
> > > reports?
> > > > That's generally only for the site plugin.
> > > >
> > > > The aggregator tag causes the mojo not to be run for subprojects,
> > > instead it
> > > > is run at the root and you have access to ${reactorProjects}
> > > >
> > > > On 10/17/05, David Sag <ds...@epo.org> wrote:
> > > > >
> > > > >
> > > > > Hi all,
> > > > >
> > > > > I am writing an M2 plugin for QALab. QALab aggregates the reports
> from
> > > > > other plugins such as checkstyle etc.
> > > > >
> > > > > In my plugin.xml file there is a tag
> > > > > <requiresReports>false</requiresReports> and so I guessed that
> setting
> > > > >
> > > > > @requiresReports
> > > > >
> > > > > at the to of my Mojo would change this flat to true when i
> regenerate
> > > the
> > > > > plugin.xml file. but it does not.
> > > > >
> > > > > also while I am at it, I am curious as to the role of the
> aggregator
> > > tag
> > > > >
> > > > > Kind regards,
> > > > > Dave Sag
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > >
>

Re: [m2] writing a Mojo for a plugin that requires Reports to have been run

Posted by David Sag <ds...@epo.org>.
Hmm sorry we seem to be t cross-purposes here.

All I want to do is to ensure that the various reports have been run.  I 
don't need to access the liost of registered reports specifically.  unless 
i suppose i wish to check from within my mojo that the other reports have 
been run.  i am probably just failing to understand you properly.

Kind regards,
Dave Sag 




 

Brett Porter <br...@gmail.com> wrote on 20/10/2005 03:09:30 AM:

> It's not a dummy parameter, it's the parameter that will give you the
> reports. Without it, how do you hope to access the list of registered
> reports at all?
> 
> - Brett
> 
> On 10/18/05, David Sag <ds...@epo.org> wrote:
> >
> >
> > What I need is acccess to the various checkstyle (etc) reports in an 
xml
> > format.
> >
> > what you describe below doesn't seem appropriate to me. My parameters
> > already have various expressions and default values but i do need to 
ensure
> > that the checkstyle (etc) plugins have already been run, before 
myplugin is
> > run.
> >
> > requiresReports is a goal-wide setting, not specific to a parameter, 
so i
> > guess what i am assking is
> >
> > 1) what is that tag actually for
> > 2) how to set it to true
> >
> > if you are saying that to set that tag to true i need to create a 
dummy
> > parameter with @parameter expression="${reports}" set then i really 
feel
> > that's a very stupid hack.
> >
> > why not just let me set @requiresReports in the very top of my mojo 
where
> > the @goal, @phase and @requiresDependencyResolution tags live.
> >
> > Kind regards,
> > Dave Sag
> >
> >
> >
> >
> >
> >
> > Brett Porter <br...@gmail.com> wrote on 18/10/2005 04:58:26 AM:
> >
> > > You need to use the reports, so declare:
> > >
> > > @parameter expression="${reports}"
> > >
> > > That will trigger it. But are you sure you relly need access to the
> > reports?
> > > That's generally only for the site plugin.
> > >
> > > The aggregator tag causes the mojo not to be run for subprojects,
> > instead it
> > > is run at the root and you have access to ${reactorProjects}
> > >
> > > On 10/17/05, David Sag <ds...@epo.org> wrote:
> > > >
> > > >
> > > > Hi all,
> > > >
> > > > I am writing an M2 plugin for QALab. QALab aggregates the reports 
from
> > > > other plugins such as checkstyle etc.
> > > >
> > > > In my plugin.xml file there is a tag
> > > > <requiresReports>false</requiresReports> and so I guessed that 
setting
> > > >
> > > > @requiresReports
> > > >
> > > > at the to of my Mojo would change this flat to true when i 
regenerate
> > the
> > > > plugin.xml file. but it does not.
> > > >
> > > > also while I am at it, I am curious as to the role of the 
aggregator
> > tag
> > > >
> > > > Kind regards,
> > > > Dave Sag
> > > >
> > > >
> > > >
> > > >
> > > >
> >

Re: [m2] writing a Mojo for a plugin that requires Reports to have been run

Posted by Brett Porter <br...@gmail.com>.
It's not a dummy parameter, it's the parameter that will give you the
reports. Without it, how do you hope to access the list of registered
reports at all?

- Brett

On 10/18/05, David Sag <ds...@epo.org> wrote:
>
>
> What I need is acccess to the various checkstyle (etc) reports in an xml
> format.
>
> what you describe below doesn't seem appropriate to me. My parameters
> already have various expressions and default values but i do need to ensure
> that the checkstyle (etc) plugins have already been run, before my plugin is
> run.
>
> requiresReports is a goal-wide setting, not specific to a parameter, so i
> guess what i am assking is
>
> 1) what is that tag actually for
> 2) how to set it to true
>
> if you are saying that to set that tag to true i need to create a dummy
> parameter with @parameter expression="${reports}" set then i really feel
> that's a very stupid hack.
>
> why not just let me set @requiresReports in the very top of my mojo where
> the @goal, @phase and @requiresDependencyResolution tags live.
>
> Kind regards,
> Dave Sag
>
>
>
>
>
>
> Brett Porter <br...@gmail.com> wrote on 18/10/2005 04:58:26 AM:
>
> > You need to use the reports, so declare:
> >
> > @parameter expression="${reports}"
> >
> > That will trigger it. But are you sure you relly need access to the
> reports?
> > That's generally only for the site plugin.
> >
> > The aggregator tag causes the mojo not to be run for subprojects,
> instead it
> > is run at the root and you have access to ${reactorProjects}
> >
> > On 10/17/05, David Sag <ds...@epo.org> wrote:
> > >
> > >
> > > Hi all,
> > >
> > > I am writing an M2 plugin for QALab. QALab aggregates the reports from
> > > other plugins such as checkstyle etc.
> > >
> > > In my plugin.xml file there is a tag
> > > <requiresReports>false</requiresReports> and so I guessed that setting
> > >
> > > @requiresReports
> > >
> > > at the to of my Mojo would change this flat to true when i regenerate
> the
> > > plugin.xml file. but it does not.
> > >
> > > also while I am at it, I am curious as to the role of the aggregator
> tag
> > >
> > > Kind regards,
> > > Dave Sag
> > >
> > >
> > >
> > >
> > >
>

Re: [m2] writing a Mojo for a plugin that requires Reports to have been run

Posted by David Sag <ds...@epo.org>.
You are a few steps ahead of me I am afraid.  My plan was to specify the 
reports that get run in the pom.xml and configure qalab to use whatever 
reports i have decided need to be reported on via config parameters.  I've 
so far only used the checkstyle plugin in this context.

i guess I could specify that the qalab report goes on the end of the list 
of reports, but then what is the 'requiresReports' tag actually used for?

Kind regards,
Dave Sag 




 

Wim Deblauwe <wi...@gmail.com> wrote on 18/10/2005 10:50:13 AM:

> Wouldn't it be good to also be able to specify on what other reports you
> depend? For instance, the pmd report depends on the jxr report to link 
to
> the source code.
> 
> regards,
> 
> Wim
> 
> 2005/10/18, David Sag <ds...@epo.org>:
> >
> >
> > What I need is acccess to the various checkstyle (etc) reports in an 
xml
> > format.
> >
> > what you describe below doesn't seem appropriate to me. My parameters
> > already have various expressions and default values but i do need to 
ensure
> > that the checkstyle (etc) plugins have already been run, before 
myplugin is
> > run.
> >
> > requiresReports is a goal-wide setting, not specific to a parameter, 
so i
> > guess what i am assking is
> >
> > 1) what is that tag actually for
> > 2) how to set it to true
> >
> > if you are saying that to set that tag to true i need to create a 
dummy
> > parameter with @parameter expression="${reports}" set then i really 
feel
> > that's a very stupid hack.
> >
> > why not just let me set @requiresReports in the very top of my mojo 
where
> > the @goal, @phase and @requiresDependencyResolution tags live.
> >
> > Kind regards,
> > Dave Sag
> >
> >
> >
> >
> >
> >
> > Brett Porter <br...@gmail.com> wrote on 18/10/2005 04:58:26 AM:
> >
> > > You need to use the reports, so declare:
> > >
> > > @parameter expression="${reports}"
> > >
> > > That will trigger it. But are you sure you relly need access to the
> > reports?
> > > That's generally only for the site plugin.
> > >
> > > The aggregator tag causes the mojo not to be run for subprojects,
> > instead it
> > > is run at the root and you have access to ${reactorProjects}
> > >
> > > On 10/17/05, David Sag <ds...@epo.org> wrote:
> > > >
> > > >
> > > > Hi all,
> > > >
> > > > I am writing an M2 plugin for QALab. QALab aggregates the reports 
from
> > > > other plugins such as checkstyle etc.
> > > >
> > > > In my plugin.xml file there is a tag
> > > > <requiresReports>false</requiresReports> and so I guessed that 
setting
> > > >
> > > > @requiresReports
> > > >
> > > > at the to of my Mojo would change this flat to true when i 
regenerate
> > the
> > > > plugin.xml file. but it does not.
> > > >
> > > > also while I am at it, I am curious as to the role of the 
aggregator
> > tag
> > > >
> > > > Kind regards,
> > > > Dave Sag
> > > >
> > > >
> > > >
> > > >
> > > >
> >

Re: [m2] writing a Mojo for a plugin that requires Reports to have been run

Posted by Wim Deblauwe <wi...@gmail.com>.
Wouldn't it be good to also be able to specify on what other reports you
depend? For instance, the pmd report depends on the jxr report to link to
the source code.

regards,

Wim

2005/10/18, David Sag <ds...@epo.org>:
>
>
> What I need is acccess to the various checkstyle (etc) reports in an xml
> format.
>
> what you describe below doesn't seem appropriate to me. My parameters
> already have various expressions and default values but i do need to ensure
> that the checkstyle (etc) plugins have already been run, before my plugin is
> run.
>
> requiresReports is a goal-wide setting, not specific to a parameter, so i
> guess what i am assking is
>
> 1) what is that tag actually for
> 2) how to set it to true
>
> if you are saying that to set that tag to true i need to create a dummy
> parameter with @parameter expression="${reports}" set then i really feel
> that's a very stupid hack.
>
> why not just let me set @requiresReports in the very top of my mojo where
> the @goal, @phase and @requiresDependencyResolution tags live.
>
> Kind regards,
> Dave Sag
>
>
>
>
>
>
> Brett Porter <br...@gmail.com> wrote on 18/10/2005 04:58:26 AM:
>
> > You need to use the reports, so declare:
> >
> > @parameter expression="${reports}"
> >
> > That will trigger it. But are you sure you relly need access to the
> reports?
> > That's generally only for the site plugin.
> >
> > The aggregator tag causes the mojo not to be run for subprojects,
> instead it
> > is run at the root and you have access to ${reactorProjects}
> >
> > On 10/17/05, David Sag <ds...@epo.org> wrote:
> > >
> > >
> > > Hi all,
> > >
> > > I am writing an M2 plugin for QALab. QALab aggregates the reports from
> > > other plugins such as checkstyle etc.
> > >
> > > In my plugin.xml file there is a tag
> > > <requiresReports>false</requiresReports> and so I guessed that setting
> > >
> > > @requiresReports
> > >
> > > at the to of my Mojo would change this flat to true when i regenerate
> the
> > > plugin.xml file. but it does not.
> > >
> > > also while I am at it, I am curious as to the role of the aggregator
> tag
> > >
> > > Kind regards,
> > > Dave Sag
> > >
> > >
> > >
> > >
> > >
>

Re: [m2] writing a Mojo for a plugin that requires Reports to have been run

Posted by David Sag <ds...@epo.org>.
What I need is acccess to the various checkstyle (etc) reports in an xml 
format.

what you describe below doesn't seem appropriate to me.  My parameters 
already have various expressions and default values but i do need to 
ensure that the checkstyle (etc) plugins have already been run, before my 
plugin is run.

requiresReports is a goal-wide setting, not specific to a parameter, so i 
guess what i am assking is

1) what is that tag actually for
2) how to set it to true

if you are saying that to set that tag to true i need to create a dummy 
parameter with @parameter expression="${reports}" set then i really feel 
that's a very stupid hack.

why not just let me set @requiresReports in the very top of my mojo where 
the @goal, @phase and @requiresDependencyResolution tags live.

Kind regards,
Dave Sag 




 

Brett Porter <br...@gmail.com> wrote on 18/10/2005 04:58:26 AM:

> You need to use the reports, so declare:
> 
> @parameter expression="${reports}"
> 
> That will trigger it. But are you sure you relly need access to the 
reports?
> That's generally only for the site plugin.
> 
> The aggregator tag causes the mojo not to be run for subprojects, 
instead it
> is run at the root and you have access to ${reactorProjects}
> 
> On 10/17/05, David Sag <ds...@epo.org> wrote:
> >
> >
> > Hi all,
> >
> > I am writing an M2 plugin for QALab. QALab aggregates the reports from
> > other plugins such as checkstyle etc.
> >
> > In my plugin.xml file there is a tag
> > <requiresReports>false</requiresReports> and so I guessed that setting
> >
> > @requiresReports
> >
> > at the to of my Mojo would change this flat to true when i regenerate 
the
> > plugin.xml file. but it does not.
> >
> > also while I am at it, I am curious as to the role of the aggregator 
tag
> >
> > Kind regards,
> > Dave Sag
> >
> >
> >
> >
> >

Re: [m2] writing a Mojo for a plugin that requires Reports to have been run

Posted by Brett Porter <br...@gmail.com>.
You need to use the reports, so declare:

@parameter expression="${reports}"

That will trigger it. But are you sure you relly need access to the reports?
That's generally only for the site plugin.

The aggregator tag causes the mojo not to be run for subprojects, instead it
is run at the root and you have access to ${reactorProjects}

On 10/17/05, David Sag <ds...@epo.org> wrote:
>
>
> Hi all,
>
> I am writing an M2 plugin for QALab. QALab aggregates the reports from
> other plugins such as checkstyle etc.
>
> In my plugin.xml file there is a tag
> <requiresReports>false</requiresReports> and so I guessed that setting
>
> @requiresReports
>
> at the to of my Mojo would change this flat to true when i regenerate the
> plugin.xml file. but it does not.
>
> also while I am at it, I am curious as to the role of the aggregator tag
>
> Kind regards,
> Dave Sag
>
>
>
>
>