跑步"战争"不包括依赖的intellij项目

时间:2016-06-28 09:38:53

标签: java tomcat intellij-idea war

我有一个包含两个模块的intellij项目:

web-services(我的API),library-services(业务逻辑)。

build.gradle of web-serivces:

apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'maven-publish'
apply from: ext.gradleDir + '/common.gradle'
apply from: ext.gradleDir + '/integration_test.gradle'

sourceCompatibility = 1.8
targetCompatibility = 1.8
project.version = '1.0.' + getBuildNumber()


dependencies {
    compile project(':library-services')
    compile('com.waze.automation:common:1.0.80')

    compile('com.sun.jersey:jersey-bundle:1.19')
    compile('com.sun.jersey:jersey-json:1.19')
    compile group:  'org.codehaus.jackson', name:'jackson-jaxrs', version: '1.1.1'

    compile('com.google.guava:guava:18.0')

    testCompile group: 'junit', name: 'junit', version: '4.11'
    testCompile('org.hamcrest:hamcrest-all:1.3')
    testCompile('org.mockito:mockito-all:1.9.5')

}

war {
    from 'src/main' // include source files in war
}

我运行这个gradle命令:

~/workspaceQa/MobileAutomationWebService/web-services ⮀
❯ ./gradlew war   

但是在创造的战争中,我没有看到图书馆服务的类别

我的服务抛出ClassNoFound例外。

这是我日志的一部分。我该如何解决这个问题?

12:10:28.081 [INFO] [org.gradle.BuildLogger] Tasks to be executed: [task ':library-services:compileJava', task ':library-services:processResources', task ':library-services:verifyDependencies', task ':library-services:classes', task ':library-services:setProjectVersion', task ':library-services:jar', task ':web-services:compileJava', task ':web-services:processResources', task ':web-services:verifyDependencies', task ':web-services:classes', task ':web-services:war']

1 个答案:

答案 0 :(得分:-1)

删除此行后,问题解决了:

gradle.properties文件:

#org.gradle.parallel=true