title: Maven build failure: Read time out
body: <p>I have tried all the possible solutions found <a href="https://stackoverflow.com/questions/5074063/maven-error-failure-to-transfer">here</a>, including: </p>
  
  <ol>
  <li>find ~/.m2  -name "*.lastUpdated" -exec grep -q "Could not transfer" {} \; -print -exec rm {} \;  </li>
  <li>mvn -U clean    </li>
  </ol>
  
  <p>It does not work anyway, the specific log is as below: </p>
  
  <p>btw: I was trying to run a struts2 sample code from <a href="http://www.mkyong.com/struts2/struts-2-hello-world-annotation-example/" rel="nofollow noreferrer">mkyong site</a>   </p>
  
  <hr>
  
  <pre><code>[DEBUG] =======================================================================
  [DEBUG] com.mkyong.common:Struts2Example:war:com.mkyong.common
  [DEBUG]    junit:junit:jar:3.8.1:test
  [DEBUG]    org.apache.struts:struts2-core:jar:2.1.8:compile
  [DEBUG]       com.opensymphony:xwork-core:jar:2.1.6:compile
  [DEBUG]          org.springframework:spring-test:jar:2.5.6:compile
  [DEBUG]             commons-logging:commons-logging:jar:1.1.1:compile
  [DEBUG]       org.freemarker:freemarker:jar:2.3.15:compile
  [DEBUG]       ognl:ognl:jar:2.7.3:compile
  [DEBUG]       commons-fileupload:commons-fileupload:jar:1.2.1:compile
  [DEBUG]       commons-io:commons-io:jar:1.3.2:compile
  [DEBUG]       com.sun:tools:jar:1.5.0:system
  [DEBUG]    org.apache.struts:struts2-convention-plugin:jar:2.1.8:compile
  [DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://repo
  .maven.apache.org/maven2
  Downloading: http://repo.maven.apache.org/maven2/org/apache/struts/struts2-core/
  2.1.8/struts2-core-2.1.8.jar
  [DEBUG] Writing resolution tracking file D:\ProgramData\apache-maven-repo\.m2\re
  pository\org\apache\struts\struts2-core\2.1.8\struts2-core-2.1.8.jar.lastUpdated
  
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 52:31.162s
  [INFO] Finished at: Fri Jan 18 20:16:49 CST 2013
  [INFO] Final Memory: 2M/5M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal on project Struts2Example: Could not resolve depe
  ndencies for project com.mkyong.common:Struts2Example:war:com.mkyong.common: Cou
  ld not transfer artifact org.apache.struts:struts2-core:jar:2.1.8 from/to centra
  l (http://repo.maven.apache.org/maven2): GET request of: org/apache/struts/strut
  s2-core/2.1.8/struts2-core-2.1.8.jar from central failed: Read timed out -&gt; [Hel
  p 1]
  org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
  n project Struts2Example: Could not resolve dependencies for project com.mkyong.
  common:Struts2Example:war:com.mkyong.common: Could not transfer artifact org.apa
  che.struts:struts2-core:jar:2.1.8 from/to central (http://repo.maven.apache.org/
  maven2): GET request of: org/apache/struts/struts2-core/2.1.8/struts2-core-2.1.8
  .jar from central failed
          at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDe
  pendencies(LifecycleDependencyResolver.java:210)
          at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resol
  veProjectDependencies(LifecycleDependencyResolver.java:117)
          at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAr
  eResolved(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.buildProje
  ct(LifecycleModuleBuilder.java:84)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
  ct(LifecycleModuleBuilder.java:59)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu
  ild(LifecycleStarter.java:183)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
  eStarter.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)
          at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
          at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  sorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
  cher.java:290)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
  a:230)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
  uncher.java:409)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
  352)
  Caused by: org.apache.maven.project.DependencyResolutionException: Could not res
  olve dependencies for project com.mkyong.common:Struts2Example:war:com.mkyong.co
  mmon: Could not transfer artifact org.apache.struts:struts2-core:jar:2.1.8 from/
  to central (http://repo.maven.apache.org/maven2): GET request of: org/apache/str
  uts/struts2-core/2.1.8/struts2-core-2.1.8.jar from central failed
          at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(D
  efaultProjectDependenciesResolver.java:189)
          at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDe
  pendencies(LifecycleDependencyResolver.java:185)
          ... 22 more
  Caused by: org.sonatype.aether.resolution.DependencyResolutionException: Could n
  ot transfer artifact org.apache.struts:struts2-core:jar:2.1.8 from/to central (h
  ttp://repo.maven.apache.org/maven2): GET request of: org/apache/struts/struts2-c
  ore/2.1.8/struts2-core-2.1.8.jar from central failed
          at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDepe
  ndencies(DefaultRepositorySystem.java:375)
          at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(D
  efaultProjectDependenciesResolver.java:183)
          ... 23 more
  Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not
   transfer artifact org.apache.struts:struts2-core:jar:2.1.8 from/to central (htt
  p://repo.maven.apache.org/maven2): GET request of: org/apache/struts/struts2-cor
  e/2.1.8/struts2-core-2.1.8.jar from central failed
          at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(Def
  aultArtifactResolver.java:538)
          at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArti
  facts(DefaultArtifactResolver.java:216)
          at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDepe
  ndencies(DefaultRepositorySystem.java:358)
          ... 24 more
  Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not tra
  nsfer artifact org.apache.struts:struts2-core:jar:2.1.8 from/to central (http://
  repo.maven.apache.org/maven2): GET request of: org/apache/struts/struts2-core/2.
  1.8/struts2-core-2.1.8.jar from central failed
          at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(W
  agonRepositoryConnector.java:951)
          at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(W
  agonRepositoryConnector.java:941)
          at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.
  run(WagonRepositoryConnector.java:669)
          at org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(Run
  nableErrorForwarder.java:60)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
  utor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
  .java:908)
          at java.lang.Thread.run(Thread.java:619)
  Caused by: org.apache.maven.wagon.TransferFailedException: GET request of: org/a
  pache/struts/struts2-core/2.1.8/struts2-core-2.1.8.jar from central failed
          at org.apache.maven.wagon.AbstractWagon.getTransfer(AbstractWagon.java:3
  49)
          at org.apache.maven.wagon.AbstractWagon.getTransfer(AbstractWagon.java:3
  10)
          at org.apache.maven.wagon.AbstractWagon.getTransfer(AbstractWagon.java:2
  87)
          at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:97)
          at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
          at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.
  run(WagonRepositoryConnector.java:601)
          ... 4 more
  Caused by: java.net.SocketTimeoutException: Read timed out
          at java.net.SocketInputStream.socketRead0(Native Method)
          at java.net.SocketInputStream.read(SocketInputStream.java:129)
          at org.apache.maven.wagon.providers.http.httpclient.impl.io.AbstractSess
  ionInputBuffer.read(AbstractSessionInputBuffer.java:187)
          at org.apache.maven.wagon.providers.http.httpclient.impl.io.ContentLengt
  hInputStream.read(ContentLengthInputStream.java:176)
          at org.apache.maven.wagon.providers.http.httpclient.conn.EofSensorInputS
  tream.read(EofSensorInputStream.java:138)
          at org.apache.maven.wagon.AbstractWagon.transfer(AbstractWagon.java:493)
  
          at org.apache.maven.wagon.AbstractWagon.getTransfer(AbstractWagon.java:3
  39)
          ... 9 more
  </code></pre>