http连接中的Groovy列表文件/目录

http连接中的Groovy列表文件/目录,groovy,jenkins-groovy,Groovy,Jenkins Groovy,我正在使用Java库列出远程http URL中的所有文件/目录: import java.io.IOException; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; public class Sample { public static void main(String[] args) throws IOException { Docu


我正在使用Java库列出远程http URL中的所有文件/目录:

import java.io.IOException;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;

public class Sample {
    public static void main(String[] args) throws IOException {
        Document doc = Jsoup.connect("http://howto.unixdev.net").get();
        for (Element file : doc.select("td.right td a")) {
            System.out.println(file.attr("href"));
        }
    }
}
我需要用Groovy脚本做同样的事情(作为Jenkins工作的一部分),但除了文件系统清单之外,我找不到任何例子。有什么帮助吗?
谢谢

到目前为止你试过什么?你有没有面临任何具体问题?你在使用詹金斯管道吗?