Few days ago I got into trouble when building project using
Gradle<http://www.gradle.org/>
.

Created deployables (fat jars) looked fine when I build it on my local
machine, however when I build on remote box (*Linux*) I was missing some
dependencies. The build scripts were exactly the same. The only difference
was: the remote box didn't have local Maven <http://maven.apache.org/>
repository.
This shouldn't cause any problems as remote repository should be the same.

However :) on the project that we are working, the remote repository is
managed by team and it is in our internal network. It also*doesn't* *proxy*
 to *Maven* repository.

Some of the *artifacts* that got uploaded to that repository were missing *
pom* files. When *Gradle* (via Ivy <http://ant.apache.org/ivy/>) was
resolving the dependencies it created pom file on the fly with *no* *
dependencies* on other artifacts.

When I discovered the problem I uploaded missing pom files. It didn't fix
the problem though. As it turns out, *Ivy* cached the self created pom files
in *USER_HOME/.gradle/cache* folder. Running gradle with *-C rebuild* option
doesn't solve the problem as this option only clears the cached *Gradle*
 scripts.

When I deleted the folder *USER_HOME/.gradle/cache*, *Gradle* got all the
dependencies resolved properly!

I was using *Gradle milestone 3*.

I hope you won't get stuck on the similar problem as I did. Maintain you
repository or use public.

Greg
Ps. Blogged in here:
http://greggigon.com/2011/05/25/brocken-maven-repository-gradle-dependencies/
-- 
Greg Gigon
http://greggigon.com
http://www.linkedin.com/in/greggigon
Twitter: @gregorygigon <http://twitter.com/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