artifacts.addAll(findOptionalArtifacts(module, "jar", null));
result.resolved(artifacts);
} else {
ModuleComponentArtifactMetaData artifactMetaData = module.artifact(mavenMetaData.getPackaging(), mavenMetaData.getPackaging(), null);
if (createArtifactResolver(module.getSource()).artifactExists(artifactMetaData, new DefaultResourceAwareResolveResult())) {
result.resolved(ImmutableSet.of(artifactMetaData));
} else {
ModuleComponentArtifactMetaData artifact = module.artifact("jar", "jar", null);
result.resolved(ImmutableSet.of(artifact));
}