我无法在Eclipse Luna中下载maven依赖项,因此我认为它与代理相关,因为它在家中运行良好。
我发现即使我更新Eclipse的网络设置,任何事情都会改变。
请帮帮我。
错误:
Failed to execute goal on project springjpa: Could not resolve dependencies for project com.example:springjpa:jar:0.0.1-SNAPSHOT: Failed to collect dependencies for [mysql:mysql-connector-java:jar:5.1.30 (compile), org.hibernate:hibernate-core:jar:4.3.5.Final (compile), org.hibernate:hibernate-entitymanager:jar:4.3.5.Final (compile), org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final (compile), org.springframework.data:spring-data-jpa:jar:1.7.1.RELEASE (compile)]: Failed to read artifact descriptor for org.springframework.data:spring-data-jpa:jar:1.7.1.RELEASE: Could not transfer artifact org.springframework.data:spring-data-jpa:pom:1.7.1.RELEASE from/to central (http://repo.maven.apache.org/maven2): Connection to http://repo.maven.apache.org refused: Connection timed out: connect -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project springjpa: Could not resolve dependencies for project com.example:springjpa:jar:0.0.1-SNAPSHOT: Failed to collect dependencies for [mysql:mysql-connector-java:jar:5.1.30 (compile), org.hibernate:hibernate-core:jar:4.3.5.Final (compile), org.hibernate:hibernate-entitymanager:jar:4.3.5.Final (compile), org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final (compile), org.springframework.data:spring-data-jpa:jar:1.7.1.RELEASE (compile)]
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:210)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:117)
at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:258)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:201)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
....
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at org.apache.maven.wagon.providers.http.httpclient.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:123)
at org.apache.maven.wagon.providers.http.httpclient.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:148)
... 16 more
答案 0 :(得分:0)
当您在堆栈跟踪中包含Maven时,您可能也想在Maven设置中配置代理。
有关更多参考,您可能需要咨询:https://maven.apache.org/guides/mini/guide-proxies.html