title: Unable to Load Jenkins Shared Libraries
body: <p>I have 2 scripts 1 is the scripted pipeline and 1 is the declarative pipeline</p>
  <p>Scripted Pipeline (script1):</p>
  <pre><code>node ('Slave'){
  stage('Loading app Deployment File') {
      def util = load './abcd/Jenkinsfile.groovy'
   }
  }
  </code></pre>
  <p>Declarative Pipeline (script2)/(Jenkinsfile.groovy):</p>
  <pre><code>@Library('shared-library@master') _
  import com.xaa.utils.myUtils
  pipeline {
      agent any
      stages {
          stage (&quot;Say Hello World&quot;) {
              steps {
                  helloWolrd()
              }
          }
       }
  </code></pre>
  <p>from 1 script I am calling another, when declarative pipeline trying to load the shared Libraries  I am getting this error message</p>
  <pre><code>ERROR: Could not find any definition of libraries [shared-library@master]
  
  org.jenkinsci.plugins.workflow.cps.CpsCompilationErrorsException: startup failed:
  Script1.groovy: Loading libraries failed
  
  1 error
  
      at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
      at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1085)
      at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:603)
      at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:581)
      at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:558)
  </code></pre>
  <p>Any suggestions are much appreciated.</p>