title: Maven - exception during project building
body: <p>When I'm trying to build project I get exception:</p>
  
  <blockquote>
    <p>Downloading:
    <a href="http://repo.maven.apache.org/maven2/log4j/log4j/1.2.14/log4j-1.2.14.jar" rel="nofollow">http://repo.maven.apache.org/maven2/log4j/log4j/1.2.14/log4j-1.2.14.jar</a>
    Nov 4, 2012 5:47:16 PM
    org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector
    tryExecute INFO: I/O exception (java.net.SocketException) caught when
    processing request: Connection reset Nov 4, 2012 5:47:16 PM
    org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector
    tryExecute INFO: Retrying request Nov 4, 2012 5:48:16 PM
    org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector
    tryExecute INFO: I/O exception (java.net.SocketException) caught when
    processing request: Connection reset Nov 4, 2012 5:48:16 PM
    org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector
    tryExecute INFO: Retrying request Nov 4, 2012 5:49:17 PM
    org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector
    tryExecute INFO: I/O exception (java.net.SocketException) caught when
    processing request: Connection reset Nov 4, 2012 5:49:17 PM
    org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector
    tryExecute INFO: Retrying request [DEBUG] Writing resolution tracking
    file
    /root/.m2/repository/log4j/log4j/1.2.14/log4j-1.2.14.jar.lastUpdated
    [INFO]
    ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO]
    ------------------------------------------------------------------------ [INFO] Total time: 4:03.016s [INFO] Finished at: Sun Nov 04 17:50:17
    CET 2012 [INFO] Final Memory: 5M/15M [INFO]
    ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project
    jboss-ejb3-examples-ch04-firstejb: Could not resolve dependencies for
    project
    org.jboss.ejb3.examples:jboss-ejb3-examples-ch04-firstejb:jar:1.0.0-cr-1:
    Could not transfer artifact log4j:log4j:jar:1.2.14 from/to central
    (http://repo.maven.apache.org/maven2): Connection reset -> [Help 1]
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
    execute goal on project jboss-ejb3-examples-ch04-firstejb: Could not
    resolve dependencies for project
    org.jboss.ejb3.examples:jboss-ejb3-examples-ch04-firstejb:jar:1.0.0-cr-1:
    Could not transfer artifact log4j:log4j:jar:1.2.14 from/to central
    (http://repo.maven.apache.org/maven2): Connection reset   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(NativeMethodAccessorImpl.java:39)
      at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)     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
    org.jboss.ejb3.examples:jboss-ejb3-examples-ch04-firstejb:jar:1.0.0-cr-1:
    Could not transfer artifact log4j:log4j:jar:1.2.14 from/to central
    (http://repo.maven.apache.org/maven2): Connection reset   at
    org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:189)
      at
    org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:185)
      ... 22 more Caused by:
    org.sonatype.aether.resolution.DependencyResolutionException: Could
    not transfer artifact log4j:log4j:jar:1.2.14 from/to central
    (http://repo.maven.apache.org/maven2): Connection reset   at
    org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:375)
      at
    org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:183)
      ... 23 more Caused by:
    org.sonatype.aether.resolution.ArtifactResolutionException: Could not
    transfer artifact log4j:log4j:jar:1.2.14 from/to central
    (http://repo.maven.apache.org/maven2): Connection reset   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.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:358)
      ... 24 more Caused by:
    org.sonatype.aether.transfer.ArtifactTransferException: Could not
    transfer artifact log4j:log4j:jar:1.2.14 from/to central
    (http://repo.maven.apache.org/maven2): Connection reset   at
    org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:951)
      at
    org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:939)
      at
    org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:669)
      at
    org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:60)
      at
    java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:662) Caused by:
    org.apache.maven.wagon.TransferFailedException: Connection reset  at
    org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:799)
      at
    org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
      at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
      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.SocketException: Connection reset    at
    java.net.SocketInputStream.read(SocketInputStream.java:168)   at
    org.apache.maven.wagon.providers.http.httpclient.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:149)
      at
    org.apache.maven.wagon.providers.http.httpclient.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:111)
      at
    org.apache.maven.wagon.providers.http.httpclient.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:264)
      at
    org.apache.maven.wagon.providers.http.httpclient.impl.conn.DefaultResponseParser.parseHead(DefaultResponseParser.java:98)
      at
    org.apache.maven.wagon.providers.http.httpclient.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:252)
      at
    org.apache.maven.wagon.providers.http.httpclient.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:282)
      at
    org.apache.maven.wagon.providers.http.httpclient.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:247)
      at
    org.apache.maven.wagon.providers.http.httpclient.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(AbstractClientConnAdapter.java:219)
      at
    org.apache.maven.wagon.providers.http.httpclient.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:298)
      at
    org.apache.maven.wagon.providers.http.httpclient.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
      at
    org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:633)
      at
    org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:454)
      at
    org.apache.maven.wagon.providers.http.httpclient.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
      at
    org.apache.maven.wagon.providers.http.httpclient.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
      at
    org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.execute(AbstractHttpClientWagon.java:674)
      at
    org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:793)
      ... 8 more [ERROR]  [ERROR]  [ERROR] For more information about the
    errors and possible solutions, please read the following articles:
    [ERROR] [Help 1]
    <a href="http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException" rel="nofollow">http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException</a></p>
  </blockquote>
  
  <p>What is the problem? I think pom and other things are ok as it is example from book, so it should build.</p>