I want to include Apache commons-math 3.0 in my (Grails) project. So I put the following in my dependencies:
compile "org.apache.commons:commons-math3:3.0"
It's in the central maven repository, see http://central.maven.org/maven2/org/apache/commons/commons-math3/3.0/
Gradle gives me the error
::::::::::::::::::::::::::::::::::::::::::::::
:: FAILED DOWNLOADS ::
:: ^ see resolution messages for details ^ ::
::::::::::::::::::::::::::::::::::::::::::::::
:: org.apache.commons#commons-math3;3.0!commons-math3.zip
::::::::::::::::::::::::::::::::::::::::::::::
and includes among others:
==== mavenCentral: tried
http://repo1.maven.org/maven2/org/apache/commons/commons-math3/3.0/commons-math3-3.0.zip
So it appears to be looking in the right place, but why is it looking for the zip instead of the jar? The Gradle doco says that jar is the default thing to search for. I even tried using "artifact only notation" with the @ sign to get the jar (as described at http://gradle.org/docs/current/userguide/dependency_management.html) but it still only searches for the zip.
If you are using Grails' BuildConfig.groovy for resolution, there are two dependency resolution blocks, a dependencies block and a plugins block. Make sure your declaration is inside the dependencies block. If it is accidentally placed in the plugins block it will look for a packaged plugin, which are packaged as a .zip file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With