ViolationsMavenReporter

15 views
Skip to first unread message

Andrew Myers

unread,
May 19, 2015, 10:31:38 PM5/19/15
to job-dsl...@googlegroups.com
Hello!

Thank you for a great project - I it on Monday and have made some awesome progress with it.

I'm wanting to put the violations reports into my build.  Here's my groovy code:

mavenJob('TMPL-maven-project') {

// snip

publishers {
violations(100) {
checkstyle(10, 999, 999)
cpd(10, 999, 999)
findbugs(10, 999, 999)
jslint(10, 999, 999)
pmd(10, 999, 999)
}

cobertura("**/target/site/cobertura/coverage.xml") {
classTarget(100, 0, 0)
conditionalTarget(70, 0, 0)
lineTarget(80, 0, 0)
methodTarget(80, 0, 0)
packageTarget(100, 0, 0)
}
}
}

However nothing is being reported.  I noticed that in the config.xml the generated XML is:

  <publishers>
        <hudson.plugins.violations.ViolationsPublisher>
            <config>
                <suppressions class="tree-set">
                    <no-comparator/>
                </suppressions>
                <typeConfigs>
                    <no-comparator/>
                    <entry>
                        <string>checkstyle</string>
etc...

When I enable violations manually via the Jenkins config web page, it creates XML like this:

 <reporters>
   <hudson.plugins.violations.hudson.maven.ViolationsMavenReporter plugin="viola...@0.7.11">
      <config>
        <suppressions class="sorted-set"/>
        <typeConfigs>
          <entry>
            <string>checkstyle</string>
            <hudson.plugins.violations.TypeConfig>
              <type>checkstyle</type>
              <min>10</min>
              <max>999</max>
              <unstable>999</unstable>
              <usePattern>false</usePattern>
              <pattern></pattern>
            </hudson.plugins.violations.TypeConfig>
          </entry>
 etc...

Is there a way to get the ViolationsMavenReporter node created via the dsl, or will I need to fall back to a config block in order to do it? 

Thanks!

Andrew.

Matt Sheehan

unread,
May 26, 2015, 4:35:03 PM5/26/15
to job-dsl...@googlegroups.com
Hi Andrew. I think you'll need to use a config block for now. I don't see any mention of that tag in the repo:


--
You received this message because you are subscribed to the Google Groups "job-dsl-plugin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to job-dsl-plugi...@googlegroups.com.
To post to this group, send email to job-dsl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/job-dsl-plugin/a6a54525-1beb-49b6-a3d3-238444933d40%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrew Myers

unread,
May 27, 2015, 11:07:48 AM5/27/15
to job-dsl...@googlegroups.com

Thanks Matt.  I'll check it out.

Regards
Andrew


You received this message because you are subscribed to a topic in the Google Groups "job-dsl-plugin" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/job-dsl-plugin/ZoiUTUPUgC8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to job-dsl-plugi...@googlegroups.com.

To post to this group, send email to job-dsl...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages