一、出現的異常
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':spring-webmvc-tiles3:eclipseClasspath'.
> Could not resolve all dependencies for configuration 'detachedConfiguration2'.
> Module version org.springframework:spring-webmvc-tiles3:4.0.0.M3, configura
tion 'detachedConfiguration2' declares a dependency on configuration 'runtimeMer
ge' which is not declared in the module descriptor for org.springframework:sprin
g-web:4.0.0.M3
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
BUILD FAILED
二、解決辦法
1、在spring主目錄下找到build.gradle檔案,用ultraEdit打開;
2、找到project("spring-webmvc-tiles3"),并在結尾處添加如下部分并儲存。
eclipseClasspath {
downloadSources = false; // required for eclipseClasspath to work
}
3、在cmd指令行中,重新運作指令gradle eclipse -x:eclipse.