problem importing build.gradle

Hi,

When i try to import a gradle project I could import the java files properly for all the modules however, the external dependencies are not getting resolved. Weird issue is when i select CTRL+click on the package of the java import statement then the IDE is taking me to the right package in the third party jar however, it could not resolve the class files even though the class files are there in the external jars. I see the following errors in the out of IDEA


#org.jetbrains.idea.maven - Failed to update Maven indices for: [<http link to external jar>]
org.jetbrains.idea.maven.server.MavenServerIndexerException: java.lang.RuntimeException: java.io.FileNotFoundException: Resource nexus-maven-repository-index.properties does not exist
     at org.jetbrains.idea.maven.server.Maven3ServerIndexerImpl.updateIndex(Maven3ServerIndexerImpl.java:210)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:606)
     at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
     at sun.rmi.transport.Transport$1.run(Transport.java:177)
     at sun.rmi.transport.Transport$1.run(Transport.java:174)
     at java.security.AccessController.doPrivileged(Native Method)
     at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
     at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:556)
     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811)
     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670)
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
     at java.lang.Thread.run(Thread.java:744)
     at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:275)
     at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:252)
     at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:161)
     at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:194)
     at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:148)
     at com.sun.proxy.$Proxy136.updateIndex(Unknown Source)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:606)
     at com.intellij.execution.rmi.RemoteUtil$2$1$1.compute(RemoteUtil.java:106)
     at com.intellij.execution.rmi.RemoteUtil.executeWithClassLoader(RemoteUtil.java:167)
     at com.intellij.execution.rmi.RemoteUtil$2$1.invoke(RemoteUtil.java:102)
     at com.sun.proxy.$Proxy136.updateIndex(Unknown Source)
     at org.jetbrains.idea.maven.server.MavenIndexerWrapper$3.execute(MavenIndexerWrapper.java:110)
     at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:118)
     at org.jetbrains.idea.maven.server.MavenIndexerWrapper.updateIndex(MavenIndexerWrapper.java:105)
     at org.jetbrains.idea.maven.indices.MavenIndex.updateContext(MavenIndex.java:318)
     at org.jetbrains.idea.maven.indices.MavenIndex.updateOrRepair(MavenIndex.java:277)
     at org.jetbrains.idea.maven.indices.MavenIndices.updateOrRepair(MavenIndices.java:126)
     at org.jetbrains.idea.maven.indices.MavenIndicesManager.doUpdateIndices(MavenIndicesManager.java:260)
     at org.jetbrains.idea.maven.indices.MavenIndicesManager.access$200(MavenIndicesManager.java:49)
     at org.jetbrains.idea.maven.indices.MavenIndicesManager$3.run(MavenIndicesManager.java:231)
     at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:471)
     at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
     at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
     at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
     at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171)
     at com.intellij.openapi.progress.impl.ProgressManagerImpl$8.run(ProgressManagerImpl.java:380)
     at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:419)
     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
     at java.util.concurrent.FutureTask.run(FutureTask.java:262)
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
     at java.lang.Thread.run(Thread.java:744)
     at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:149)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.io.FileNotFoundException: Resource nexus-maven-repository-index.properties does not exist
     at org.jetbrains.idea.maven.server.Maven3ServerIndexerImpl$2.run(Maven3ServerIndexerImpl.java:193)
     at org.jetbrains.idea.maven.server.Maven3ServerEmbedderImpl.executeWithMavenSession(Maven3ServerEmbedderImpl.java:343)
     at org.jetbrains.idea.maven.server.Maven3ServerIndexerImpl.updateIndex(Maven3ServerIndexerImpl.java:159)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:606)
     at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
     at sun.rmi.transport.Transport$1.run(Transport.java:177)
     at sun.rmi.transport.Transport$1.run(Transport.java:174)
     at java.security.AccessController.doPrivileged(Native Method)
     at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
     at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:556)
     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811)
     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670)
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
     at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: Resource nexus-maven-repository-index.properties does not exist
     at org.jetbrains.idea.maven.server.Maven3ServerIndexFetcher.retrieve(Maven3ServerIndexFetcher.java:108)
     at org.sonatype.nexus.index.updater.AbstractResourceFetcher.retrieve(AbstractResourceFetcher.java:22)
     at org.sonatype.nexus.index.updater.DefaultIndexUpdater.downloadIndexProperties(DefaultIndexUpdater.java:484)
     at org.sonatype.nexus.index.updater.DefaultIndexUpdater.access$100(DefaultIndexUpdater.java:65)
     at org.sonatype.nexus.index.updater.DefaultIndexUpdater$IndexAdaptor.setProperties(DefaultIndexUpdater.java:771)
     at org.sonatype.nexus.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:945)
     at org.sonatype.nexus.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:150)
     at org.jetbrains.idea.maven.server.Maven3ServerIndexerImpl$2.run(Maven3ServerIndexerImpl.java:190)
     ... 17 more
Caused by: java.lang.RuntimeException: org.apache.maven.wagon.ResourceDoesNotExistException: File: http:/<remote repository>/nexus-maven-repository-index.properties , ReasonPhrase:Not Found.
     at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:883)
     at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
     at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
     at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
     at org.jetbrains.idea.maven.server.Maven3ServerIndexFetcher.retrieve(Maven3ServerIndexFetcher.java:100)



Any kind of help is highly appreciated.

Please sign in to leave a comment.