Gradle build cannot find pom files in some Nexus repositories


(awarrenlove) #1

I have a Nexus repository set up, and I am trying to use this as the Maven repository in Gradle. However, when I try to set the Nexus proxy repositories, Gradle could not resolve the dependencies, saying only "could not GET “<repo_url>/-.pom.” I checked the location it is looking at in a browser, and I can access the pom that way. Is it possible there is some setting I am missing that will fix this problem?

EDIT: One more thing that may be relevant: my nexus server is accessed through https

The only code I think may be helpful is this:

repositories {
 maven {
  url "$nexusUrl/central/"
  credentials {
   username nexusUser
   password nexusPassword
  }
 }
}

For reference, here is the output of gradle -v:

------------------------------------------------------------ Gradle 1.0-rc-3 ------------------------------------------------------------

Gradle build time: Sunday, April 29, 2012 11:51:52 PM UTC Groovy: 1.8.6 Ant: Apache Ant™ version 1.8.2 compiled on December 20 2010 Ivy: 2.2.0 JVM: 1.6.0 (IBM Corporation 2.4) OS: Windows 7 6.1 build 7601 Service Pack 1 x86


(Peter Niederwieser) #2

Could it be that the browser has a proxy configured, but the Gradle build hasn’t?


(awarrenlove) #3

As it turns out, it was an SSL issue. That was the first thing I checked originally, so I made the keys were installed in my Java installation. However, for whatever reason, Java wasn’t using the default key file. When I set that file using a -D option, it fixed the issue. Now to figure out why Java isn’t using the expected default file.