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

Using @RequiresPlugin in wrapper classes

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • job-dsl-plugin
    • None

      I am wondering if it is possible to use the @RequiresPlugin annotation from classes I have developed (based on the JobBuilder available on github) which wrap jobdsl functions. I have tried this kind of thing:

      package org.jobBuilder.utils
      import javaposse.jobdsl.dsl.RequiresPlugin
      
      class Steps {
          @RequiresPlugin(id = 'description-setter')
          static void gradle(context, String gradleTasks, String gradleSwitches = "")
          {
               ....
          }
          ...
      }
      

      This runs fine but the script doesn't warn even though a plugin isn't installed. is it possible to use it in this way?

      Thanks.

            Unassigned Unassigned
            ghs1 g hs1
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: