I have a maven settings.xml located in:
/home/u123/.m2/settings.xml
where I specify a remote maven repository:
gradle-maven-settings-plugin works for me (at least in my Windows environment)
One should add
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
}
plugins {
id 'net.linguica.maven-settings' version '0.5'
}
to the build.gradle
and then can add repository like this:
repositories {
maven {
name = 'myRepo' // should match myRepo of appropriate in Maven's settings.xml
url = 'https://intranet.foo.org/repo'
}
}
which will use myRepo
credentials from the Maven's settings.xml
to access the https://intranet.foo.org/repo repository