-
类型: 错误
-
状态: Resolved
A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">解决 -
解决方法: 完成
-
影响版本/ s: 3.2.1之上
-
修复版本/ s: 3.2.3
-
组件/ s: 没有一个
-
标签:没有一个
当在声明式管道中使用'opts'指令时,编译失败,出现以下错误:
由用户shuki hazan启动
运行在耐久性级别:MAX_SURVIVABILITY
multiplecompilationerrorsexception:启动失败:
WorkflowScript: 41:无效参数“mavenOpts”,你的意思是“pom”吗?@ 41行,21列。
mavenOpts: -Dbuild.number = $ {BUILD_NUMBER},
^
1错误
org.codehaus.groovy.control.ErrorCollector.failIfErrors (ErrorCollector.java: 310)
org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes (CompilationUnit.java: 1085)
org.codehaus.groovy.control.CompilationUnit.doPhaseOperation (CompilationUnit.java: 603)
org.codehaus.groovy.control.CompilationUnit.processPhaseOperations (CompilationUnit.java: 581)
org.codehaus.groovy.control.CompilationUnit.compile (CompilationUnit.java: 558)
groovy.lang.GroovyClassLoader.doParseClass (GroovyClassLoader.java: 298)
groovy.lang.GroovyClassLoader.parseClass (GroovyClassLoader.java: 268)
groovy.lang.GroovyShell.parseClass (GroovyShell.java: 688)
groovy.lang.GroovyShell.parse (GroovyShell.java: 700)
在org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.lambda doParse 0美元(CpsGroovyShell.java: 135)
org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox (GroovySandbox.java: 136)
org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse (CpsGroovyShell.java: 132)
org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse (CpsGroovyShell.java: 127)
org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript (CpsFlowExecution.java: 561)
org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start (CpsFlowExecution.java: 522)
org.jenkinsci.plugins.workflow.job.WorkflowRun.run (WorkflowRun.java: 320)
hudson.model.ResourceController.execute (ResourceController.java: 97)
hudson.model.Executor.run (Executor.java: 429)
完成:失败。
复制步骤:
1)在jenkins中创建一个流水线作业。
2)配置管道作业的示例管道从这个链接:https://raw.githubusercontent.com/jfrog/project-examples/master/jenkins-examples/pipeline-examples/declarative-examples/maven-example/Jenkinsfile
3)添加'opts'指令到rtMavenRun与Jenkins artifactory插件文档中的有效值:
rtMavenRun (
// Jenkins配置中的工具名称。
工具:MAVEN_TOOL,
pom:“maven-example / pom.xml”,
目标:“全新安装”,
// Maven选项。
选择:“-Xms1024m -Xmx4096m”,
resolverId:“resolver-unique-id”
deployerId:“deployer-unique-id”,
)
4)运行构建,你应该得到上述错误。