Artifact (Throwable each) { Throwable[] throwables = ExceptionUtils.getThrowables(each); if (throwables == null) return null; for (Throwable throwable : throwables) { if (throwable instanceof ArtifactTransferException) { return RepositoryUtils.toArtifact(((ArtifactTransferException)throwable).getArtifact()); } } return null; }