Skip to content

Commit 0df22fa

Browse files
committed
#9 Replace pseudo-member with string instances
This did not work at all. Each method that was using this as default value failed to use it properly. Jenkins nags with a MissingPropertyException. Signed-off-by: Philipp Pixel <[email protected]>
1 parent f43041b commit 0df22fa

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

vars/withMavenSettings.groovy

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
final String defaultMavenCentralRepoName = "maven-central"
2-
31
/**
42
* Provides a simple custom maven settings.xml file to current working directory with Maven Central mirror in the
53
* current CES instance.
@@ -22,7 +20,7 @@ final String defaultMavenCentralRepoName = "maven-central"
2220
* @param mirrorNexusPath relative path to a maven central mirror hosted inside a nexus instance. The prefix <code>/nexus/repository</code> will be added automatically. Defaults to "maven-central"
2321
* @param closure This closure will be executed when the Maven <code>settings.xml</code> file was successfully created.
2422
*/
25-
def settings(def nexusCredentials, String cesFQDN, String pathToLocalMavenRepository, String mirrorNexusPath=defaultMavenCentralRepoName, Closure closure) {
23+
def settings(def nexusCredentials, String cesFQDN, String pathToLocalMavenRepository, String mirrorNexusPath="maven-central", Closure closure) {
2624
echo "write settings.xml to ${pathToLocalMavenRepository}"
2725
echo "local Maven repository should be located at ${pathToLocalMavenRepository}/.m2/repository"
2826

@@ -64,7 +62,7 @@ def settings(def nexusCredentials, String cesFQDN, String pathToLocalMavenReposi
6462
* @param mirrorNexusPath relative path to a maven central mirror hosted inside a nexus instance. The prefix <code>/nexus/repository</code> will be added automatically. Defaults to "maven-central"
6563
* @param closure This closure will be executed when the Maven <code>settings.xml</code> file was successfully created.
6664
*/
67-
def settingsWithEnvHome(def nexusCredentials, String cesFQDN, String mirrorNexusPath=defaultMavenCentralRepoName, Closure closure) {
65+
def settingsWithEnvHome(def nexusCredentials, String cesFQDN, String mirrorNexusPath="maven-central", Closure closure) {
6866
def currentHome = env.HOME
6967
settings(nexusCredentials, cesFQDN, currentHome, mirrorNexusPath, closure)
7068
}
@@ -76,7 +74,7 @@ def settingsWithEnvHome(def nexusCredentials, String cesFQDN, String mirrorNexus
7674
* @param mirrorNexusPath relative path to a maven central mirror hosted inside a nexus instance. The prefix <code>/nexus/repository</code> will be added automatically. Defaults to "maven-central"
7775
* @param mvnCallArgs these arguments contain the Maven arguments
7876
*/
79-
def mvnWithSettings(def nexusCredentials, String cesFQDN, String mirrorNexusPath=defaultMavenCentralRepoName, String mvnCallArgs) {
77+
def mvnWithSettings(def nexusCredentials, String cesFQDN, String mirrorNexusPath="maven-central", String mvnCallArgs) {
8078
def currentHome = env.HOME
8179
settings(nexusCredentials, cesFQDN, currentHome, mirrorNexusPath) { settingsXml ->
8280
mvn settingsXml, mvnCallArgs

0 commit comments

Comments
 (0)