Re: my plugin is invoked okay directly but not at all as part of site.
On Wed, 2005-10-26 at 08:35 +0200, David Sag wrote: > > I took the day off work yesterday as I was sick, and took the time to > check out all the maven-plugins stuff from SVN. Reading through the > code I 'discovered' reference to the AbstractMavenReport - something > that so far has not made its way into the documentation, and which > almost certainly explains why my QALabMojo (which only extends > AbstractMojo) is not working as a report :-) > > I'll look further into this today. Is there any documentation I > should be reading? Any more hidden classes I should know about? Or > shoudl I just read the entire source code? > > I'm still not quite sure how I tell the report which goal to run > however. I've noted it for documentation, but as always the best way is to look at an existing example. > Kind regards, > Dave Sag > > > > > > > Brett Porter <[EMAIL PROTECTED]> wrote on 24/10/2005 08:12:30 PM: > > > It's hard without a full POM to tell exactly what you are doing. Let > me > > explain how this is processed. > > > > Your Mojo should extend AbstractMavenReport, which enables it as > both a > > report and a mojo. > > > > When running as a mojo, configuration is used with first winning: > > 1) build plugin execution configuration > > 2) build plugin general configuration > > 3) reporting plugin general configuration > > > > When running as a report, configuration is used with the first > winning: > > 1) reporting plugin individual report configuration > > 2) reporting plugin general configuration > > > > So in general you configure the report in the reporting section, > adding > > configuration only specific to build executions in the build > section. > > > > Hope this helps. > > > > - Brett > > > > David Sag wrote: > > > > > > still more on this. > > > > > > if i move the configuration from out of the eexcutions and up into > the > > > main plugin thus: > > > > > > > > > com.davesag > > > qalab-plugin > > > > > > false > > > > net.objectlab.qalab.parser.CheckstyleStatMerge > > > > > > ${project.build.directory}/target/checkstyle-result. > > xml > > > > > > > > > > > > > > > > > > merge > > > > > > > > > > > > > > > > > > the configuration is recongnised okay. but that's no good for me > as i > > > need different configs for different goals. > > > > > > > > > Kind regards, > > > Dave Sag > > > > > > > > > > > > > > > > > > > > > David Sag <[EMAIL PROTECTED]> wrote on 24/10/2005 04:05:09 PM: > > > > > > > > > > > Even weirder - > > > > > > > > the below is slightly wrong. > > > > > > > > in my reporting block I must specify the plugin config again > thus: > > > > > > > > > > > > com.davesag > > > > qalab-plugin > > > > > > > > false > > > > > > > net.objectlab.qalab.parser.CheckstyleStatMerge > > > > > ${project.build.directory}/target/checkstyle- > > > > result.xml > > > > > > > > > > > > > > > > or maven claims that i have not specified any parameters. > > > > > > > > i still get nothing generated if i run mvn site however > > > > > > > > if i remove the entire reporting block i get the same error, as > if i > > > > had not configured it. > > > > > > > > so can someone please explain what the sotry is with plugin > > > > configuration? it seems you must configure plugins both in the > > > > build section AND the reporting section for anything to work. > > > > > > > > similarly for the javadoc plugin, as of the latest change, i > must > > > > now specify source = 1.4 in both the rewporting configuration > of the > > > > plugin, AND the build configuration of the plugin. > > > > > > > > am i just hopelessly confused? > > > > > > > > Kind regards, > > > > Dave Sag > > > > > > > > > > > > [image removed] > > > > > > > > > > > > > > > > David Sag <[EMAIL PROTECTED]> wrote on 24/10/2005 03:55:25 PM: > > > > > > > > > > > > > > Dear People, > > > > > > > > > > My mojo is built and installed. > > > > > > > > > > I have specified the goal and phase thus: > > > > > * @goal merge > > > > > * @phase validate > > > > > > > > > > I have added a reference to the block of a shell > project thus: > > > > > > > > > > > > > > > com.davesag > > > > > qalab-plugin > > > > > > > > > > > > > > > qalab-blah > > > > > validate > > > > > > > > > > false > > > > > net.objectlab.qalab.parser. > > > > > CheckstyleStatMerge > > > > > ${project.build.directory} > > > > > /target/checkstyle-result.xml > > > > > > > > > > > > > > > merge > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > when i type > > > > > > > > > > mvn qalab:merge > > > > > > > > > > i get an error
Re: my plugin is invoked okay directly but not at all as part of site.
I took the day off work yesterday as I was sick, and took the time to check out all the maven-plugins stuff from SVN. Reading through the code I 'discovered' reference to the AbstractMavenReport - something that so far has not made its way into the documentation, and which almost certainly explains why my QALabMojo (which only extends AbstractMojo) is not working as a report :-) I'll look further into this today. Is there any documentation I should be reading? Any more hidden classes I should know about? Or shoudl I just read the entire source code? I'm still not quite sure how I tell the report which goal to run however. Kind regards, Dave Sag Brett Porter <[EMAIL PROTECTED]> wrote on 24/10/2005 08:12:30 PM: > It's hard without a full POM to tell exactly what you are doing. Let me > explain how this is processed. > > Your Mojo should extend AbstractMavenReport, which enables it as both a > report and a mojo. > > When running as a mojo, configuration is used with first winning: > 1) build plugin execution configuration > 2) build plugin general configuration > 3) reporting plugin general configuration > > When running as a report, configuration is used with the first winning: > 1) reporting plugin individual report configuration > 2) reporting plugin general configuration > > So in general you configure the report in the reporting section, adding > configuration only specific to build executions in the build section. > > Hope this helps. > > - Brett > > David Sag wrote: > > > > still more on this. > > > > if i move the configuration from out of the eexcutions and up into the > > main plugin thus: > > > > > > com.davesag > > qalab-plugin > > > > false > > net.objectlab.qalab.parser.CheckstyleStatMerge > > > > ${project.build.directory}/target/checkstyle-result. > xml > > > > > > > > > > > > merge > > > > > > > > > > > > the configuration is recongnised okay. but that's no good for me as i > > need different configs for different goals. > > > > > > Kind regards, > > Dave Sag > > > > > > > > > > > > > > David Sag <[EMAIL PROTECTED]> wrote on 24/10/2005 04:05:09 PM: > > > > > > > > Even weirder - > > > > > > the below is slightly wrong. > > > > > > in my reporting block I must specify the plugin config again thus: > > > > > > > > > com.davesag > > > qalab-plugin > > > > > > false > > > > > net.objectlab.qalab.parser.CheckstyleStatMerge > > > ${project.build.directory}/target/checkstyle- > > > result.xml > > > > > > > > > > > > or maven claims that i have not specified any parameters. > > > > > > i still get nothing generated if i run mvn site however > > > > > > if i remove the entire reporting block i get the same error, as if i > > > had not configured it. > > > > > > so can someone please explain what the sotry is with plugin > > > configuration? it seems you must configure plugins both in the > > > build section AND the reporting section for anything to work. > > > > > > similarly for the javadoc plugin, as of the latest change, i must > > > now specify source = 1.4 in both the rewporting configuration of the > > > plugin, AND the build configuration of the plugin. > > > > > > am i just hopelessly confused? > > > > > > Kind regards, > > > Dave Sag > > > > > > > > > [image removed] > > > > > > > > > > > > David Sag <[EMAIL PROTECTED]> wrote on 24/10/2005 03:55:25 PM: > > > > > > > > > > > Dear People, > > > > > > > > My mojo is built and installed. > > > > > > > > I have specified the goal and phase thus: > > > > * @goal merge > > > > * @phase validate > > > > > > > > I have added a reference to the block of a shell project thus: > > > > > > > > > > > > com.davesag > > > > qalab-plugin > > > > > > > > > > > > qalab-blah > > > > validate > > > > > > > > false > > > > net.objectlab.qalab.parser. > > > > CheckstyleStatMerge > > > > ${project.build.directory} > > > > /target/checkstyle-result.xml > > > > > > > > > > > > merge > > > > > > > > > > > > > > > > > > > > > > > > when i type > > > > > > > > mvn qalab:merge > > > > > > > > i get an error telling me it can't read from the checkstyle results > > > > file. this is a reasonable result. > > > > > > > > BUT > > > > > > > > in the reporting section of the pom.xml I have added > > > > > > > > > > > > com.davesag > > > > qalab-plugin > > > > > > > > > > > > and when I type > > > > > > > > mvn site > > > > > > > > it's as if my plugin just wasn't even there. It never gets run. > > > > > > > > the checkstyle report is run (yet to work out how to get it to > > >
Re: my plugin is invoked okay directly but not at all as part of site.
It's hard without a full POM to tell exactly what you are doing. Let me explain how this is processed. Your Mojo should extend AbstractMavenReport, which enables it as both a report and a mojo. When running as a mojo, configuration is used with first winning: 1) build plugin execution configuration 2) build plugin general configuration 3) reporting plugin general configuration When running as a report, configuration is used with the first winning: 1) reporting plugin individual report configuration 2) reporting plugin general configuration So in general you configure the report in the reporting section, adding configuration only specific to build executions in the build section. Hope this helps. - Brett David Sag wrote: still more on this. if i move the configuration from out of the eexcutions and up into the main plugin thus: com.davesag qalab-plugin false net.objectlab.qalab.parser.CheckstyleStatMerge ${project.build.directory}/target/checkstyle-result.xml merge the configuration is recongnised okay. but that's no good for me as i need different configs for different goals. Kind regards, Dave Sag David Sag <[EMAIL PROTECTED]> wrote on 24/10/2005 04:05:09 PM: > > Even weirder - > > the below is slightly wrong. > > in my reporting block I must specify the plugin config again thus: > > > com.davesag > qalab-plugin > > false > net.objectlab.qalab.parser.CheckstyleStatMerge > ${project.build.directory}/target/checkstyle- > result.xml > > > > or maven claims that i have not specified any parameters. > > i still get nothing generated if i run mvn site however > > if i remove the entire reporting block i get the same error, as if i > had not configured it. > > so can someone please explain what the sotry is with plugin > configuration? it seems you must configure plugins both in the > build section AND the reporting section for anything to work. > > similarly for the javadoc plugin, as of the latest change, i must > now specify source = 1.4 in both the rewporting configuration of the > plugin, AND the build configuration of the plugin. > > am i just hopelessly confused? > > Kind regards, > Dave Sag > > > [image removed] > > > > David Sag <[EMAIL PROTECTED]> wrote on 24/10/2005 03:55:25 PM: > > > > > Dear People, > > > > My mojo is built and installed. > > > > I have specified the goal and phase thus: > > * @goal merge > > * @phase validate > > > > I have added a reference to the block of a shell project thus: > > > > > > com.davesag > > qalab-plugin > > > > > > qalab-blah > > validate > > > > false > > net.objectlab.qalab.parser. > > CheckstyleStatMerge > > ${project.build.directory} > > /target/checkstyle-result.xml > > > > > > merge > > > > > > > > > > > > when i type > > > > mvn qalab:merge > > > > i get an error telling me it can't read from the checkstyle results > > file. this is a reasonable result. > > > > BUT > > > > in the reporting section of the pom.xml I have added > > > > > > com.davesag > > qalab-plugin > > > > > > and when I type > > > > mvn site > > > > it's as if my plugin just wasn't even there. It never gets run. > > > > the checkstyle report is run (yet to work out how to get it to > > export as an xml file), and the javadocs are generated and so forth, > > but my qalab plugin may as well not exist. > > > > if i try deliberately breaking the name then maven complains that > > there is no such plugin, so it's sort of working, but it's just not > > actually doing anything. > > > > is there a specific phase I need to bind to to get the reporting to work? > > > > how can i be sure that the other reports have already run? > > > > > > Kind regards, > > Dave Sag > > > > > > [image removed] > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: my plugin is invoked okay directly but not at all as part of site.
still more on this. if i move the configuration from out of the eexcutions and up into the main plugin thus: com.davesag qalab-plugin false net.objectlab.qalab.parser.CheckstyleStatMerge ${project.build.directory}/target/checkstyle-result.xml merge the configuration is recongnised okay. but that's no good for me as i need different configs for different goals. Kind regards, Dave Sag David Sag <[EMAIL PROTECTED]> wrote on 24/10/2005 04:05:09 PM: > > Even weirder - > > the below is slightly wrong. > > in my reporting block I must specify the plugin config again thus: > > > com.davesag > qalab-plugin > > false > net.objectlab.qalab.parser.CheckstyleStatMerge > ${project.build.directory}/target/checkstyle- > result.xml > > > > or maven claims that i have not specified any parameters. > > i still get nothing generated if i run mvn site however > > if i remove the entire reporting block i get the same error, as if i > had not configured it. > > so can someone please explain what the sotry is with plugin > configuration? it seems you must configure plugins both in the > build section AND the reporting section for anything to work. > > similarly for the javadoc plugin, as of the latest change, i must > now specify source = 1.4 in both the rewporting configuration of the > plugin, AND the build configuration of the plugin. > > am i just hopelessly confused? > > Kind regards, > Dave Sag > > > [image removed] > > > > David Sag <[EMAIL PROTECTED]> wrote on 24/10/2005 03:55:25 PM: > > > > > Dear People, > > > > My mojo is built and installed. > > > > I have specified the goal and phase thus: > > * @goal merge > > * @phase validate > > > > I have added a reference to the block of a shell project thus: > > > > > > com.davesag > > qalab-plugin > > > > > > qalab-blah > > validate > > > > false > > net.objectlab.qalab.parser. > > CheckstyleStatMerge > > ${project.build.directory} > > /target/checkstyle-result.xml > > > > > > merge > > > > > > > > > > > > when i type > > > > mvn qalab:merge > > > > i get an error telling me it can't read from the checkstyle results > > file. this is a reasonable result. > > > > BUT > > > > in the reporting section of the pom.xml I have added > > > > > > com.davesag > > qalab-plugin > > > > > > and when I type > > > > mvn site > > > > it's as if my plugin just wasn't even there. It never gets run. > > > > the checkstyle report is run (yet to work out how to get it to > > export as an xml file), and the javadocs are generated and so forth, > > but my qalab plugin may as well not exist. > > > > if i try deliberately breaking the name then maven complains that > > there is no such plugin, so it's sort of working, but it's just not > > actually doing anything. > > > > is there a specific phase I need to bind to to get the reporting to work? > > > > how can i be sure that the other reports have already run? > > > > > > Kind regards, > > Dave Sag > > > > > > [image removed] > > > >
Re: my plugin is invoked okay directly but not at all as part of site.
Even weirder - the below is slightly wrong. in my reporting block I must specify the plugin config again thus: com.davesag qalab-plugin false net.objectlab.qalab.parser.CheckstyleStatMerge ${project.build.directory}/target/checkstyle-result.xml or maven claims that i have not specified any parameters. i still get nothing generated if i run mvn site however if i remove the entire reporting block i get the same error, as if i had not configured it. so can someone please explain what the sotry is with plugin configuration? it seems you must configure plugins both in the build section AND the reporting section for anything to work. similarly for the javadoc plugin, as of the latest change, i must now specify source = 1.4 in both the rewporting configuration of the plugin, AND the build configuration of the plugin. am i just hopelessly confused? Kind regards, Dave Sag David Sag <[EMAIL PROTECTED]> wrote on 24/10/2005 03:55:25 PM: > > Dear People, > > My mojo is built and installed. > > I have specified the goal and phase thus: > * @goal merge > * @phase validate > > I have added a reference to the block of a shell project thus: > > > com.davesag > qalab-plugin > > > qalab-blah > validate > > false > net.objectlab.qalab.parser. > CheckstyleStatMerge > ${project.build.directory} > /target/checkstyle-result.xml > > > merge > > > > > > when i type > > mvn qalab:merge > > i get an error telling me it can't read from the checkstyle results > file. this is a reasonable result. > > BUT > > in the reporting section of the pom.xml I have added > > > com.davesag > qalab-plugin > > > and when I type > > mvn site > > it's as if my plugin just wasn't even there. It never gets run. > > the checkstyle report is run (yet to work out how to get it to > export as an xml file), and the javadocs are generated and so forth, > but my qalab plugin may as well not exist. > > if i try deliberately breaking the name then maven complains that > there is no such plugin, so it's sort of working, but it's just not > actually doing anything. > > is there a specific phase I need to bind to to get the reporting to work? > > how can i be sure that the other reports have already run? > > > Kind regards, > Dave Sag > > > [image removed] > >
my plugin is invoked okay directly but not at all as part of site.
Dear People, My mojo is built and installed. I have specified the goal and phase thus: * @goal merge * @phase validate I have added a reference to the block of a shell project thus: com.davesag qalab-plugin qalab-blah validate false net.objectlab.qalab.parser.CheckstyleStatMerge ${project.build.directory}/target/checkstyle-result.xml merge when i type mvn qalab:merge i get an error telling me it can't read from the checkstyle results file. this is a reasonable result. BUT in the reporting section of the pom.xml I have added com.davesag qalab-plugin and when I type mvn site it's as if my plugin just wasn't even there. It never gets run. the checkstyle report is run (yet to work out how to get it to export as an xml file), and the javadocs are generated and so forth, but my qalab plugin may as well not exist. if i try deliberately breaking the name then maven complains that there is no such plugin, so it's sort of working, but it's just not actually doing anything. is there a specific phase I need to bind to to get the reporting to work? how can i be sure that the other reports have already run? Kind regards, Dave Sag