Adding a jar dependency (jug)


(Igor Popov) #1

I’m trying to add this library to my build script: http://repo1.maven.org/maven2/org/safehaus/jug/jug/2.0.0/

The problem is that the pom file name doesn’t match the jar name.

This is what I have tried: first try

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

second try

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

third try

compile 'org.safehaus.jug:jug:2.0.0-lgpl@jar'

fourth try

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

I don’t get it… what should I use? Everything I’ve tried results either in “NullPointerException” or “Could not find org.safehaus.jug:jug:2.0.0-lgpl”.

Note: I’m not sure if it matters, but I use gradle 1.6


(Artur Kotyrba) #2

lgpl is Maven classifier, so you should use:

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

See Gradle documentation for more details.


(Igor Popov) #3

Thank you for your help! :slight_smile:

I didn’t know about maven classifiers… reading about them now.