Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-57817

Job DSL + Warnings-NG + Spotbugs not working

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      5.2.0

      Description

      We tried to change our Job-DSL-Scripts from deprecated "publishers" to new warnings-ng-plugin.

      It works well for checkstyle, cpd and pmd but not for spotbugs. Here we got the following error message when executing the seed-Job:

      ERROR: (script, line 94) No signature of method: javaposse.jobdsl.plugin.structs.DescribableListContext.SpotBugs() is applicable for argument types: (script$_run_closure1$_closure5$_closure22$_closure24$_closure26) values: [script$_run_closure1$_closure5$_closure22$_closure24$_closure26@e96a740]

       

      Here the DSL-Snipped:

      // recordIssues {
      	  tools {
                  checkStyle {
                     pattern('**/checkstyle-result.xml')
                     reportEncoding('UTF-8')
                  }
                spotBugs {
                   id('bugs')
                   name('SpotBugs Warnungen')
                   pattern('**/spotbugsXml.xml')
                   reportEncoding('UTF-8')
                   useRankAsPriority(true)
                }
                  pmdParser {
                     pattern('**/pmd.xml')
                     reportEncoding('UTF-8')
                  }
                  cpd {
                     highThreshold(50)
                     normalThreshold(25)
                     pattern('**/cpd.xml')
                     reportEncoding('UTF-8')
                  }
               }
            }

      What is the mistake?

       

      Regards, Sascha

       

        Attachments

          Activity

          sorehead666900 Sascha Meyer created issue -
          sorehead666900 Sascha Meyer made changes -
          Field Original Value New Value
          Description We tried to change our Job-DSL-Scripts from deprecated "publishers" to new warnings-ng-plugin.

          It works well for checkstyle, cpd and pmd but not for spotbugs. Here we got the following error message when executing the seed-Job:

          {{ERROR: (script, line 94) No signature of method: javaposse.jobdsl.plugin.structs.DescribableListContext.SpotBugs() is applicable for argument types: (script$_run_closure1$_closure5$_closure22$_closure24$_closure26) values: [script$_run_closure1$_closure5$_closure22$_closure24$_closure26@e96a740]}}

           

          Here the DSL-Snipped:
          {quote}recordIssues {
             tools {
                checkStyle {
                   pattern('**/checkstyle-result.xml')
                   reportEncoding('UTF-8')
                }
                spotBugs {
                   id('bugs')
                   name('SpotBugs Warnungen')
                   pattern('**/spotbugsXml.xml')
                   reportEncoding('UTF-8')
                   useRankAsPriority(true)
                }
                pmdParser {
                   pattern('**/pmd.xml')
                    reportEncoding('UTF-8')
                }
                cpd {
                   highThreshold(50)
                   normalThreshold(25)
                   pattern('**/cpd.xml')
                   reportEncoding('UTF-8')
                }
              }
           }
          {quote}
          What is the mistake?

           

          Regards, Sascha

           
          We tried to change our Job-DSL-Scripts from deprecated "publishers" to new warnings-ng-plugin.

          It works well for checkstyle, cpd and pmd but not for spotbugs. Here we got the following error message when executing the seed-Job:

          {{ERROR: (script, line 94) No signature of method: javaposse.jobdsl.plugin.structs.DescribableListContext.SpotBugs() is applicable for argument types: (script$_run_closure1$_closure5$_closure22$_closure24$_closure26) values: [script$_run_closure1$_closure5$_closure22$_closure24$_closure26@e96a740]}}

           

          Here the DSL-Snipped:
          {quote}recordIssues {
           tools {
           checkStyle {
           pattern('**/checkstyle-result.xml')
           reportEncoding('UTF-8')
           }
           spotBugs {
           id('bugs')
           name('SpotBugs Warnungen')
           pattern('**/spotbugsXml.xml')
           reportEncoding('UTF-8')
           useRankAsPriority(true)
           }
           pmdParser {
           pattern('**/pmd.xml')
           reportEncoding('UTF-8')
           }
           cpd {
           highThreshold(50)
           normalThreshold(25)
           pattern('**/cpd.xml')
           reportEncoding('UTF-8')
           }
           }
           }{quote}
          What is the mistake?

           

          Regards, Sascha

           
          sorehead666900 Sascha Meyer made changes -
          Description We tried to change our Job-DSL-Scripts from deprecated "publishers" to new warnings-ng-plugin.

          It works well for checkstyle, cpd and pmd but not for spotbugs. Here we got the following error message when executing the seed-Job:

          {{ERROR: (script, line 94) No signature of method: javaposse.jobdsl.plugin.structs.DescribableListContext.SpotBugs() is applicable for argument types: (script$_run_closure1$_closure5$_closure22$_closure24$_closure26) values: [script$_run_closure1$_closure5$_closure22$_closure24$_closure26@e96a740]}}

           

          Here the DSL-Snipped:
          {quote}recordIssues {
           tools {
           checkStyle {
           pattern('**/checkstyle-result.xml')
           reportEncoding('UTF-8')
           }
           spotBugs {
           id('bugs')
           name('SpotBugs Warnungen')
           pattern('**/spotbugsXml.xml')
           reportEncoding('UTF-8')
           useRankAsPriority(true)
           }
           pmdParser {
           pattern('**/pmd.xml')
           reportEncoding('UTF-8')
           }
           cpd {
           highThreshold(50)
           normalThreshold(25)
           pattern('**/cpd.xml')
           reportEncoding('UTF-8')
           }
           }
           }{quote}
          What is the mistake?

           

          Regards, Sascha

           
          We tried to change our Job-DSL-Scripts from deprecated "publishers" to new warnings-ng-plugin.

          It works well for checkstyle, cpd and pmd but not for spotbugs. Here we got the following error message when executing the seed-Job:

          {{ERROR: (script, line 94) No signature of method: javaposse.jobdsl.plugin.structs.DescribableListContext.SpotBugs() is applicable for argument types: (script$_run_closure1$_closure5$_closure22$_closure24$_closure26) values: [script$_run_closure1$_closure5$_closure22$_closure24$_closure26@e96a740]}}

           

          Here the DSL-Snipped:
          {code:java}
          // recordIssues {
          tools {
                      checkStyle {
                         pattern('**/checkstyle-result.xml')
                         reportEncoding('UTF-8')
                      }
                    spotBugs {
                       id('bugs')
                       name('SpotBugs Warnungen')
                       pattern('**/spotbugsXml.xml')
                       reportEncoding('UTF-8')
                       useRankAsPriority(true)
                    }
                      pmdParser {
                         pattern('**/pmd.xml')
                         reportEncoding('UTF-8')
                      }
                      cpd {
                         highThreshold(50)
                         normalThreshold(25)
                         pattern('**/cpd.xml')
                         reportEncoding('UTF-8')
                      }
                   }
                }{code}
          What is the mistake?

           

          Regards, Sascha

           
          drulli Ulli Hafner made changes -
          Component/s job-dsl-plugin [ 16720 ]
          Component/s warnings-ng-plugin [ 24526 ]
          drulli Ulli Hafner made changes -
          Assignee Ulli Hafner [ drulli ] Daniel Spilker [ daspilker ]
          drulli Ulli Hafner made changes -
          Component/s warnings-ng-plugin [ 24526 ]
          drulli Ulli Hafner made changes -
          Comment [ Can you check what happens if you remove {{id}} and {{name}}? ]
          daspilker Daniel Spilker made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          daspilker Daniel Spilker made changes -
          Status In Progress [ 3 ] Fixed but Unreleased [ 10203 ]
          Resolution Fixed [ 1 ]
          drulli Ulli Hafner made changes -
          Status Fixed but Unreleased [ 10203 ] Resolved [ 5 ]
          Released As 5.2.0
          drulli Ulli Hafner made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]

            People

            • Assignee:
              daspilker Daniel Spilker
              Reporter:
              sorehead666900 Sascha Meyer
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: