Trying the following in Jenkins Script Console: import hudson.FilePath.FileCallable import hudson.remoting.VirtualChannel
def jenkinsInstance = jenkins.model.Jenkins.getInstance() def project = jenkinsInstance.getItem("myMatrixProject") def rootProject = project.getRootProject() def someWorkspace = rootProject.getSomeWorkspace() try { def test = someWorkspace.act(new FileCallable<String>() { private static final long serialVersionUID = 1; @Override public String invoke(File file, VirtualChannel channel) { return "Testing Testing"; } }); } catch (IOException e) { e.printStackTrace(); } catch (InterruptedException e) { e.printStackTrace(); } It throws an exception: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script1.groovy: 10: Can't have an abstract method in a non-abstract class. The class 'Script1$1' must be declared abstract or the method 'void checkRoles(org.jenkinsci.remoting.RoleChecker)' must be implemented. @ line 10, column 61. ct(new FileCallable<String>() { -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/b2502c2c-8a02-46df-8bce-90ee10724090%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.