[GRADLE-1999] Jars from additional maven repo not added to build classpath Created: 12/Dec/11  Updated: 04/Jan/13  Resolved: 13/Dec/11

Status: Resolved
Project: Gradle
Affects Version/s: 1.0-milestone-6
Fix Version/s: 1.0-milestone-7

Type: Bug
Reporter: Kurt Harriger Assignee: Unassigned
Resolution: Fixed Votes: 0

Issue Links:
Duplicate
Duplicated by GRADLE-1975 Default artifact is not resolved for ... Resolved

 Description   

Having difficulty getting project to build with a dependency on clodera's hadoop-core. I have created a github repo here that reproduces the issue. https://github.com/kurtharriger/gradle_milestone_6_maven_bug. Appears to be an issue with the new maven repository dsl, the dependency resolves with gradle dependencies but is not added to the classpath when compiled.

gradle M6 build:

apply plugin: 'java'
apply plugin: 'maven'

repositories {
mavenCentral()
maven

{ name "Cloudera" url "https://repository.cloudera.com/content/repositories/releases/" }

}

dependencies

{ compile group: 'org.apache.hadoop', name: 'hadoop-core', version: '0.20.2-cdh3u0' }

> gradle build
:compileJava
[ant:javac] /Users/kurtharriger/code/gradle-bug/src/main/java/Application.java:1: package org.apache.hadoop.conf does not exist
[ant:javac] import org.apache.hadoop.conf.Configuration;
[ant:javac] ^
[ant:javac] 1 error

This was working in milestone 3, with repo defined something like the following, but in M6 we get now get a 401 error so we updated to the above syntax which now fails even against the public repo shown above.
gradle M3 build:
...
repositories

{ org.apache.ivy.util.url.CredentialsStore.INSTANCE.addCredentials(...) mavenRepo urls: "http://privatereporurl..." }

 Comments   
Comment by Adam Murdoch [ 12/Dec/11 ]

I suspect this is GRADLE-1975. Can you try a recent milestone-7 snapshot: http://repo.gradle.org/gradle/distributions-snapshots/gradle-1.0-milestone-7-20111209194225+0100-bin.zip ?

Comment by Kurt Harriger [ 13/Dec/11 ]

Confirmed. My project is building successfully with M7 snapshot.

Generated at Wed Jun 30 12:10:02 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.