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

Warnings plugin stopped working in mavenJobs (1.63 -> 1.64)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • job-dsl-plugin
    • None
    • Jenkins ver. 2.60.3
      job-dsl 1.64
      Warnings Plug-in 4.63

      When trying to apply the example from documentation to mavenJob

      mavenJob('example') {
          publishers {
              warnings(['Java Compiler (javac)'], ['Java Compiler (javac)': '**/*.log']) {
                  excludePattern('**/test**')
                  resolveRelativePaths()
              }
          }
      }

      it fails with:

      No signature of method: javaposse.jobdsl.dsl.helpers.publisher.MavenPublisherContext.addStaticAnalysisContext() is applicable for argument types: (groovy.util.NodeBuilder, javaposse.jobdsl.dsl.helpers.publisher.WarningsContext) values: [groovy.util.NodeBuilder@1145e7d, javaposse.jobdsl.dsl.helpers.publisher.WarningsContext@7a4f0cec]

      The same, applied to regular job works:

      job('example') {
          publishers {
              warnings(['Java Compiler (javac)'], ['Java Compiler (javac)': '**/*.log']) {
                  excludePattern('**/test**')
                  resolveRelativePaths()
              }
          }
      }
      

      No idea what is the cause, maybe it's conflicting with the Generated API? I think it's a recent addition.

      Above worked in 1.63

            daspilker Daniel Spilker
            jbochenski Jakub Bochenski
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: