spring boot - Trouble getting started with SpringBoot and Gradle -


i new java, gradle , spring.

i setup new project following gradle script:

buildscript {     repositories {         maven { url "http://repo.spring.io/snapshot" }         maven { url "http://repo.spring.io/milestone" }     }      dependencies {         classpath("org.springframework.boot:spring-boot-gradle-plugin:1.3.0.build-snapshot")     } }  apply plugin: 'java' apply plugin: 'spring-boot'  repositories {     maven { url "http://repo.spring.io/snapshot" }     maven { url "http://repo.spring.io/milestone" } }  dependencies {     compile("org.springframework.boot:spring-boot-starter-web")     testcompile("org.springframework.boot:spring-boot-starter-test") } 

when trying build above script, following errors:

e:\projects\springapptutorial>gradlew  failure: build failed exception.  * went wrong: problem occurred configuring root project 'springapptutorial'. > not resolve dependencies configuration ':classpath'.    > not resolve org.springframework.boot:spring-boot-gradle-plugin:1.3.0.build-snapshot.     required by:         :springapptutorial:unspecified      > not resolve org.springframework.boot:spring-boot-gradle-plugin:1.3.0.build-snapshot.         > not parse pom http://repo.spring.io/snapshot/org/springframework/boot/spring-boot-gradle-plugin/1.3.0.build-snapshot/spring-boot-gradle-plugin-1.3.0.build-20150531.081700-179.pom            > not resolve org.springframework.boot:spring-boot-tools:1.3.0.build-snapshot.               > not resolve org.springframework.boot:spring-boot-tools:1.3.0.build-snapshot.                  > not parse pom http://repo.spring.io/snapshot/org/springframework/boot/spring-boot-tools/1.3.0.build-snapshot/spring-boot-tools-1.3.0.build-20150531.081700-180.pom                     > not resolve org.springframework.boot:spring-boot-parent:1.3.0.build-snapshot.                        > not resolve org.springframework.boot:spring-boot-parent:1.3.0.build-snapshot.                           > not parse pom http://repo.spring.io/snapshot/org/springframework/boot/spring-boot-parent/1.3.0.build-snapshot/spring-boot-parent-1.3.0.build-20150531.081700-180.pom                              > not resolve org.springframework.boot:spring-boot-dependencies:1.3.0.build-snapshot.                                 > not resolve org.springframework.boot:spring-boot-dependencies:1.3.0.build-snapshot.                                    > not parse pom http://repo.spring.io/snapshot/org/springframework/boot/spring-boot-dependencies/1.3.0.build-snapshot/spring-boot-dependencies-1.3.0.build-20150531.081700-181.pom                                       > not find org.springframework.data:spring-data-releasetrain:fowler-release.                                         searched in following locations:                                             http://repo.spring.io/snapshot/org/springframework/data/spring-data-releasetrain/fowler-release/spring-data-releasetrain-fowler-release.pom                                             http://repo.spring.io/snapshot/org/springframework/data/spring-data-releasetrain/fowler-release/spring-data-releasetrain-fowler-release.jar                                             http://repo.spring.io/milestone/org/springframework/data/spring-data-releasetrain/fowler-release/spring-data-releasetrain-fowler-release.pom                                             http://repo.spring.io/milestone/org/springframework/data/spring-data-releasetrain/fowler-release/spring-data-releasetrain-fowler-release.jar  * try: run --stacktrace option stack trace. run --info or --debug option more log output.  build failed  total time: 15.726 secs  e:\projects\springapptutorial> 

what doing wrong here?

you should using release version of spring-boot gradle plugin - script using development snapshot version string of kind.

i.e. try

dependencies {     classpath("org.springframework.boot:spring-boot-gradle-plugin:1.2.3.release") } 

(from http://docs.spring.io/spring-boot/docs/current/reference/html/build-tool-plugins-gradle-plugin.html)

assuming works, should able rid of section also:

repositories {    maven { url "http://repo.spring.io/snapshot" }    maven { url "http://repo.spring.io/milestone" } } 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -