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

Maven jobs generate incorrect email config

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • job-dsl-plugin
    • None

      Using the job-dsl-plugin to generate a maven job leads to Jenkins warning (on the 'manage' screen) that the job config is incorrect. The exact error is:

      MissingFieldException: No field 'perModuleEmail' found in class 'hudson.maven.MavenModuleSet'

      (Jenkins only checks for this as startup, so after generating the job you may have to reload the config from disk or restart jenkins to see the message)

      This appears to be because the plugin adds 'perModuleEmail' to the top-level config, but as of JENKINS-21045 the location of this config has changed to be stored as a separate item instead of using the generic mailer job:

      <reporters>
      <hudson.maven.reporters.MavenMailer>
      <recipients></recipients>
      <dontNotifyEveryUnstableBuild>false</dontNotifyEveryUnstableBuild>
      <sendToIndividuals>true</sendToIndividuals>
      <perModuleEmail>false</perModuleEmail>
      </hudson.maven.reporters.MavenMailer>
      </reporters>

      This is just cosmetic, though.

      There's also no built-in way to set up this config within the plugin

            daspilker Daniel Spilker
            bbaetz Bradley Baetz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: