Gradlew build not working
<p>When I'm trying to clean my project with <code>./gradlew clean</code> it works, but
the <code>./gradlew build</code> won't work. I tried a few repositories, but it can't resolve the Spring dependencies.</p>

<p>Here is the <code>build.gradle</code>:</p>

<pre><code>apply plugin: 'war'

war {
    baseName = 'hello'
}

configurations {
    providedRuntime
}

dependencies {

    compile('org.springframework.boot:spring-boot-starter-web')
    compile('org.json:json:20141113')
    compile('com.jayway.jsonpath:json-path:0.8.1')
    compile('org.jsoup:jsoup:1.8.2')
    compile('org.springframework.social:spring-social-twitter')
    compile('org.springframework.social:spring-social-twitter:1.1.0.RELEASE')
    compile('org.springframework.social:spring-social-core')
    providedRuntime('org.springframework.boot:spring-boot-starter-tomcat')
    testCompile('org.springframework.boot:spring-boot-starter-test')
}

repositories {
        mavenCentral()
}
</code></pre>

<p>And here the exception:</p>

<pre><code>* What went wrong:
Could not resolve all dependencies for configuration ':compile'.
&gt; Cannot resolve external dependency org.springframework.boot:spring-boot-starter-web: because no repositories are defined.
  Required by:
      :hello:unspecified
&gt; Cannot resolve external dependency org.json:json:20141113 because no repositories are defined.
  Required by:
      :hello:unspecified
&gt; Cannot resolve external dependency com.jayway.jsonpath:json-path:0.8.1 because no repositories are defined.
  Required by:
      :hello:unspecified
&gt; Cannot resolve external dependency org.jsoup:jsoup:1.8.2 because no repositories are defined.
  Required by:
      :hello:unspecified
&gt; Cannot resolve external dependency org.springframework.social:spring-social-twitter:1.1.0.RELEASE because no repositories are defined.
  Required by:
      :hello:unspecified
&gt; Cannot resolve external dependency org.springframework.social:spring-social-twitter:1.1.0.RELEASE because no repositories are defined.
  Required by:
      :hello:unspecified
&gt; Cannot resolve external dependency org.springframework.social:spring-social-core: because no repositories are defined.
  Required by:
      :hello:unspecified
</code></pre>

<p>I thought the maven repo is enough but it keeps failing I also tried it with <code>jcenter()</code>. Im working on a ubuntu 14.04 VM.</p>

<p><strong>SOLVED:</strong></p>

<p>As Michael said in the comments I had to add a version for the dependency:</p>

<pre><code>compile('org.springframework.boot:spring-boot-starter-web')
compile('org.springframework.boot:spring-boot-starter-web:1.3.3.RELEASE')
</code></pre>