Do not throw an exception for resolution errors on Windows.
@@ -25,13 +25,18 @@ import java.util.Set;
import java.util.function.Predicate;
import java.util.stream.Collectors;
+import org.apache.commons.lang3.SystemUtils;
import org.jboss.shrinkwrap.resolver.api.maven.Maven;
import org.jboss.shrinkwrap.resolver.impl.maven.MavenResolvedArtifactImpl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import eu.fasten.analyzer.pomanalyzer.data.ResolutionResult;
public class Resolver {
+ private static final Logger LOG = LoggerFactory.getLogger(Resolver.class);
+
// Attention: Be aware that the test suite for this class is disabled by default
// to avoid unnecessary downloads on every build. Make sure to re-enable the
// tests and run them locally for every change in this class.
@@ -73,10 +78,14 @@ public class Resolver {
if (f.exists() && f.isFile()) {
f.delete();
}
+ } else {
+ if (SystemUtils.IS_OS_WINDOWS) {
+ LOG.error("Cannot find artifactRepository for {}.", res.coordinate);
} else {
String msg = "Cannot find artifactRepository for %s.";
throw new IllegalStateException(format(msg, res.coordinate));
}
+ }
});
});
