title: Maven build issue - Connection to repository refused
body: <p>I wish to import, change, rebuild, test and push/check-in my changes to the code available <a href="https://github.com/cloudera/seismichadoop" rel="noreferrer">in this Github repository</a></p>
  
  <p>Currently, I do not wish to use any IDE or plug-ins for this purpose.</p>
  
  <p>I installed Maven on my Windows machine and as proceeded as per the installation instructions as shown below :</p>
  
  <pre><code>C:\Documents and Settings\298790\My Documents\Downloads\seismichadoop-master&gt;mvn
   -X package
  Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 19:21:
  28+0530)
  Maven home: D:\Omkar\Development\Softwares\Tools\apache-maven-3.0.5
  Java version: 1.6.0_20, vendor: Sun Microsystems Inc.
  Java home: C:\Program Files\Java\jdk1.6.0_20\jre
  Default locale: en_US, platform encoding: Cp1252
  OS name: "windows xp", version: "5.1", arch: "x86", family: "windows"
  [INFO] Error stacktraces are turned on.
  [DEBUG] Reading global settings from D:\Omkar\Development\Softwares\Tools\apache
  -maven-3.0.5\conf\settings.xml
  [DEBUG] Reading user settings from C:\Documents and Settings\298790\.m2\settings
  .xml
  [DEBUG] Using local repository at C:\Documents and Settings\298790\.m2\repositor
  y
  [DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10 for C:\Doc
  uments and Settings\298790\.m2\repository
  [INFO] Scanning for projects...
  [DEBUG] Extension realms for project com.cloudera.seismic:seismic:jar:0.1.0: (no
  ne)
  [DEBUG] Looking up lifecyle mappings for packaging jar from ClassRealm[plexus.co
  re, parent: null]
  [DEBUG] === REACTOR BUILD PLAN ================================================
  [DEBUG] Project: com.cloudera.seismic:seismic:jar:0.1.0
  [DEBUG] Tasks:   [package]
  [DEBUG] Style:   Regular
  [DEBUG] =======================================================================
  [INFO]
  [INFO] ------------------------------------------------------------------------
  [INFO] Building seismic 0.1.0
  [INFO] ------------------------------------------------------------------------
  [DEBUG] Lifecycle default -&gt; [validate, initialize, generate-sources, process-so
  urces, generate-resources, process-resources, compile, process-classes, generate
  -test-sources, process-test-sources, generate-test-resources, process-test-resou
  rces, test-compile, process-test-classes, test, prepare-package, package, pre-in
  tegration-test, integration-test, post-integration-test, verify, install, deploy
  ]
  [DEBUG] Lifecycle clean -&gt; [pre-clean, clean, post-clean]
  [DEBUG] Lifecycle site -&gt; [pre-site, site, post-site, site-deploy]
  [DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://repo
  .maven.apache.org/maven2
  Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
  resources-plugin/2.5/maven-resources-plugin-2.5.pom
  [DEBUG] Writing resolution tracking file C:\Documents and Settings\298790\.m2\re
  pository\org\apache\maven\plugins\maven-resources-plugin\2.5\maven-resources-plu
  gin-2.5.pom.lastUpdated
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 21.573s
  [INFO] Finished at: Fri May 24 12:05:55 IST 2013
  [INFO] Final Memory: 2M/15M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its
   dependencies could not be resolved: Failed to read artifact descriptor for org.
  apache.maven.plugins:maven-resources-plugin:jar:2.5: Could not transfer artifact
   org.apache.maven.plugins:maven-resources-plugin:pom:2.5 from/to central (http:/
  /repo.maven.apache.org/maven2): Connection to http://repo.maven.apache.org refus
  ed: Connection timed out: connect -&gt; [Help 1]
  org.apache.maven.plugin.PluginResolutionException: Plugin org.apache.maven.plugi
  ns:maven-resources-plugin:2.5 or one of its dependencies could not be resolved:
  Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-
  plugin:jar:2.5
          at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.re
  solve(DefaultPluginDependenciesResolver.java:129)
          at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginD
  escriptor(DefaultMavenPluginManager.java:142)
          at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDes
  criptor(DefaultMavenPluginManager.java:261)
          at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor(D
  efaultBuildPluginManager.java:185)
          at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalc
  ulator.setupMojoExecution(DefaultLifecycleExecutionPlanCalculator.java:152)
          at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalc
  ulator.setupMojoExecutions(DefaultLifecycleExecutionPlanCalculator.java:139)
          at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalc
  ulator.calculateExecutionPlan(DefaultLifecycleExecutionPlanCalculator.java:116)
          at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalc
  ulator.calculateExecutionPlan(DefaultLifecycleExecutionPlanCalculator.java:129)
          at org.apache.maven.lifecycle.internal.BuilderCommon.resolveBuildPlan(Bu
  ilderCommon.java:92)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
  ct(LifecycleModuleBuilder.java:81)
          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.sonatype.aether.resolution.ArtifactDescriptorException: Failed to
   read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:ja
  r:2.5
          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.DefaultRepositorySystem.readArtifac
  tDescriptor(DefaultRepositorySystem.java:279)
          at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.re
  solve(DefaultPluginDependenciesResolver.java:115)
          ... 25 more
  Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not
   transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.5 from/
  to central (http://repo.maven.apache.org/maven2): Connection to http://repo.mave
  n.apache.org refused
          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.DefaultArtifactResolver.resolveArti
  fact(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 tra
  nsfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.5 from/to c
  entral (http://repo.maven.apache.org/maven2): Connection to http://repo.maven.ap
  ache.org refused
          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: Connection to http://
  repo.maven.apache.org refused
          at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.fillInput
  Data(AbstractHttpClientWagon.java:892)
          at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:11
  6)
          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: org.apache.maven.wagon.providers.http.httpclient.conn.HttpHostConnect
  Exception: Connection to http://repo.maven.apache.org refused
          at org.apache.maven.wagon.providers.http.httpclient.impl.conn.DefaultCli
  entConnectionOperator.openConnection(DefaultClientConnectionOperator.java:190)
          at org.apache.maven.wagon.providers.http.httpclient.impl.conn.ManagedCli
  entConnectionImpl.open(ManagedClientConnectionImpl.java:294)
          at org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultR
  equestDirector.tryConnect(DefaultRequestDirector.java:645)
          at org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultR
  equestDirector.execute(DefaultRequestDirector.java:480)
          at org.apache.maven.wagon.providers.http.httpclient.impl.client.Abstract
  HttpClient.execute(AbstractHttpClient.java:906)
          at org.apache.maven.wagon.providers.http.httpclient.impl.client.Abstract
  HttpClient.execute(AbstractHttpClient.java:805)
          at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.execute(A
  bstractHttpClientWagon.java:746)
          at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.fillInput
  Data(AbstractHttpClientWagon.java:886)
          ... 8 more
  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.PlainSoc
  ketFactory.connectSocket(PlainSocketFactory.java:127)
          at org.apache.maven.wagon.providers.http.httpclient.impl.conn.DefaultCli
  entConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
          ... 15 more
  [ERROR]
  [ERROR]
  [ERROR] For more information about the errors and possible solutions, please rea
  d the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti
  onException
  </code></pre>
  
  <p>I tried to access the URL for which I'm getting the connection refused error :</p>
  
  <pre><code>http://repo.maven.apache.org
  
  Browsing for this directory has been disabled.
  
  View this directory's contents on http://search.maven.org instead.
  </code></pre>
  
  <p>The pom.xml is as follows :</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
    &lt;groupId&gt;com.cloudera.seismic&lt;/groupId&gt;
    &lt;artifactId&gt;seismic&lt;/artifactId&gt;
    &lt;version&gt;0.1.0&lt;/version&gt;
    &lt;packaging&gt;jar&lt;/packaging&gt;
  
    &lt;name&gt;seismic&lt;/name&gt;
  
    &lt;dependencies&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.apache.hadoop&lt;/groupId&gt;
        &lt;artifactId&gt;hadoop-core&lt;/artifactId&gt;
        &lt;version&gt;1.0.3&lt;/version&gt;
        &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
        &lt;groupId&gt;org.apache.crunch&lt;/groupId&gt;
        &lt;artifactId&gt;crunch&lt;/artifactId&gt;
        &lt;version&gt;0.4.0-incubating&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
        &lt;groupId&gt;commons-cli&lt;/groupId&gt;
        &lt;artifactId&gt;commons-cli&lt;/artifactId&gt;
        &lt;version&gt;1.2&lt;/version&gt;
        &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
        &lt;groupId&gt;commons-io&lt;/groupId&gt;
        &lt;artifactId&gt;commons-io&lt;/artifactId&gt;
        &lt;version&gt;2.1&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
        &lt;groupId&gt;commons-lang&lt;/groupId&gt;
        &lt;artifactId&gt;commons-lang&lt;/artifactId&gt;
        &lt;version&gt;2.4&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
        &lt;groupId&gt;commons-httpclient&lt;/groupId&gt;
        &lt;artifactId&gt;commons-httpclient&lt;/artifactId&gt;
        &lt;version&gt;3.0.1&lt;/version&gt;
        &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
        &lt;groupId&gt;junit&lt;/groupId&gt;
        &lt;artifactId&gt;junit&lt;/artifactId&gt;
        &lt;version&gt;3.8.1&lt;/version&gt;
        &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
    &lt;/dependencies&gt;
  
    &lt;repositories&gt;
      &lt;repository&gt;
        &lt;id&gt;maven-hadoop&lt;/id&gt;
        &lt;name&gt;Hadoop Releases&lt;/name&gt;
        &lt;url&gt;https://repository.cloudera.com/content/repositories/releases/&lt;/url&gt;
      &lt;/repository&gt;
    &lt;/repositories&gt;
  
    &lt;build&gt;
      &lt;plugins&gt;
        &lt;plugin&gt;
          &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.2.1&lt;/version&gt;
          &lt;configuration&gt;
            &lt;descriptors&gt;
              &lt;descriptor&gt;src/main/assembly/hadoop-job.xml&lt;/descriptor&gt;
            &lt;/descriptors&gt;
            &lt;archive&gt;
              &lt;manifest&gt;
                &lt;mainClass&gt;com.cloudera.seismic.segy.Main&lt;/mainClass&gt;
              &lt;/manifest&gt;
            &lt;/archive&gt;
          &lt;/configuration&gt;
          &lt;executions&gt;
            &lt;execution&gt;
              &lt;id&gt;make-assembly&lt;/id&gt;
              &lt;phase&gt;package&lt;/phase&gt;
              &lt;goals&gt;
                &lt;goal&gt;single&lt;/goal&gt;
              &lt;/goals&gt;
            &lt;/execution&gt;
          &lt;/executions&gt;
        &lt;/plugin&gt;
      &lt;/plugins&gt;
    &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>