external classes are not resolve in script

 while running jenkins job, script having dependency with some other class, import statements are not resolves this

Started by user anonymous
Building in workspace C:\Users\pamarthid\.jenkins\workspace\seed
Processing DSL script master_itself.groovy
ERROR: startup failed:
master_itself.groovy: 7: unable to resolve class common.Config
 @ line 7, column 1.
   import common.Config

master_itself.groovy: 10: unable to resolve class common.MasterDslJob
 @ line 10, column 1.
   import common.MasterDslJob

master_itself.groovy: 8: unable to resolve class common.DslJob
 @ line 8, column 1.
   import common.DslJob


  • 0
    Denys Digtiar

    Please correct me if I am wrong but by the output, it seems to be that this is a Job DSL plugin related question.

    In that case, I believe, you need to make sure that your library is on the Additional Classpath. Please see the following section of the documentation: Using Libraries.

  • 0
    Pamarthi Durgarao

    Hi Denys,

    Thanks for your replay,

    the "Additional classpath" setting is not available when Job DSL script security is enabled, in this case any alternative is available.

Please sign in to leave a comment.