You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2018/02/20 16:30:02 UTC

[GitHub] matthiasblaesing closed pull request #427: [270357] IllegalArgumentException raised by maven-indexer

matthiasblaesing closed pull request #427: [270357] IllegalArgumentException raised by maven-indexer
URL: https://github.com/apache/incubator-netbeans/pull/427
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/maven.indexer/src/org/netbeans/modules/maven/indexer/NexusRepositoryIndexerImpl.java b/maven.indexer/src/org/netbeans/modules/maven/indexer/NexusRepositoryIndexerImpl.java
index 98ecb1c8f..7affa26dd 100644
--- a/maven.indexer/src/org/netbeans/modules/maven/indexer/NexusRepositoryIndexerImpl.java
+++ b/maven.indexer/src/org/netbeans/modules/maven/indexer/NexusRepositoryIndexerImpl.java
@@ -527,6 +527,19 @@ private void indexLoadedRepo(final RepositoryInfo repo, boolean updateLocal) thr
                     }
                     try {
                         remoteIndexUpdater.fetchAndUpdateIndex(iur);
+                    } catch (IllegalArgumentException ex) {
+                        // This exception is raised from the maven-indexer.
+                        // maven-indexer supported two formats:
+                        // - legacy/zip: zipped lucene (v2.3) index files
+                        // - gz: maven-indexer specific file format
+                        // The legacy format is no longer supported and when
+                        // the indexer encounters old index files it raises
+                        // this exception
+                        //
+                        // Convert to IOException to utilize the existing error
+                        // handling paths
+                        fetchFailed = true;
+                        throw new IOException("Failed to load maven-index for: " + indexingContext.getRepositoryUrl(), ex);
                     } catch (IOException ex) {
                         fetchFailed = true;
                         throw ex;


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists