In maven I can specify a "type" for dependency resolution. I am trying to pull down a tests.jar
. How can I do this using Gradle?
I have tried using the Gradle Dependency below, but this does not pull down test.jar
.
testCompile(group: 'org.apache.hbase', name: 'hbase', version: '0.94.2', type: 'test-jar')
Maven Dependency:
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase</artifactId>
<version>0.94.2</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
details: Gradle 1.7
I am trying to pull down "hbase-0.94.2-tests.jar" from Maven Central
The Jar is created under the $project/build/libs/ folder.
How to generate a Test Report. Gradle generates a Test Report automatically when it runs the entire Test Suite. To do the same, run ./gradlew test (or gradlew. bat test from Windows), or run the test Gradle task from your IDE.
Furthermore, Gradle is compatible with IVY Metadata, allowing you to define custom rules to specify a version for a dynamic dependency, and resolving version conflicts. These are not available on Maven.
Gradle doesn't have a direct equivalent of Maven's <type>
, but classifier: 'tests'
should work here (instead of type: ...
).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With