*
* @param keyFilterPredicate
* @return
*/
public Map<String, VersionInfo> build(Predicate<String> keyFilterPredicate) {
ClassPath cp;
try {
cp = ClassPath.from(VersionInfo.class.getClassLoader());
} catch (IOException e) {
logger.warn("Unable to fetch versioning information from classpath ! {}", e);
return Collections.emptyMap();
}
Iterable<ResourceInfo> pomPropFiles = Iterables.filter(cp.getResources().asList(),
new Predicate<ResourceInfo>() {
@Override
public boolean apply(ResourceInfo input) {
if (input.getResourceName().contains("pom.properties")) {
Matcher m = groupIdArtifact.matcher(input.getResourceName());