12

In Kotlin, on Intellij using gradle to run the task bootRun for Spring Boot, I get the error that follows:

 BUILD FAILED

 Total time: 0.085 secs
 Could not set unknown property 'addResources' for task ':bootRun' 
 of type org.springframework.boot.gradle.tasks.run.BootRun.

I am using kotlinVersion = '1.1.4-3', springBootVersion = '2.0.0.M3' and my bootrun task looks like the following in my gradle.build

bootRun
    {
         addResources = true
    }

My bootRun works as expected without the adjustments to the bootRun task

1 Answer 1

30

You are using Spring Boot 2.0 where the addResources property no longer exists. Instead, you need to set the sourceResources property to the source set that you want to use. Typically that’s sourceSets.main. This is described in the plugin’s documentation.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.