bnd-platform
bnd-platform copied to clipboard
extracting Bundle-License from pom.xml does not work
Unfortunately reading the pom.xml to extract the licenses and organization information does not work.
After looking into your code a saw, that in the method ResolvedBundleArtifact.extractPomInfo you have forgotten to assign the return value of DependencyHelper.getDetachedDependency(project, pom, 'pom') to pomFile. Therefore the variable pomFile is always null and the data extraction is skipped. Correct would be
try {
pomFile = DependencyHelper.getDetachedDependency(project, pom, 'pom')
} catch (e) {
project.logger.warn "Could not retrieve POM $pom"
}