You need to implement the new method checkRoles. See JavaDoc of latest 
FileCallable version. (Or you can use the provided abstract base classes as 
parent).

Am 24.03.2015 um 18:03 schrieb Sverre Moe <sverre....@gmail.com>:
> 
> 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 
> <mailto: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
>  
> <https://groups.google.com/d/msgid/jenkinsci-dev/b2502c2c-8a02-46df-8bce-90ee10724090%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
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/E4666595-2970-4F87-B789-23B295D6310C%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to