Something that came out recently on our project (where we started using Gradle 
as our build/release tool).

We are using two repositories for project dependencies. One for internal stuff 
and other for all the third party libraries.
We defined those repositories in order:
Meven Central Repo
Internal Repo
When resolving some of the Internal dependencies we hit a wall. Our jar was 
there but all it's third party dependencies were not resolved. Looking into 
GRADLE_USER_HOME/cache/com.internal.dependency it turned out that cached IVY 
file had no entries.

I removed the cached files and re-run gradle with --debug option.

As it turns out this events are happening:
Ivy resolver tries to get POM file from the first repository. 
As there is no POM file (cause it is Maven Central Repo) it tries to get JAR 
from the same Repository
As there is no JAR there it tries to get the file from second Repository.
It gets the JAR from second repo.
It ignores pom and creates cache IVY file with no dependencies in it.

So, obviously it is not great and it's a problem.
Is it a Gradle issue or Ivy issue?

We have solved this by changing the order of repositories but obviously you 
know this is far from IDEAL ?! :)

Cheers, Greg

--
Grzegorz Gigon
http://greggigon.com
http://www.linkedin.com/in/greggigon 
Twitter: gregorygigon

"You see, wire telegraph is a kind of a very, very long cat. You pull his tail 
in New York and his head is meowing in Los Angeles. Do you understand this? And 
radio operates exactly the same way: you send signals here, they receive them 
there. The only difference is that there is no cat."
     Albert Einstein, when asked to describe radio

Reply via email to