use of org.commonjava.atlas.maven.ident.ref.ArtifactRef in project indy by Commonjava.
the class KojiContentManagerDecorator method findKojiBuildAnd.
@Measure
private <T> T findKojiBuildAnd(ArtifactStore store, String path, EventMetadata eventMetadata, T defValue, KojiBuildAction<T> action) throws IndyWorkflowException {
if (!config.getEnabled()) {
Logger logger = LoggerFactory.getLogger(getClass());
logger.debug("Koji content-manager decorator is disabled.");
logger.debug("When koji addon is disenabled , path:{},config instance is {}", path, config.toString());
return defValue;
}
if (!config.isEnabledFor(store)) {
Logger logger = LoggerFactory.getLogger(getClass());
logger.debug("Koji content-manager decorator not enabled for: {}.", store.getKey());
logger.debug("When the group is disenabled , path:{},config instance is {}", path, config.toString());
return defValue;
}
logger.debug("When the koji is enabled , path:{},config instance is {}", path, config.toString());
// TODO: This won't work for maven-metadata.xml files! We need to hit a POM or jar or something first.
// FIXME: This won't work for NPM!
ArtifactPathInfo pathInfo = ArtifactPathInfo.parse(path);
if (pathInfo != null) {
ArtifactRef artifactRef = pathInfo.getArtifact();
logger.info("Searching for Koji build: {}", artifactRef);
return proxyKojiBuild(store.getKey(), artifactRef, path, eventMetadata, defValue, action);
} else {
logger.info("Path is not a maven artifact reference: {}", path);
}
return defValue;
}
Aggregations