Thanks, that did the trick. I'm wondering though how my understanding of the documentation was wrong.
Shouldn't adding @jar have prevented the attempt to retrieve and parse the pom.xml file? I understand that the form you specified is documented under http://www.gradle.org/latest/docs/javadoc/org/gradle/api/artifacts/ModuleDependency.html#addArtifact%28org.gradle.api.artifacts.DependencyArtifact%29 . Was there any way to find this by myself from the user guide and javadoc? -David On Mon, Oct 25, 2010 at 12:15 PM, Adam Murdoch <[email protected]> wrote: > > On 25/10/2010, at 9:04 PM, David Resnick wrote: > > I'm trying to add a dependency to the cglib-nodep-2.1.jar > > I have mavenCentral() defined as a repository and added > dependencies { compile "cglib:cglib-nodep:2.1" } > to build.gradle for a project. > > I get the following error for this: > > Download > http://repo1.maven.org/maven2/cglib/cglib-nodep/2.1/cglib-nodep-2.1.pom > :::: WARNINGS > :::::::::::::::::::::::::::::::::::::::::::::: > > :: UNRESOLVED DEPENDENCIES :: > > :::::::::::::::::::::::::::::::::::::::::::::: > > :: cglib#cglib-nodep;2.1: java.text.ParseException: > inconsistent module descriptor file found in > 'http://repo1.maven.org/maven2/cglib/cglib-nodep/2.1/cglib-nodep-2.1.pom': > bad revision: expected='2.1' found='2.1-nodep'; > > :::::::::::::::::::::::::::::::::::::::::::::: > > This makes sense because the pom file at > http://repo2.maven.org/maven2/cglib/cglib-nodep/2.1/cglib-nodep-2.1.pom > has the wrong version value (2.1-nodep instead of 2.1). > > I added @jar to the dependency, expecting to just get the jar > regardless of the error in the pom file but I still get the same > message. Same results when adding the dependency > compile group: 'cglib', name: 'cglib-nodep', version: '2.1', ext: 'jar' > > I've solved this temporarily by adding the jar to SVN and retrieving > it from there, but I'd appreciate any suggestions on getting this > retrieved from a public repository. > > You can use a client module definition to override the contents of the pom: > dependencies { compile module("cglib:cglib-nodep:2.1") } > This pretty much just declares that cglib-nodep has no dependencies. > For more details about client modules, have a look > at http://www.gradle.org/0.9-rc-1/docs/userguide/dependency_management.html#sub:client_module_dependencies > > > -- > Adam Murdoch > Gradle Developer > http://www.gradle.org > CTO, Gradle Inc. - Gradle Training, Support, Consulting > http://www.gradle.biz > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
