From ea957aee538a26bb09bcc1ba06dbb8d740d4a168 Mon Sep 17 00:00:00 2001 From: Alexander Bubenchikov Date: Wed, 21 Aug 2019 16:00:44 +0300 Subject: [PATCH] IDEA-122332 - Repeated errors for missing Maven repo files. Fix only in logging required GitOrigin-RevId: 80361d5b0b09e83207679157f0ec12588ea1caec --- .../org/jetbrains/idea/maven/indices/MavenIndex.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/plugins/maven/src/main/java/org/jetbrains/idea/maven/indices/MavenIndex.java b/plugins/maven/src/main/java/org/jetbrains/idea/maven/indices/MavenIndex.java index b30db3e57393..733ba58bc015 100644 --- a/plugins/maven/src/main/java/org/jetbrains/idea/maven/indices/MavenIndex.java +++ b/plugins/maven/src/main/java/org/jetbrains/idea/maven/indices/MavenIndex.java @@ -364,7 +364,13 @@ public class MavenIndex implements MavenSearchIndex { private void handleUpdateException(Exception e) { myFailureMessage = e.getMessage(); - MavenLog.LOG.warn("Failed to update Maven indices for: [" + myId.getValue() + "] " + myRepositoryPathOrUrl, e); + if (myFailureMessage.contains("nexus-maven-repository-index.properties") && myFailureMessage.contains("FileNotFoundException")) { + myFailureMessage = "Repository is non-nexus repo, or does not indexed"; + MavenLog.LOG.debug("Failed to update Maven indices for: [" + myId.getValue() + "] " + myRepositoryPathOrUrl, e); + } else { + MavenLog.LOG.warn("Failed to update Maven indices for: [" + myId.getValue() + "] " + myRepositoryPathOrUrl, e); + } + } private int createContext(File contextDir, String suffix) throws MavenServerIndexerException { @@ -544,8 +550,8 @@ public class MavenIndex implements MavenSearchIndex { @TestOnly public synchronized void printInfo() { doIndexTask(() -> { - System.out.println("BaseFile: " + myData.groupToArtifactMap.getBaseFile()); - System.out.println("All data objects: " + myData.groupToArtifactMap.getAllDataObjects(null)); + MavenLog.LOG.debug("BaseFile: " + myData.groupToArtifactMap.getBaseFile()); + MavenLog.LOG.debug("All data objects: " + myData.groupToArtifactMap.getAllDataObjects(null)); return null; }, null); }