Using gradle milestone 5, I've used the docs 
http://www.gradle.org/dependency_management#sub:maven_repo here  to attempt
reading from an internal nexus repository: 


repositories {
  maven {
    name "Nexus Repo"
    credentials {
      username = nexusUser
      password = nexusPassword
    }
    url "https://${nexusHost}:${nexusPort}/nexus/content/groups/public/";
  }
}

  
The error I get when running gradle -i:


A problem occurred evaluating script.
Cause: Could not find method credentials() for arguments
[apptio_6qfre2ml4tkhadj25c78cup9vs$_run_closure1_closure3_closure4@5e6bbb36]
on
org.gradle.api.internal.artifacts.repositories.DefaultMavenArtifactRepository_Decorated@500b2


I've looked at the documentation for 
http://gradle.org/current/docs/javadoc/org/gradle/api/artifacts/repositories/MavenArtifactRepository.html
MavenArtifactRepository . The only thing I can see that might be going wrong
is that, according to a snippet in 
http://gradle.org/current/docs/javadoc/org/gradle/api/artifacts/repositories/AuthenticationSupported.html#credentials(groovy.lang.Closure)
AuthenticationSupported  interface, /username/  should actually be
/userName/.  I've tried both without success.


gradle -v:

------------------------------------------------------------
Gradle 1.0-milestone-5
------------------------------------------------------------

Gradle build time: Monday, October 24, 2011 8:56:08 PM PDT
Groovy: 1.7.10
Ant: Apache Ant(TM) version 1.8.2 compiled on December 20 2010
Ivy: 2.2.0
JVM: 1.6.0_26 (Sun Microsystems Inc. 20.1-b02)
OS: Linux 2.6.38-8-generic amd64



--
View this message in context: 
http://gradle.1045684.n5.nabble.com/Maven-repository-with-credentials-as-documented-doesn-t-evaluate-tp5005885p5005885.html
Sent from the gradle-user mailing list archive at Nabble.com.

Reply via email to