Question

We're switching build system from Ant to Gradle, mainly to benefit from the "automagic" dependency management. However, I'm having great problems resolving jug 2.0.0.

I've defined it in my build.gradle file like this:

compile 'org.safehaus.jug:jug:2.0.0'

which corresponds to the name of the artifact entry in Maven Central, but when I look in my Gradle cache only the pom.xml file has been downloaded - no jars.

Looking at the artifact details on the Maven Central search page, it seems there are three files; jug-2.0.0.pom, jug-2.0.0-asl.jar and jug-2.0.0-lgpl.jar, where the difference between the latter two is the license (Apache Software License vs LGPL). I've tried adding -asl and -lgpl to the version number in the dependency specification, but it didn't help.

How do I correctly define this dependency, so that the jar files are downloaded and referenced?

Was it helpful?

Solution

The 'lgpl' part of the dependency is the classifier. Try to resolve it using:

dependencies{
    compile 'org.safehaus.jug:jug:2.0.0:lgpl'
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top