Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java

Daniel Silva
Daniel Silva
11,209 Points

Issues with gradle build on the debugging existing java project

I receive the following error when running gradle on this project:

  • What went wrong: A problem occurred evaluating root project 'flashy'. > Failed to apply plugin [class 'io.spring.gradle.dependencymanagement.DependencyManagementPlugin'] > Could not create task ':dependencyManagement'. > Could not create task of type 'DependencyManagementReportTask'.

Someone please help.

6 Answers

After spending hours troubleshooting and looking up online, I was able to compile it.

You have you change your classpath dependency and the plugin you apply:

'org.springframework.boot:spring-boot-gradle-plugin:1.5.3.RELEASE'
apply plugin: 'org.springframework.boot'

Because spring-boot is already deprecated.

This goes to show that this lesson is incredibly outdated. Very disappointing.

Erick Luna
Erick Luna
20,282 Points

It works, thanks Juan Carlos Garcia Bazan, and yes, the course needs to be updated. Also, it will be good if some of the Teamtreehouse staff members respond to these questions :/

Ronicca Park Thank you for providing this solution. I ran into the same issue and this did the trick. It's a shame that Treehouse still hasn't responded to this thread years later.

Luka Belani
Luka Belani
10,673 Points

Hey, have you figured it out? I'm getting B6 error on the same project.

Daniel Silva
Daniel Silva
11,209 Points

I couldn't... So just watched the tutorial without following along.

Luka Belani
Luka Belani
10,673 Points

Same here... Thanks for the reply!

I have not been able to do any of the Gradle assignments. :( Very disappointed!

Luka Belani
Luka Belani
10,673 Points

Hey Gerard, I think it was an issue with Gradle versions. so I'd manually change to current version in ./gradle/wrapper/gradle-wrapper.properties under distributionUrl and it'd work for me. Give it a try.

#Wed Apr 05 21:03:46 PDT 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip

I tried the work around of manually changing the distributionURL in the grade-wrapper.properties file but unfortunately it did not work for me. It still points me to the line "apply plugin: 'spring-boot'" and gives me the same error as the original post in this thread. I even tried different versions of the Gradle distribution...to no avail.

I feel like this is something the Treehouse admins should jump on since it's clearly stopping multiple people from progressing.