我从Maven构建Spring项目迁移到使用Gradle构建它之后,我有奇怪的空验证错误。'Gradle eclipse'后Spring项目中的空验证消息
我注意到路径src/main/webapp/WEB-INF/classes
是在Web App Libraries
构建路径组,但使用Maven-import配置它只是在src目录中。
使用gradle cleanEclipse
,清新和结算项目,也没有删除所有.metadata
,.settings
,bin
,.classpath
,.project
目录没有帮助。
除了该WAR文件构建好。
配置:
//----------------------------------------------------------------------------
// SERVER'S TASKS' CONFIGURATION
//----------------------------------------------------------------------------
configure(serverProjects) {
apply plugin : 'war'
apply plugin : 'eclipse-wtp'
sourceCompatibility = 1.7
targetCompatibility = 1.7
}
project(':Server') {
war {
destinationDir serverDir
}
}
...
//----------------------------------------------------------------------------
// SERVER'S PROJECTS' CONFIGURATION
//----------------------------------------------------------------------------
project(':Server') {
eclipse {
project {
natures "com.springsource.sts.gradle.core.nature"
}
classpath {
containers "com.springsource.sts.gradle.classpathcontainer"
}
}
}
...
//----------------------------------------------------------------------------
// SERVER'S DEPENDENCIES' CONFIGURATION
//----------------------------------------------------------------------------
configure(serverProjects) {
repositories {
mavenCentral()
maven { url 'https://repository.jboss.org/nexus/content/groups/public' }
}
}
project(':Server') {
dependencies {
...
}
}
我能做些什么,以确保项目将被导入到Eclipse中没有这个问题?
编辑:
我看到的唯一信息是这一个:empty validation error http://img689.imageshack.us/img689/2682/vaildationerror.png
至于我的行家注意到,项目生成没有任何错误,只是警告少量。现在我看到简单的<form:errors path="field"/>
有关“List is generic”的呼喊。
EDIT2:
我设法通过改变项目配置摆脱一些问题:
//----------------------------------------------------------------------------
// SERVER'S PROJECTS' CONFIGURATION
//----------------------------------------------------------------------------
project(':Server') {
eclipse {
project {
natures "org.springframework.ide.eclipse.core.springnature"
buildCommand "org.springframework.ide.eclipse.core.springbuilder"
}
}
}
但主要问题 - 没有什么是有关信息验证错误 - 仍遗迹。
你能更详细地描述问题是什么吗? Eclipse错误日志中是否有任何有用的信息? – 2013-03-13 18:41:49
我在问题描述中添加了一些细节。 – 2013-03-13 22:06:40