【发布时间】:2022-07-07 23:09:09
【问题描述】:
我正在为我的 Jenkins groovy 脚本编写一个 junit 测试。我正在测试的 Jenkins 脚本包含这样的方法调用:
error "Foo"
当我尝试从我的 IDE (Intellij IDEA) 运行测试时,我收到如下错误:
没有方法签名:静态 xxx.error() 适用于参数类型:(org.codehaus.groovy.runtime.GStringImpl) 值 [Foo]
所以我想,我需要在我的类路径中添加一些库,以使运行时知道这个 error 函数。我试过这个maven依赖
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-aggregator</artifactId>
<version>2.5</version>
</dependency>
但它没有帮助。
所以我很难找到包含此处描述的这些基本 Jenkins 工作流函数的库:https://www.jenkins.io/doc/pipeline/steps/workflow-basic-steps
有什么想法吗?
【问题讨论】:
标签: java maven jenkins intellij-idea groovy