Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/jenkins/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/three.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 无法在BuildStep中实现执行(AbstractBuild<;?,?>;,Launcher,BuildListener)_Java_Jenkins - Fatal编程技术网

Java 无法在BuildStep中实现执行(AbstractBuild<;?,?>;,Launcher,BuildListener)

Java 无法在BuildStep中实现执行(AbstractBuild<;?,?>;,Launcher,BuildListener),java,jenkins,Java,Jenkins,我正在尝试编译插件代码,但失败了 无法在BuildStep中实现执行(AbstractBuild、Launcher、BuildListener) public class SeleniumTestCasesDetectionPlugin extends Notifier { public static String PLUGIN_ACTION_NAME = "Selenium Missing Testcases Plugin"; private stati

我正在尝试编译插件代码,但失败了

无法在BuildStep中实现执行(AbstractBuild、Launcher、BuildListener)

public class SeleniumTestCasesDetectionPlugin extends Notifier {
       public static String PLUGIN_ACTION_NAME = "Selenium Missing Testcases Plugin";

            private static final Logger LOGGER = Logger
                    .getLogger(SeleniumTestCasesDetectionPlugin.class.getName());
            private String mainURL;
            private String testClassFolder;

            @DataBoundConstructor
            public SeleniumTestCasesDetectionPlugin(String mainURL,
                    String testClassFolder) {
                this.mainURL = mainURL;
                this.testClassFolder = testClassFolder;

            }

            public String gettestClassFolder() {
                return testClassFolder;

            }

            public String getmainURL() {
                return mainURL;
            }

            public BuildStepMonitor getRequiredMonitorService() {
                return BuildStepMonitor.BUILD;
            }

            @Override
            public boolean perform(AbstractBuild<?, ?> build, Launcher launcher,
                    BuildListener listener) throws Exception {
                Map<String, String> suburls = ElementsCovered.gettingUrls(mainURL);
                Map<String, Map<String, List<String>>> urlElements = GettingHTMLElements
                        .getHTMLElements(suburls);
                Map<String, Map<String, List<String>>> testElements = SeleniumParser
                        .parsingSelenium(testClassFolder);
                ElementsCovered.elementsDetection(urlElements, testElements);
                return true;
            }


            protected boolean isFailureOrRecovery(AbstractBuild<?, ?> build) {
                if (build.getResult() == Result.FAILURE
                        || build.getResult() == Result.UNSTABLE) {
                    return true;
                } else if (build.getResult() == Result.SUCCESS) {
                    AbstractBuild<?, ?> previousBuild = build.getPreviousBuild();
                    if (previousBuild != null
                            && previousBuild.getResult() != Result.SUCCESS) {
                        return true;
                    } else {
                        return false;
                    }
                } else {
                    return false;
                }
}
公共类SeleniumTestCasesDetectionPlugin扩展通知程序{
公共静态字符串插件\u ACTION\u NAME=“Selenium Missing Testcases插件”;
专用静态最终记录器=记录器
.getLogger(SeleniumTestCasesDetectionPlugin.class.getName());
私有字符串mainURL;
私有字符串testClassFolder;
@数据边界构造函数
公共SeleniumTestCasesDetectionPlugin(字符串mainURL,
字符串testClassFolder){
this.mainURL=mainURL;
this.testClassFolder=testClassFolder;
}
公共字符串gettestClassFolder(){
返回testClassFolder;
}
公共字符串getmainURL(){
返回mainURL;
}
public BuildStepMonitor getRequiredMonitorService(){
返回BuildStepMonitor.BUILD;
}
@凌驾
公共布尔执行(AbstractBuild-build,Launcher-Launcher,
BuildListener(侦听器)引发异常{
Map suburls=ElementsCovered.gettingUrls(mainURL);
映射urlements=gettinghtmlements
.getHTMLElements(子URL);
地图测试元素=硒元素分析仪
.parsingSelenium(testClassFolder);
ElementsCovered.elementsDetection(URL元素、测试元素);
返回true;
}
受保护的布尔值isFailureOrRecovery(抽象构建){
if(build.getResult()==Result.FAILURE
||build.getResult()==Result.UNSTABLE){
返回true;
}else if(build.getResult()==Result.SUCCESS){
AbstractBuild-previousBuild=build.getPreviousBuild();
如果(以前的构建!=null
&&previousBuild.getResult()!=Result.SUCCESS){
返回true;
}否则{
返回false;
}
}否则{
返回false;
}
}
当我安装mvn时,我得到了编译错误。我是extendin通知程序类,我也不知道为什么会这样。
有谁能帮我一下吗

您似乎重写或实现了方法
perform
,该方法的参数类型与基类/接口不兼容。我只是在扩展类,我认为参数也正确。您的代码中没有构建步骤。错误消息指向哪一行?