【发布时间】:2014-01-11 10:48:06
【问题描述】:
我们正在尝试设置多项目构建。
我们有 2 个项目:
1) 播放器管理器 2) 共享
当我们运行 gradle.test 任务时,我们的项目编译并且所有测试都成功
问题是当我们尝试从 eclipse 中在 tomcat 上运行项目时,我们得到共享项目中所有文件的类未找到错误。
这是我们的 gradle.build 文件:
PlayerManager(根)
=======================
apply plugin: 'war'
apply plugin: 'jetty'
apply plugin: 'eclipse-wtp'
apply plugin: 'eclipse'
apply from: 'dependencies.gradle'
apply from: 'xmlHandler.gradle'
apply plugin: 'base'
dependsOn(":NGShared:NGShared")
task wrapper(type: Wrapper) {
gradleVersion = '1.9'
}
repositories {
mavenCentral()
}
dependencies {
providedCompile 'javax.servlet:servlet-api:2.5'
compile 'org.springframework:spring-webmvc:3.2.2.RELEASE'
runtime 'javax.servlet:jstl:1.1.2'
}
/* Change context path (base url). otherwise defaults to name of project */
jettyRunWar.contextPath = ''
task cleanAndBuild(dependsOn: ['clean', 'assemble'])
assemble.mustRunAfter clean
tasks.withType(Test) {
testLogging {
events 'passed'
}
}
task testSanity(type: Test, dependsOn: testClasses) {
exclude '*/TimeBaseTest*'
}
共享(子项目)
=======================
apply plugin: 'java'
apply plugin: 'eclipse'
apply from: 'dependencies.gradle'
task wrapper(type: Wrapper) {
gradleVersion = '1.9'
}
settings.gradle
include ":NGShared:NGShared"
======================================================
Our path for the project is:
/NGPlayerManager/
/NGPlayerManager/NGShared/NGShared
有什么想法吗?
谢谢
【问题讨论】: