Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle: configuration runtime declares a dependency on configuration default which is not declared in the module descriptor for

Can you tell me why when I run gradle I get this error:

Error:Module version trestGradle:trestGradle:1.0-SNAPSHOT, 
configuration 'runtime' declares a dependency on 
configuration 'default' which is not declared in the module 
descriptor for it.develop:myLib:1.0.0"

What is needed to be declared on the ivy.xml (module descriptor)?

  • MyLib is on an internal ivy repository

  • I checked:credentials, ivy url and the pattern

build.gradle:

group 'trestGrad'
version '1.0-SNAPSHOT'

apply plugin: 'java'

sourceCompatibility = 1.5

configurations {
    compile
}

repositories {
    ivy {
        url = 'http://example.com/artifactory/cst'
        credentials {
            username = "user"
            password = "pass123"
        }
        layout('pattern') {
            // Pattern to resolve Ivy descriptor files.
            ivy '[organization]/[module]/[revision]/[type]s/ivy.xml'
            // Pattern to resolve files.
            artifact '[organization]/[module]/[revision]/[type]s/[module].[ext]'
        }
    }
}

dependencies {
    compile "it.develop:myLib:1.0.0"
}
like image 626
dariobronx Avatar asked Feb 29 '16 16:02

dariobronx


1 Answers

See here.

You need to specify the configuration for your dependency. Failing which ivy assumes default configuration and hence your error message.

like image 66
RaGe Avatar answered Sep 29 '22 22:09

RaGe