Reputation: 655
I use gradle to download the ivy jars, gradle script like this:
repositories {
ivy {
artifactPattern "http://mycompany/libs/[organization]/[module]/[revision]/[artifact].[ext]"
ivyPattern "http://mycompany/libs/[organization]/[module]/[revision]/ivy.xml"
}
}
dependencies {
compile (
"org.slf4j:slf4j-api:1.6.4"
)
}
and My ivy config like this:
<dependency org="org.slf4j" name="slf4j-api" rev="1.6.4">
<artifact name="slf4j-api-1.6.4" type="jar"/>
</dependency>
the jar name on the ivy respository is :
http://my.company/his-libs/org.slf4j/slf4j-api/1.6.4/slf4j-api-1.6.4.jar
but when I download them use gradle, the jar'name is :
D:\Users\myname.gradle\caches\artifacts-23\filestore\org.slf4j\slf4j-api\1.6.4\jar\bff73780230e6559b63134bbc2056c312eabb849\slf4j-api-1.6.4-1.6.4.jar
increase "-1.6.4" in the jar name. Can anybody help? Thanks.
Upvotes: 1
Views: 737
Reputation: 123996
Your Ivy config has the version number in the artifact name. Gradle's dependency cache isn't Ivy based and will always construct the file name from the artifact name and version. You can't change this but can change the file name when, say, copying or packaging the artifact file.
Upvotes: 2