maven - How to understand declaring dependency with `configuration` in gradle? -


in gradle file, need add dependency of com.google.guava:guava:16.0, can write:

compile group: 'com.google.guava', name: 'guava', version: '16.0' 

without configuration.

or use configuration default or compile or runtime or test:

compile configuration: 'default', group: 'com.google.guava', name: 'guava', version: '16.0' compile configuration: 'compile', group: 'com.google.guava', name: 'guava', version: '16.0' compile configuration: 'runtime', group: 'com.google.guava', name: 'guava', version: '16.0'  compile configuration: 'test', group: 'com.google.guava', name: 'guava', version: '16.0'  

there no error when run gradle compilejava.

but if try other values, testcompile or any-other-value, report:

failure: build failed exception.

* went wrong: not resolve dependencies configuration ':compile'. > module version :gradle-test:unspecified, configuration 'compile'   declares dependency on configuration 'testcompile'   not declared in module descriptor com.google.guava:guava:16.0 

where can find module descriptor file , configurations declares?

i found https://repo1.maven.org/maven2/com/google/guava/guava/16.0/guava-16.0.pom, module descriptor? can't find default/compile/... configurations.

maven not support multiple configurations (ivy does) , yes pom file module descriptor in case. using notation without configuration should fine. also, couldn't reproduce failing testcompilejava task reported


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -