title: Spring Dependency Resolution
body: <p>I am new to Spring and I am going to develop my first Helloworld Application in spring.
  What I use</p>
  
  <p><strong>Spring 2.5.6</strong></p>
  
  <p><strong>JDK 1.7</strong></p>
  
  <p><strong>Eclipse 3.6</strong></p>
  
  <p><strong>Maven</strong></p>
  
  <p>I downloaded Spring framework and added all the required jars to my project but when I add dependencies to my pom.xml file and try to build the project it gives me the following error</p>
  
  <pre><code>Could not resolve dependencies for Project....
  </code></pre>
  
  <p>My pom.xml is </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/maven-v4_0_0.xsd"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
  &lt;groupId&gt;de.tum.ibis.wsc&lt;/groupId&gt;
  &lt;artifactId&gt;SpringHelloWorld&lt;/artifactId&gt;
  
  &lt;packaging&gt;war&lt;/packaging&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;name&gt;Web Services Computing&lt;/name&gt;
  &lt;url&gt;http://dss.in.tum.de&lt;/url&gt;
  
  &lt;properties&gt;
      &lt;output.filename&gt;hello&lt;/output.filename&gt;
  &lt;/properties&gt;
  
  &lt;!-- //////////////////////////////////////////////////////////// --&gt;
  &lt;!-- //////////////////////////////////////////////////////////// --&gt;
  &lt;!-- /////////// DEPENDENCIES --&gt;
  
  &lt;dependencies&gt;  
  
  &lt;!-- Spring framework --&gt; 
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring&lt;/artifactId&gt;
          &lt;version&gt;2.5.6&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!-- Spring MVC framework --&gt; 
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
          &lt;version&gt;2.5.6&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
          &lt;version&gt;2.5.6&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!-- JUnit to run the tests --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
          &lt;version&gt;4.10&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;!-- Java servlet API --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
          &lt;version&gt;2.5&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!-- Velocity templating engine --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.velocity&lt;/groupId&gt;
          &lt;artifactId&gt;velocity&lt;/artifactId&gt;
          &lt;version&gt;1.7&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!-- JSTL --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;jstl&lt;/artifactId&gt;
          &lt;version&gt;1.2&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!-- langCommons --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
          &lt;artifactId&gt;commons-lang3&lt;/artifactId&gt;
          &lt;version&gt;3.0.1&lt;/version&gt;
      &lt;/dependency&gt;
  
  &lt;/dependencies&gt;
  
  &lt;pluginRepositories&gt;
      &lt;pluginRepository&gt;
          &lt;id&gt;codehaus-snapshots&lt;/id&gt;
          &lt;name&gt;Codehaus Snapshots&lt;/name&gt;
          &lt;url&gt;http://nexus.codehaus.org/snapshots/&lt;/url&gt;
          &lt;releases&gt;
              &lt;enabled&gt;false&lt;/enabled&gt;
          &lt;/releases&gt;
          &lt;snapshots&gt;
              &lt;enabled&gt;true&lt;/enabled&gt;
          &lt;/snapshots&gt;
      &lt;/pluginRepository&gt;
  &lt;/pluginRepositories&gt;
  
  &lt;repositories&gt;
      &lt;repository&gt;
          &lt;id&gt;codehaus-snapshots&lt;/id&gt;
          &lt;name&gt;Codehaus Snapshots&lt;/name&gt;
          &lt;url&gt;http://nexus.codehaus.org/snapshots/&lt;/url&gt;
          &lt;releases&gt;
              &lt;enabled&gt;false&lt;/enabled&gt;
          &lt;/releases&gt;
          &lt;snapshots&gt;
              &lt;enabled&gt;true&lt;/enabled&gt;
          &lt;/snapshots&gt;
      &lt;/repository&gt;
  &lt;/repositories&gt;
  
  
  &lt;!-- build configuration --&gt;
  &lt;build&gt;
      &lt;finalName&gt;${output.filename}&lt;/finalName&gt;
  
      &lt;plugins&gt;
          &lt;!-- CARGO plugin to start an embedded Jetty for testing --&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.codehaus.cargo&lt;/groupId&gt;
              &lt;artifactId&gt;cargo-maven2-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.2.4&lt;/version&gt;
  
              &lt;configuration&gt;
                  &lt;container&gt;
                      &lt;containerId&gt;jetty7x&lt;/containerId&gt;
                      &lt;type&gt;embedded&lt;/type&gt;
                  &lt;/container&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p></p>
  
  <p>Maven Output: </p>
  
  <pre><code> [INFO] ------------------------------------------------------------------------
   Downloading:     http://repo.maven.apache.org/maven2/org/springframework/spring/2.5.6/spring-2.5.6.pom
   Downloading: http://repo.maven.apache.org/maven2/org/springframework/spring- webmvc/2.5.6/spring-webmvc-2.5.6.pom
   [INFO] ------------------------------------------------------------------------
   [INFO] BUILD FAILURE
   [INFO] ------------------------------------------------------------------------
   [INFO] Total time: 21.301s
   [INFO] Finished at: Mon May 13 14:42:03 CEST 2013
   [INFO] Final Memory: 3M/15M
   [INFO] ------------------------------------------------------------------------
   [WARNING] The requested profile "local" could not be activated because it does not exist.
   [ERROR] Failed to execute goal on project SpringHelloWorld: Could not resolve dependencies for project de.tum.ibis.wsc:SpringHelloWorld:war:0.0.1-SNAPSHOT: Failed to collect dependencies for [org.springframework:spring:jar:2.5.6 (compile), org.springframework:spring-webmvc:jar:2.5.6 (compile), junit:junit:jar:4.10 (test), javax.servlet:servlet-api:jar:2.5 (compile), org.apache.velocity:velocity:jar:1.7 (compile), javax.servlet:jstl:jar:1.2 (compile), org.apache.commons:commons-lang3:jar:3.0.1 (compile)]: Failed to read artifact descriptor for org.springframework:spring:jar:2.5.6: Could not transfer artifact org.springframework:spring:pom:2.5.6 from/to central (http://repo.maven.apache.org/maven2): connection timed out to http://repo.maven.apache.org/maven2/org/springframework/spring/2.5.6/spring-2.5.6.pom -&gt;    [Help 1]
  
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR] 
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
  </code></pre>
  
  <p>Any Idea why I get this error ? </p>
  
  <p>Thanks in advance</p>