I'm new to spring and trying to use velocity with spring boot.
Here is my build.gradle
repositories {
mavenCentral()
}
plugins {
id 'org.springframework.boot' version '2.0.4.RELEASE'
}
apply plugin: 'java'
apply plugin: 'eclipse-wtp'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'war'
dependencies {
compile('org.springframework.boot:spring-boot-starter-web')
compile('org.springframework.boot:spring-boot-starter-velocity')
runtime('org.springframework.boot:spring-boot-devtools')
providedRuntime('org.springframework.boot:spring-boot-starter-tomcat')
testCompile('org.springframework.boot:spring-boot-starter-test')
}
When I sync by ./gradlew bootRun
, it returned error as below.
> Task :compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all files for configuration ':compileClasspath'.
> Could not find org.springframework.boot:spring-boot-starter-velocity:.
Spring Boot 2.0 depends on Spring Framework 5.0. Which dropped support for Velocity. Hence in Spring Boot 2 there is no more support for Velocity. If you really need Velocity you would have to stick with Spring Boot 1.5. If you can move to something like Freemarker or Mustache you are probably better of using that.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.18:verify (default) on project spring-boot-cli: There are test failures. [ERROR] Please refer to /Users/davidlaxer/spring-boot/spring-boot-cli/target/failsafe-reports for the individual test results.
[INFO] Spring Boot Jetty Starter .......................... SUCCESS [ 3.551 s] [INFO] Spring Boot JOOQ Starter ........................... SUCCESS [ 4.652 s] [INFO] Spring Boot Atomikos JTA Starter ................... SUCCESS [ 4.487 s] [INFO] Spring Boot Bitronix JTA Starter ................... SUCCESS [ 4.620 s]
Could not resolve org.springframework.boot:spring-boot-gradle-plugin:1.2.8.BUILD-SNAPSHOT. Tooling API is using target Gradle version: 1.12.
Most probably you forgot to include Spring's dependency management plugin.
apply plugin: 'io.spring.dependency-management'
Also make sure that you have specified the Spring Boot version to use:
plugins {
id 'org.springframework.boot' version '2.0.4.RELEASE'
}
See https://docs.spring.io/spring-boot/docs/2.0.4.RELEASE/gradle-plugin/reference/html/ for more information
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With