I have followed this link https://github.com/JFrogDev/project-examples/blob/master/jenkins-pipeline-examples/maven-example/Jenkinsfile to get the buildInfo in jenkins pipeline script.Here I just need buildDependencies for Fortify Scan(need to scan both dependencies and soucre code).Here is the code snippet.
def buildInfo = Artifactory.newBuildInfo()
buildInfo = rtMaven.run pom: 'maven-example/pom.xml', goals: 'clean install', buildInfo: buildInfo
println buildInfo.getName()
println buildInfo.getNumber()
Im able to get the Build Name and Build Number,but when I try to call getBuildDependencies() its giving error Scripts are not permitted to use method org.jfrog.hudson.pipeline.types.buildinfo.BuildInfo getBuilfDependencies()
buildInfo.getBuildDependencies().each{ dependency ->
println dependency.getName()
}
Why im not able to get dependencies from buildInfo where as im getting values for build name and build number..can someone help me out to get sorted this problem...Thanks for your help in Advance.