gpt4 book ai didi

Maven网络问题?

转载 作者:行者123 更新时间:2023-12-01 05:32:52 25 4
gpt4 key购买 nike

问题是: Nexus-maven-repository-index.zip 下载速度为 10kbps 和 maven eclipse:eclipse artifact 下载停止/​​暂停。我不支持任何代理。

编辑:这是由 引起的AVG 链接扫描仪 ,与 Maven failing to download jar dependencies 中的问题相同

我想我的 Maven 安装/网络连接有一些严重的问题。

这是我所做的和我得到的:

  • 我一直在尝试使用 m2eclipse,但是 下载文件 http://mirrors.ibiblio.org/pub/mirrors/maven2/dot-index/nexus-maven-repository-index.zip经过一段时间的超时后通过 eclipse 。我尝试通过 wget 获取文件,我看到的是下载 速度为 11kbps .这是某种政策吗?在这个 11kbps 上看起来相当稳定。一个星期以来我的速度如此惊人,所以这不是暂时的问题。如果这是每个人的政策和正常速度 - 很好。我不会使用 m2eclipse,没问题。
  • 我已经放弃使用 m2eclipse,我正在使用 maven-eclipse-plugin。不,等等——我不是。以下是我调用 mvn eclipse:eclipse:
  • 时发生的情况
  • 神器一段时间后下载挂起,随机 .然后我点击 ^C,再次运行命令,下载恢复,然后再次挂起,有时在同一个 Artifact 上,有时我会更进一步。我在 Debug模式下运行 mvn ,它总是卡在同一个地方,下面的堆栈跟踪。与英国 repo 相同。

  • 这是怎么回事?感谢您的帮助,我完全迷路了。我假设我的互联网连接一团糟,但它工作得非常好(除了 maven)。我觉得被 maven repo 屏蔽了。

    有任何想法吗?

    重要细节如下:

    这是我运行 maven 的方式(任何线程数都会发生相同的情况)
    mvnDebug eclipse:eclipse -DdownloadSources=true -Dmaven.artifact.threads=1

    这是我的 maven 版本(最新的 maven 2 版本也是如此):
    $ mvn --version
    Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
    Maven home: C:\apache-maven-3.0.4
    Java version: 1.7.0_04, vendor: Oracle Corporation
    Java home: C:\Program Files\Java\jdk1.7.0_04\jre
    Default locale: pl_PL, platform encoding: Cp1250
    OS name: "windows vista", version: "6.0", arch: "x86", family: "windows"

    这是 maven eclipse:eclipse 挂起的堆栈跟踪(看起来像网络问题,但为什么?):
    java.net.SocketInputStream.socketRead0(java.io.FileDescriptor, byte[], int, int, int) line: not available [native method]   
    java.net.SocketInputStream.read(byte[], int, int, int) line: 150
    java.net.SocketInputStream.read(byte[], int, int) line: 121
    org.apache.maven.wagon.providers.http.httpclient.impl.io.SocketInputBuffer(org.apache.maven.wagon.providers.http.httpclient.impl.io.AbstractSessionInputBuffer).fillBuffer() line: 149
    org.apache.maven.wagon.providers.http.httpclient.impl.io.SocketInputBuffer.fillBuffer() line: 110
    org.apache.maven.wagon.providers.http.httpclient.impl.io.SocketInputBuffer(org.apache.maven.wagon.providers.http.httpclient.impl.io.AbstractSessionInputBuffer).read(byte[], int, int) line: 195
    org.apache.maven.wagon.providers.http.httpclient.impl.io.ChunkedInputStream.read(byte[], int, int) line: 173
    org.apache.maven.wagon.providers.http.httpclient.conn.EofSensorInputStream.read(byte[], int, int) line: 138
    java.util.zip.GZIPInputStream(java.util.zip.InflaterInputStream).fill() line: 238
    java.util.zip.GZIPInputStream(java.util.zip.InflaterInputStream).read(byte[], int, int) line: 158
    java.util.zip.GZIPInputStream.read(byte[], int, int) line: 116
    org.apache.maven.wagon.providers.http.HttpWagon(org.apache.maven.wagon.AbstractWagon).transfer(org.apache.maven.wagon.resource.Resource, java.io.InputStream, java.io.OutputStream, int, int) line: 493
    org.apache.maven.wagon.providers.http.HttpWagon(org.apache.maven.wagon.AbstractWagon).getTransfer(org.apache.maven.wagon.resource.Resource, java.io.OutputStream, java.io.InputStream, boolean, int) line: 339
    org.apache.maven.wagon.providers.http.HttpWagon(org.apache.maven.wagon.AbstractWagon).getTransfer(org.apache.maven.wagon.resource.Resource, java.io.File, java.io.InputStream, boolean, int) line: 310
    org.apache.maven.wagon.providers.http.HttpWagon(org.apache.maven.wagon.AbstractWagon).getTransfer(org.apache.maven.wagon.resource.Resource, java.io.File, java.io.InputStream) line: 287
    org.apache.maven.wagon.providers.http.HttpWagon(org.apache.maven.wagon.StreamWagon).getIfNewer(java.lang.String, java.io.File, long) line: 97
    org.apache.maven.wagon.providers.http.HttpWagon(org.apache.maven.wagon.StreamWagon).get(java.lang.String, java.io.File) line: 61
    org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask<T>.run() line: 601
    org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run() line: 60
    org.sonatype.aether.connector.wagon.WagonRepositoryConnector$1.execute(java.lang.Runnable) line: 192
    org.sonatype.aether.connector.wagon.WagonRepositoryConnector.get(java.util.Collection<? extends org.sonatype.aether.spi.connector.ArtifactDownload>, java.util.Collection<? extends org.sonatype.aether.spi.connector.MetadataDownload>) line: 445
    org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(org.sonatype.aether.RepositorySystemSession, java.util.Collection<? extends org.sonatype.aether.resolution.ArtifactRequest>) line: 457
    org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(org.sonatype.aether.RepositorySystemSession, java.util.Collection<? extends org.sonatype.aether.resolution.ArtifactRequest>) line: 216
    org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(org.sonatype.aether.RepositorySystemSession, org.sonatype.aether.resolution.ArtifactRequest) line: 193
    org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveArtifact(org.sonatype.aether.RepositorySystemSession, org.sonatype.aether.resolution.ArtifactRequest) line: 286
    org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(org.apache.maven.artifact.Artifact, java.util.List<org.apache.maven.artifact.repository.ArtifactRepository>, org.sonatype.aether.RepositorySystemSession) line: 213
    org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(org.apache.maven.artifact.Artifact, java.util.List<org.apache.maven.artifact.repository.ArtifactRepository>, org.apache.maven.artifact.repository.ArtifactRepository, org.apache.maven.wagon.events.TransferListener) line: 157
    org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(org.apache.maven.artifact.Artifact, java.util.List<org.apache.maven.artifact.repository.ArtifactRepository>, org.apache.maven.artifact.repository.ArtifactRepository) line: 525
    org.apache.maven.plugin.ide.IdeUtils.resolveArtifact(org.apache.maven.artifact.resolver.ArtifactResolver, org.apache.maven.artifact.Artifact, java.util.List, org.apache.maven.artifact.repository.ArtifactRepository, org.apache.maven.plugin.logging.Log) line: 442
    org.apache.maven.plugin.eclipse.EclipsePlugin(org.apache.maven.plugin.ide.AbstractIdeSupportMojo).resolveDependenciesWithClassifier(org.apache.maven.plugin.ide.IdeDependency[], java.lang.String, boolean) line: 990
    org.apache.maven.plugin.eclipse.EclipsePlugin(org.apache.maven.plugin.ide.AbstractIdeSupportMojo).resolveSourceAndJavadocArtifacts(org.apache.maven.plugin.ide.IdeDependency[]) line: 918
    org.apache.maven.plugin.eclipse.EclipsePlugin(org.apache.maven.plugin.ide.AbstractIdeSupportMojo).execute() line: 509
    org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(org.apache.maven.execution.MavenSession, org.apache.maven.plugin.MojoExecution) line: 101
    org.apache.maven.lifecycle.internal.MojoExecutor.execute(org.apache.maven.execution.MavenSession, org.apache.maven.plugin.MojoExecution, org.apache.maven.lifecycle.internal.ProjectIndex, org.apache.maven.lifecycle.internal.DependencyContext) line: 209
    org.apache.maven.lifecycle.internal.MojoExecutor.execute(org.apache.maven.execution.MavenSession, org.apache.maven.plugin.MojoExecution, org.apache.maven.lifecycle.internal.ProjectIndex, org.apache.maven.lifecycle.internal.DependencyContext, org.apache.maven.lifecycle.internal.PhaseRecorder) line: 153
    org.apache.maven.lifecycle.internal.MojoExecutor.execute(org.apache.maven.execution.MavenSession, java.util.List<org.apache.maven.plugin.MojoExecution>, org.apache.maven.lifecycle.internal.ProjectIndex) line: 145
    org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(org.apache.maven.execution.MavenSession, org.apache.maven.execution.MavenSession, org.apache.maven.lifecycle.internal.ReactorContext, org.apache.maven.project.MavenProject, org.apache.maven.lifecycle.internal.TaskSegment) line: 84
    org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(org.apache.maven.execution.MavenSession, org.apache.maven.lifecycle.internal.ReactorContext, org.apache.maven.project.MavenProject, org.apache.maven.lifecycle.internal.TaskSegment) line: 59
    org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(org.apache.maven.execution.MavenSession, org.apache.maven.lifecycle.internal.ReactorContext, org.apache.maven.lifecycle.internal.ProjectBuildList, java.util.List<org.apache.maven.lifecycle.internal.TaskSegment>, org.apache.maven.lifecycle.internal.ReactorBuildStatus) line: 183
    org.apache.maven.lifecycle.internal.LifecycleStarter.execute(org.apache.maven.execution.MavenSession) line: 161
    org.apache.maven.DefaultMaven.doExecute(org.apache.maven.execution.MavenExecutionRequest) line: 320
    org.apache.maven.DefaultMaven.execute(org.apache.maven.execution.MavenExecutionRequest) line: 156
    org.apache.maven.cli.MavenCli.execute(org.apache.maven.cli.MavenCli$CliRequest) line: 537
    org.apache.maven.cli.MavenCli.doMain(org.apache.maven.cli.MavenCli$CliRequest) line: 196
    org.apache.maven.cli.MavenCli.main(java.lang.String[], org.codehaus.plexus.classworlds.ClassWorld) line: 141
    sun.reflect.NativeMethodAccessorImpl.invoke0(java.lang.reflect.Method, java.lang.Object, java.lang.Object[]) line: not available [native method]
    sun.reflect.NativeMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) line: 57
    sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) line: 43
    java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object...) line: 601
    org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(java.lang.String[]) line: 290
    org.codehaus.plexus.classworlds.launcher.Launcher.launch(java.lang.String[]) line: 230
    org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(java.lang.String[]) line: 409
    org.codehaus.plexus.classworlds.launcher.Launcher.main(java.lang.String[]) line: 352

    感谢您的任何提示。

    内核

    最佳答案

    两条快速建议:

  • 不要使用 ibiblio,规范的 Maven 存储库是 http://repo1.maven.org/maven2 - 它由 Sonatype 维护,现在由全局 CDN 提供服务。您不应该在下载索引时遇到任何速度问题。
  • 考虑在您和公共(public)存储库之间放置一个存储库管理器。您经常会发现性能会因此而提高……非常显着。

  • 不要费心用 wget 下载,它对你没有帮助。事实上,您可能会看到下载时间变慢,因为您正在尝试使用 wget。我最强烈的建议是使用存储库管理器:Nexus 或 Artifactory。

    关于Maven网络问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10489309/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com