From 5e3f7d43c0d269124609c490d68b0d05cd1102a9 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Tue, 6 Apr 2021 22:39:35 -0400 Subject: [PATCH] maven test 3 --- Jenkinsfile | 2 +- buildSrc/src/main/kotlin/task/Paperclip.kt | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 38de7229..aa12c411 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,7 +33,6 @@ pipeline { publisherStrategy: 'EXPLICIT', ) { sh ''' - whereis mvn && exit ./gradlew setupUpstream ./gradlew applyPatches ''' @@ -52,6 +51,7 @@ pipeline { ) { withCredentials([usernamePassword(credentialsId: 'jenkins-deploy', usernameVariable: 'ORG_GRADLE_PROJECT_mavenUsername', passwordVariable: 'ORG_GRADLE_PROJECT_mavenPassword')]) { sh ''' + chmod +x mvn || true ./gradlew clean build paperclip publish mkdir -p "./target" basedir=$(pwd) diff --git a/buildSrc/src/main/kotlin/task/Paperclip.kt b/buildSrc/src/main/kotlin/task/Paperclip.kt index a9f82332..44c16b09 100644 --- a/buildSrc/src/main/kotlin/task/Paperclip.kt +++ b/buildSrc/src/main/kotlin/task/Paperclip.kt @@ -28,7 +28,10 @@ internal fun Project.createPaperclipTask( "-Dvanillajar=$vanillaJarPath" ) if (System.getProperty("os.name").startsWith("Windows")) paperclipCmd[0] = "mvn.cmd" - if (jenkins) paperclipCmd.add("-Dstyle.color=never") + if (jenkins) { + paperclipCmd.add("-Dstyle.color=never") + paperclipCmd[0] = "./mvn" + } ensureSuccess(cmd(*paperclipCmd.toTypedArray(), dir = paperclipDir, printOut = true)) val paperClip = paperclipDir.resolve("assembly/target/paperclip-${toothpick.minecraftVersion}.jar") val destination = rootProjectDir.resolve(toothpick.calcPaperclipName)