简体   繁体   中英

Eclipse Mars gets stuck at Maven project import

I'm trying to create a new workspace in my local Eclipse Mars using an existing Maven Project. Problem is, after importing it, I can't modify it in any way thanks to Eclipse not completing the action "Importing Maven projects", which hangs at 40% forever:

在此处输入图片说明

This seems to block me from saving anything new to the code. Any way I can get around this? Thanks in advance.

EDIT:

So thanks to greg I was reminded of the project's .metadata directory, and inside the .log file, this came up at the end:

!ENTRY org.eclipse.oomph.setup.core 2 0 2019-12-10 16:28:18.763
!MESSAGE Proxy Authentication Required
!STACK 0
org.eclipse.oomph.util.IOExceptionWithCause: Proxy Authentication Required
    at org.eclipse.oomph.setup.internal.core.util.ECFURIHandlerImpl.createInputStream(ECFURIHandlerImpl.java:295)
    at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:360)
    at org.eclipse.oomph.setup.internal.core.util.SetupCoreUtil.handleArchiveRedirection(SetupCoreUtil.java:383)
    at org.eclipse.oomph.setup.internal.core.util.SetupCoreUtil.configureResourceSet(SetupCoreUtil.java:365)
    at org.eclipse.oomph.setup.internal.core.util.SetupCoreUtil.createResourceSet(SetupCoreUtil.java:133)
    at org.eclipse.oomph.setup.internal.core.SetupContext.associate(SetupContext.java:359)
    at org.eclipse.oomph.setup.internal.core.SetupContext.createSelf(SetupContext.java:238)
    at org.eclipse.oomph.setup.ui.SetupUIPlugin.performStartup(SetupUIPlugin.java:563)
    at org.eclipse.oomph.setup.ui.SetupUIPlugin.access$3(SetupUIPlugin.java:346)
    at org.eclipse.oomph.setup.ui.SetupUIPlugin$1$1.run(SetupUIPlugin.java:243)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.eclipse.ecf.filetransfer.IncomingFileTransferException: Proxy Authentication Required
    at org.eclipse.ecf.provider.filetransfer.httpclient4.HttpClientRetrieveFileTransfer.openStreams(HttpClientRetrieveFileTransfer.java:658)
    at org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer.sendRetrieveRequest(AbstractRetrieveFileTransfer.java:885)
    at org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer.sendRetrieveRequest(AbstractRetrieveFileTransfer.java:576)
    at org.eclipse.ecf.provider.filetransfer.retrieve.MultiProtocolRetrieveAdapter.sendRetrieveRequest(MultiProtocolRetrieveAdapter.java:106)
    at org.eclipse.oomph.setup.internal.core.util.ECFURIHandlerImpl.createInputStream(ECFURIHandlerImpl.java:232)
    ... 10 more

!ENTRY org.eclipse.m2e.logback.appender 2 0 2019-12-10 16:28:48.305
!MESSAGE Failure to transfer com.alexnederlof:jasperreports-plugin/maven-metadata.xml from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer metadata com.alexnederlof:jasperreports-plugin/maven-metadata.xml from/to central (http://repo1.maven.org/maven2): Not authorized by proxy, ReasonPhrase:Proxy Authentication Required.

!ENTRY org.eclipse.m2e.logback.appender 2 0 2019-12-10 16:28:48.329
!MESSAGE Failure to transfer com.alexnederlof:jasperreports-plugin/maven-metadata.xml from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer metadata com.alexnederlof:jasperreports-plugin/maven-metadata.xml from/to central (http://repo1.maven.org/maven2): Not authorized by proxy, ReasonPhrase:Proxy Authentication Required.

!ENTRY org.eclipse.m2e.logback.appender 2 0 2019-12-10 16:28:48.352
!MESSAGE Failure to transfer com.alexnederlof:jasperreports-plugin/maven-metadata.xml from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer metadata com.alexnederlof:jasperreports-plugin/maven-metadata.xml from/to central (http://repo1.maven.org/maven2): Not authorized by proxy, ReasonPhrase:Proxy Authentication Required.

!ENTRY org.eclipse.m2e.logback.appender 2 0 2019-12-10 16:28:48.585
!MESSAGE Failure to transfer com.alexnederlof:jasperreports-plugin/maven-metadata.xml from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer metadata com.alexnederlof:jasperreports-plugin/maven-metadata.xml from/to central (http://repo1.maven.org/maven2): Not authorized by proxy, ReasonPhrase:Proxy Authentication Required.

!ENTRY org.eclipse.m2e.logback.appender 2 0 2019-12-10 16:28:48.634
!MESSAGE Failure to transfer com.alexnederlof:jasperreports-plugin/maven-metadata.xml from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer metadata com.alexnederlof:jasperreports-plugin/maven-metadata.xml from/to central (http://repo1.maven.org/maven2): Not authorized by proxy, ReasonPhrase:Proxy Authentication Required.

!ENTRY org.eclipse.m2e.logback.appender 2 0 2019-12-10 16:28:48.675
!MESSAGE Failure to transfer com.alexnederlof:jasperreports-plugin/maven-metadata.xml from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer metadata com.alexnederlof:jasperreports-plugin/maven-metadata.xml from/to central (http://repo1.maven.org/maven2): Not authorized by proxy, ReasonPhrase:Proxy Authentication Required.

!ENTRY org.eclipse.m2e.logback.appender 2 0 2019-12-10 16:28:50.840
!MESSAGE Failure to transfer com.alexnederlof:jasperreports-plugin/maven-metadata.xml from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer metadata com.alexnederlof:jasperreports-plugin/maven-metadata.xml from/to central (http://repo1.maven.org/maven2): Not authorized by proxy, ReasonPhrase:Proxy Authentication Required.

!ENTRY org.eclipse.m2e.logback.appender 2 0 2019-12-10 16:28:50.870
!MESSAGE Failure to transfer com.alexnederlof:jasperreports-plugin/maven-metadata.xml from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer metadata com.alexnederlof:jasperreports-plugin/maven-metadata.xml from/to central (http://repo1.maven.org/maven2): Not authorized by proxy, ReasonPhrase:Proxy Authentication Required.

!ENTRY org.eclipse.m2e.logback.appender 2 0 2019-12-10 16:28:50.893
!MESSAGE Failure to transfer com.alexnederlof:jasperreports-plugin/maven-metadata.xml from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer metadata com.alexnederlof:jasperreports-plugin/maven-metadata.xml from/to central (http://repo1.maven.org/maven2): Not authorized by proxy, ReasonPhrase:Proxy Authentication Required.

I was aware that proxy authentication blocked me from downloading new plugins for Eclipse, but didn't know it could disallow me to import an existing project in some cases. For other projects it works fine. Anyway, I'll see if I can sort this out with my network admin and come back here later.

So, my mistake. Turns out that something was missing, and it was the settings.xml file that should be present inside C:\\Users\\.m2. After taking care of that, the import finished succesfully. Thanks for the attention, guys.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM