Jenkins pipeline script src directpry

20 Views Asked by At

We have pipeline script which imports share library, it was working fine earlier, But we have modified the directory path from /src to /src/main/groovy where our groovy scripts reside. Any idea what should be done to pipeline script to understand groovy files are under src/main/groovy?

@Library('my-global-libraries') _

import com.company.ct.Action

Error org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: 12:08:52 WorkflowScript: 11: unable to resolve class com.company.ct.Action

Project structure

my-global-libraries/src/main/groovy/ my-global-libraries/var/

1

There are 1 best solutions below

0
Iterokun On

Groovy is very much like Java in this regard:

import main.groovy.com.company.ct.Action