Search code examples
gradleivynexus

How does Gradle/Ivy read a Nexus repo acting as a Maven mirror?


How does Ivy read a Nexus repo acting as a Maven mirror?

I was thinking about using Gradle as my build system, and Gradle is built from Ant+Ivy (using Groovy). I have a Nexus repository on my local network that acts as a "mirror". In order for me to build my projects, I put a "mirror" entry in my .m2\settings.xml config file. I am able to build my Maven projects just fine but Gradle does not read the .m2 config and so my Gradle projects wont build.

I do not know how to configure Gradle to use the nexus repo as a mirror. Can anyone explain this or give me some hints? I suspect it has something to do with usage of a ivysettings.xml file maybe? This post implies that Gradle DOES in fact read the Maven config but I do not experience this.


Solution

  • The following answer describes how to configure a Maven repository manager in ivy:

    I'm uncertain whether this actually helps with a Gradle build (I thought Gradle had stopped using ivy).

    Update

    Gradle documentation on configuring repositories: