Gradle Build Error

My build failed due to this error:

There was a problem evaluating the project ': DBSupport'. > Could not find method provided by Compile () for arguments [project ': Core: Platform'] on project ': DBSupport'.

Any idea what that means?

description = 'DBSupport main component of DBSupportTool'
dependencies {
providedCompile project(':Core:Platform')
providedCompile project(':Core:Verification')
providedCompile project(':DBSupportWeb')
providedCompile project(':DBSupportEJB')
  compile(group: 'commons-lang', name: 'commons-lang', version:'1.0.1') {
   /* This dependency was originally in the Maven provided scope, but the project was not of type war.
   This behavior is not yet supported by Gradle, so this dependency has been converted to a compile dependency.
   Please review and delete this closure when resolved. */
}
  compile(group: 'commons-logging', name: 'commons-logging', version:'1.0.4') {
   /* This dependency was originally in the Maven provided scope, but the project was not of type war.
   This behavior is not yet supported by Gradle, so this dependency has been converted to a compile dependency.
   Please review and delete this closure when resolved. */
}
  compile(group: 'javax', name: 'j2ee', version:'1.0') {
   /* This dependency was originally in the Maven provided scope, but the project was not of type war.
   This behavior is not yet supported by Gradle, so this dependency has been converted to a compile dependency.
   Please review and delete this closure when resolved. */
}
+4
source share
2 answers

I assume that in fact these modules should be treated as provided (for example, there should not be packages in the WAR archive). If not just change it to compile.

Configuration

providedCompileNot available in Gradle out of the box. If this is a web module, you can simply add / apply a military plugin:

apply plugin: 'war'

If you cannot add this configuration manually:

configurations {
    providedCompile
}

dependencies {
    providedCompile project(':Core:Platform')
    ...
}

sourceSets.main.compileClasspath += configurations.providedCompile
sourceSets.test.compileClasspath += configurations.providedCompile
sourceSets.test.runtimeClasspath += configurations.providedCompile

propdeps-plugin, , .

+7

, Maven, :

project(':webgui') {
  apply plugin: 'war'
  dependencies {
    compile project (':domain')

    providedCompile 'javax:javaee-api:6.0'
  }
}

(), :

dependencies {
    compile module(":compile:1.0") {
        dependency ":compile-transitive-1.0@jar"
        dependency ":providedCompile-transitive:1.0@jar"
    }
    providedCompile "javax.servlet:servlet-api:2.5"
    providedCompile module(":providedCompile:1.0") {
        dependency ":providedCompile-transitive:1.0@jar"
    }
    runtime ":runtime:1.0"
    providedRuntime ":providedRuntime:1.0@jar"
    testCompile "junit:junit:4.11"
    moreLibs ":otherLib:1.0"
}
0

All Articles