gradle - Provided scope not working in eclipse -
gradle 2.2.1
i trying include dependencies jar file ship other users. want them provide own versions of dependencies , trying emulate provided
scope maven.
i have followed tutorial here. able build project command line (while still getting classes not found errors in eclipse) until eclipse integration part. post says add eclipse.classpath.plusconfigurations += configurations.provided
getting could not find property 'provided' on configuration container
apply plugin: 'java' apply plugin: 'eclipse' // causes error //eclipse.classpath.plusconfigurations += configurations.provided sourcecompatibility = 1.8 version = '1.0' jar { manifest { attributes 'implementation-title': '...', 'implementation-version': version } } repositories { mavencentral() } configurations { provided } sourcesets { main.compileclasspath += configurations.provided test.compileclasspath += configurations.provided test.runtimeclasspath += configurations.provided } dependencies { testcompile group: 'junit', name: 'junit', version: '4.+' //jackson provided 'com.fasterxml.jackson.core:jackson-core:2.6.2' provided 'com.fasterxml.jackson.core:jackson-annotations:2.6.2' provided 'com.fasterxml.jackson.core:jackson-databind:2.6.2' } test { systemproperties 'property': 'value' } uploadarchives { repositories { flatdir { dirs 'repos' } } }
fixed it.
eclipse.classpath.plusconfigurations += configurations.provided
should array
eclipse.classpath.plusconfigurations += [configurations.provided]
Comments
Post a Comment