| I've just spend several hours, trying to find out why my multi-branch-pipeline project was failing until I found this problem using trial and error. I have a multi-branch-pipeline with a shared library. That shared library is already in use with other projects and works fine. After copy & pasting some code to a new Jenkinsfile I was wondering why it did not work. Faulty Jenkinsfile: @Library('shared-lib@master') testing.sayHello('World') This causes the build to fail with: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 3: unexpected token: testing @ line 3, column 1. testing.sayHello('World') ^ When I edit my Jenkinsfile to: @Library('shared-lib@master') def anything = 'nothing' testing.sayHello('World') it executes without any error. |