Random I know: Can't Find commons-codec

When running Gradle on Debian 2.30.2, I am unable to build my jar file because Gradle can’t find commons-codec:commons-codec:1.4:jar. Things work fine on a Mac, and Maven is able to find commons-codec on Debian.

Just curious about what might be causing this peculiar issue.

Thanks.

Where are you trying to get it from? ‘mavenCentral()’?

Yes. Here is my closure:

repositories {

mavenLocal()

mavenCentral()

maven {

url “http://repo.springsource.org/release

} }

We’re getting reports of this from some other users, and it’s not unique to Gradle in those cases.

Can you download the dependency with something from the command line?

As I mentioned, I am able to fetch it with Maven on Debian. Do you want me to try something else?

Yes, something like ‘curl’ or ‘wget’.

wget did work for me, as Maven did as well. Sorry I can’t give you any more diagnostic information.

Thanks.

Does Gradle work as well by now, maybe with ‘–refresh-dependencies’? We are seeing these problems come and go, and they don’t seem to depend on the method of access.

Just ran with --refresh-dependencies, and things built just fine. Can’t explain it, but I guess I won’t worry about it until it pops up again. Thanks.

The explanation is that the Maven Central problems are temporary. Starting from Gradle 1.3, failed artifact lookups will no longer be cached across invocations of Gradle, so there should be much less need for ‘–refresh-dependencies’.