title: log4j maven dependency download getting timed out
body: <p>I was trying to setup a web app using spring MVC. I'm getting "connection timed out" while maven tries to download dependencies for log4j. </p>
  
  <p>Following is the dependency added to pom.xml:</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;log4j&lt;/groupId&gt;
          &lt;artifactId&gt;log4j&lt;/artifactId&gt;
          &lt;version&gt;1.2.17&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>Following is the error message:</p>
  
  <pre><code>[ERROR] Failed to execute goal on project FirstTestProject: Could not resolve dependencies for project com.nikhil.projects:FirstTestProject:war:0.0.1-SNAPSHOT: Failed to collect dependencies for [junit:junit:jar:3.8.1 (test), org.springframework:spring-core:jar:3.2.4.RELEASE (compile), org.springframework:spring-beans:jar:3.2.4.RELEASE (compile), org.springframework:spring-aop:jar:3.2.3.RELEASE (compile), org.springframework:spring-context:jar:3.2.3.RELEASE (compile), org.springframework:spring-expression:jar:3.2.3.RELEASE (compile), org.springframework:spring-web:jar:3.2.3.RELEASE (compile), org.springframework:spring-webmvc:jar:3.2.3.RELEASE (compile), javax.servlet:javax.servlet-api:jar:3.0.1 (compile), log4j:log4j:jar:1.2.17 (compile)]: Failed to read artifact descriptor for log4j:log4j:jar:1.2.17: Could not transfer artifact log4j:log4j:pom:1.2.17 from/to central (http://repo.maven.apache.org/maven2): connection timed out to http://repo.maven.apache.org/maven2/log4j/log4j/1.2.17/log4j-1.2.17.pom -&gt; [Help 1]
  org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project FirstTestProject: Could not resolve dependencies for project com.nikhil.projects:FirstTestProject:war:0.0.1-SNAPSHOT: Failed to collect dependencies for [junit:junit:jar:3.8.1 (test), org.springframework:spring-core:jar:3.2.4.RELEASE (compile), org.springframework:spring-beans:jar:3.2.4.RELEASE (compile), org.springframework:spring-aop:jar:3.2.3.RELEASE (compile), org.springframework:spring-context:jar:3.2.3.RELEASE (compile), org.springframework:spring-expression:jar:3.2.3.RELEASE (compile), org.springframework:spring-web:jar:3.2.3.RELEASE (compile), org.springframework:spring-webmvc:jar:3.2.3.RELEASE (compile), javax.servlet:javax.servlet-api:jar:3.0.1 (compile), log4j:log4j:jar:1.2.17 (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)
      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(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
  Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project com.nikhil.projects:FirstTestProject:war:0.0.1-SNAPSHOT: Failed to collect dependencies for [junit:junit:jar:3.8.1 (test), org.springframework:spring-core:jar:3.2.4.RELEASE (compile), org.springframework:spring-beans:jar:3.2.4.RELEASE (compile), org.springframework:spring-aop:jar:3.2.3.RELEASE (compile), org.springframework:spring-context:jar:3.2.3.RELEASE (compile), org.springframework:spring-expression:jar:3.2.3.RELEASE (compile), org.springframework:spring-web:jar:3.2.3.RELEASE (compile), org.springframework:spring-webmvc:jar:3.2.3.RELEASE (compile), javax.servlet:javax.servlet-api:jar:3.0.1 (compile), log4j:log4j:jar:1.2.17 (compile)]
      at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:158)
      at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:185)
      ... 22 more
  Caused by: org.sonatype.aether.collection.DependencyCollectionException: Failed to collect dependencies for [junit:junit:jar:3.8.1 (test), org.springframework:spring-core:jar:3.2.4.RELEASE (compile), org.springframework:spring-beans:jar:3.2.4.RELEASE (compile), org.springframework:spring-aop:jar:3.2.3.RELEASE (compile), org.springframework:spring-context:jar:3.2.3.RELEASE (compile), org.springframework:spring-expression:jar:3.2.3.RELEASE (compile), org.springframework:spring-web:jar:3.2.3.RELEASE (compile), org.springframework:spring-webmvc:jar:3.2.3.RELEASE (compile), javax.servlet:javax.servlet-api:jar:3.0.1 (compile), log4j:log4j:jar:1.2.17 (compile)]
      at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:258)
      at org.sonatype.aether.impl.internal.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:308)
      at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:150)
      ... 23 more
  Caused by: org.sonatype.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for log4j:log4j:jar:1.2.17
      at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:296)
      at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:186)
      at org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:412)
      at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:240)
      ... 25 more
  Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not transfer artifact log4j:log4j:pom:1.2.17 from/to central (http://repo.maven.apache.org/maven2): connection timed out to http://repo.maven.apache.org/maven2/log4j/log4j/1.2.17/log4j-1.2.17.pom
      at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538)
      at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
      at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193)
      at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:281)
      ... 28 more
  Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact log4j:log4j:pom:1.2.17 from/to central (http://repo.maven.apache.org/maven2): connection timed out to http://repo.maven.apache.org/maven2/log4j/log4j/1.2.17/log4j-1.2.17.pom
      at org.sonatype.aether.connector.async.AsyncRepositoryConnector$3.wrap(AsyncRepositoryConnector.java:1546)
      at org.sonatype.aether.connector.async.AsyncRepositoryConnector$3.wrap(AsyncRepositoryConnector.java:1537)
      at org.sonatype.aether.connector.async.AsyncRepositoryConnector$GetTask.flush(AsyncRepositoryConnector.java:1035)
      at org.sonatype.aether.connector.async.AsyncRepositoryConnector.get(AsyncRepositoryConnector.java:409)
      at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:457)
      ... 31 more
  Caused by: java.net.ConnectException: connection timed out to http://repo.maven.apache.org/maven2/log4j/log4j/1.2.17/log4j-1.2.17.pom
      at com.ning.http.client.providers.netty.NettyConnectListener.operationComplete(NettyConnectListener.java:95)
      at org.jboss.netty.channel.DefaultChannelFuture.notifyListener(DefaultChannelFuture.java:381)
      at org.jboss.netty.channel.DefaultChannelFuture.notifyListeners(DefaultChannelFuture.java:372)
      at org.jboss.netty.channel.DefaultChannelFuture.setFailure(DefaultChannelFuture.java:334)
      at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.processConnectTimeout(NioClientSocketPipelineSink.java:374)
      at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.run(NioClientSocketPipelineSink.java:283)
      at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
      at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:44)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
  Caused by: java.net.ConnectException: connection timed out
      at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.processConnectTimeout(NioClientSocketPipelineSink.java:371)
      at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.run(NioClientSocketPipelineSink.java:283)
      ... 3 more
  </code></pre>