无法应用插件[class' io.spring.gradle.dependencymanagement.DependencyManagementPlugin']?

时间:2017-07-11 15:22:17

标签: java spring gradle plugins dependencies

我正在开发一个项目,我尝试运行gradle包装器,但构建失败,我收到以下错误:

:gulpConstantDev FAILED

FAILURE: Build failed with an exception.

 What went wrong:
Execution failed for task :gulpConstantDev.
 gulp not installed in node_modules, please first run gradle installGulp

然后我运行了grade installGulp,但是构建再次失败,我收到了以下错误:

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

我是一名新手程序员,而且我是Stack Overflow的新手。在此先感谢您的帮助!

1 个答案:

答案 0 :(得分:1)

我觉得有点晚了。我今晚面临同样的问题。我通过添加一个依赖项“io.spring.gradle:dependency-management-plugin”来解决它。 例如我有:

  ext {
        spring_version = "4.2.5.RELEASE"
        springboot_version = "1.3.3.RELEASE"
        spring_dependency_management_version = "0.6.1.RELEASE"
    }

 dependencies {
        classpath("io.spring.gradle:dependency-management-plugin:${spring_dependency_management_version}")
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springboot_version}")
    }

希望能帮到你。