当前位置: 首页 > 知识库问答 >
问题:

java.lang.NoSuchMethodError:在步骤中没有发现这样的DSL方法“echo”

谭昊乾
2023-03-14

我已经安装了所有的管道插件,

但我仍在得到

java.lang.NoSuchMethodError: No such DSL method 'echo' found among steps [ArtifactoryGradleBuild, ArtifactoryMavenBuild, MavenDescriptorStep, artifactoryDownload, artifactoryPromoteBuild, artifactoryUpload, build, checkout, collectEnv, copyRemoteArtifacts, dockerPullStep, dockerPushStep, emailext, emailextrecipients, getArtifactoryServer, git, input, libraryResource, load, milestone, newArtifactoryServer, newBuildInfo, newGradleBuild, newMavenBuild, parallel, properties, publishBuildInfo, readTrusted, stage, triggerRemoteJob, withCredentials, xrayScanBuild] or symbols [all, always, ant, antFromApache, antOutcome, antTarget, apiToken, architecture, archiveArtifacts, artifactManager, batchFile, booleanParam, buildButton, buildDiscarder, caseInsensitive, caseSensitive, choice, choiceParam, clock, cloud, command, configFile, configFileProvider, cron, crumb, defaultView, demand, disableConcurrentBuilds, downloadSettings, downstream, dumb, envVars, file, fileParam, filePath, fingerprint, frameOptions, freeStyle, freeStyleJob, git, hyperlink, hyperlinkToModels, installSource, jdk, jdkInstaller, jgit, jgitapache, jnlp, jobName, junit, lastDuration, lastFailure, lastGrantedAuthorities, lastStable, lastSuccess, legacy, list, local, location, logRotator, loggedInUsersCanDoAnything, masterBuild, maven, maven3Mojos, mavenErrors, mavenMojos, mavenWarnings, myView, nodeProperties, nonStoredPasswordParam, none, overrideIndexTriggers, paneStatus, parameters, password, pattern, pipelineTriggers, plainText, plugin, pollSCM, projectNamingStrategy, proxy, queueItemAuthenticator, quietPeriod, run, runParam, schedule, scmRetryCount, search, security, shell, slave, stackTrace, standard, status, string, stringParam, swapSpace, text, textParam, tmpSpace, toolLocation, unsecured, upstream, usernameColonPassword, usernamePassword, viewsTabBar, weather, zfs, zip] or globals [Artifactory, currentBuild, env, params, scm]
at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:149)
at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:108)
at groovy.lang.MetaClassImpl.invokeMethodOnGroovyObject(MetaClassImpl.java:1280)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1174)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42)

我漏了什么插件吗?

共有1个答案

汪玮
2023-03-14

看起来您没有安装管道基本步骤插件,因为该插件提供的所有步骤(包括<code>echo</code>)似乎都没有在错误消息中列出。

或者,插件已安装,但由于其中一个依赖项已删除或加载失败而无法加载。如果您是管理员,您应该在每个页面的右上角或日志中看到有关此问题的警告。

 类似资料: