Search in sources :

Example 1 with DefaultResourceAwareResolveResult

use of org.gradle.internal.resolve.result.DefaultResourceAwareResolveResult in project gradle by gradle.

the class MavenLocalResolver method isOrphanedPom.

private boolean isOrphanedPom(MutableMavenModuleResolveMetadata metaData, ExternalResourceArtifactResolver artifactResolver) {
    if (metaData.isPomPackaging()) {
        return false;
    }
    // check custom packaging
    ModuleComponentArtifactMetadata artifact;
    if (metaData.isKnownJarPackaging()) {
        artifact = metaData.artifact("jar", "jar", null);
    } else {
        artifact = metaData.artifact(metaData.getPackaging(), metaData.getPackaging(), null);
    }
    if (artifactResolver.artifactExists(artifact, new DefaultResourceAwareResolveResult())) {
        return false;
    }
    LOGGER.debug("POM file found for module '{}' in repository '{}' but no artifact found. Ignoring.", metaData.getId(), getName());
    return true;
}
Also used : DefaultResourceAwareResolveResult(org.gradle.internal.resolve.result.DefaultResourceAwareResolveResult) ModuleComponentArtifactMetadata(org.gradle.internal.component.external.model.ModuleComponentArtifactMetadata)

Aggregations

ModuleComponentArtifactMetadata (org.gradle.internal.component.external.model.ModuleComponentArtifactMetadata)1 DefaultResourceAwareResolveResult (org.gradle.internal.resolve.result.DefaultResourceAwareResolveResult)1