-
Notifications
You must be signed in to change notification settings - Fork 28
Description
Long story short I use the maven-settings plugin so that I can instruct my gradle builld to use the repositories and credentials in the settings.xml file configured in the different Jenkins slaves we use. This works fine in single module projects but I have an issues with applying it to a multi module project.
I'm using gradle 4.6 and applying the plugin with the plugins block.
plugins {
id "net.linguica.maven-settings" version "0.5" apply true
}
allprojects {
...
}
subprojects {
...
}
mavenSettings {
userSettingsFileName "$System.env.HOME/.m2/settings.xml"
}
// Leaving this out gives the same error (thus using the default path to the settings file).
Running ./gradlew assemble causes the first module to throw a:
Cannot resolve external dependency ... because no repositories are defined.
for all my dependencies. These projects come from both in house nexus repo's and the maven central repository.
I know this is a problem with the plugin since removing it and manually adding the repo's runs the build just fine. This is not an option though since I need the credentials in the settings.xml file for publishing artifacts.
Am I being an idiot for missing something? Or have other people encountered the same issue.