这是我的第一个gradle项目.我使用
Buildship eclipse plugin作为gradle.在我的build.gradle文件中,我应用了以下插件 –
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'war'
apply plugin: 'com.bmuschko.tomcat'
所有相关的依赖项定义为编译如下 –
.
.
compile ("org.hibernate:hibernate-entitymanager:${hibernateVer}")
compile ("org.hibernate:hibernate-core:${hibernateVer}")
compile ("org.hibernate:hibernate-validator:${hibernateValVer}")
compile ("org.slf4j:slf4j-api:${slf4jVer}")
compile ("org.slf4j:slf4j-log4j12:${slf4jVer}")
.
.
该项目也使用tomcatRun命令成功构建和运行.但是eclipse在我的java文件导入中显示编译错误,说依赖关系无法解决.
我尝试了Project-> Clean然后刷新,但仍然卡住了.如何清除这些编译错误?提前致谢.