Jenkins 2.7.2 Pipeline job is not working for 'Flat property' in downloading schema.
While downloading artifacts from generic Artifactory repository (rb-artifactory), Jenkins pipeline job is throwing this error:
java.lang.NoClassDefFoundError: org/eclipse/jgit/util/StringUtils
I request for your support to resolve this error.
We have the following download schema:
def ar_download_logs = """{
"files": [
{
"pattern": "${ar_url}/out/*",
"flat": "1",
"target": "logs/"
}
]
}"""
def buildInfo1 = ar_server.download(ar_download_logs)
"flat": "1" causes the problem while converting from String to Boolean, which uses StringUtil and causing an exception java.lang.NoClassDefFoundError.
How to establish dependencies between some of StringUtils package for Artifactory Plugin: 2.5.1 to use string to Boolean conversion?
If you take a look at the following source code where the exception occurs, then it’s a Line 79 of GenericDownloadExecutor.java as given by the stack trace.
boolean isFlat = file.getFlat() != null && StringUtils.toBoolean(file.getFlat());
I also would like to share a plugin that are used for the project:
- Artifactory Plugin: 2.5.1
- Groovy : 1.29
- Ivy Plugin : 1.26
- Pipeline : 2.2
- Pipeline: Groovy : 2.7
- Pipeline: Job : 2.3