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

Juan Carlos Garcia Bazan
Juan Carlos Garcia Bazan
8,528 Points

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
Courses Plus Student 18,295 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 :/

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!

Gerard Streelman
Gerard Streelman
5,680 Points

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
Juan Carlos Garcia Bazan
Juan Carlos Garcia Bazan
8,528 Points

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.