From cf7a66b7dfde8bb4386efe93a41f68996335db35 Mon Sep 17 00:00:00 2001 From: Christopher Vogt Date: Thu, 26 May 2016 09:48:53 -0400 Subject: read sonatype credentials from cbt installation, not from other checked out version --- compatibility/Context.java | 1 + stage1/ContextImplementation.scala | 1 + stage1/cbt.scala | 1 + stage2/PublishBuild.scala | 2 +- stage2/Stage2.scala | 1 + 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/compatibility/Context.java b/compatibility/Context.java index 387c24a..921087f 100644 --- a/compatibility/Context.java +++ b/compatibility/Context.java @@ -16,6 +16,7 @@ public abstract class Context{ public abstract ConcurrentHashMap permanentClassLoaders(); public abstract File cache(); public abstract File cbtHome(); + public abstract File cbtRootHome(); public abstract File compatibilityTarget(); public abstract BuildInterface parentBuildOrNull(); } diff --git a/stage1/ContextImplementation.scala b/stage1/ContextImplementation.scala index d8b1382..e4b63d3 100644 --- a/stage1/ContextImplementation.scala +++ b/stage1/ContextImplementation.scala @@ -17,6 +17,7 @@ case class ContextImplementation( permanentClassLoaders: ConcurrentHashMap[AnyRef,ClassLoader], cache: File, cbtHome: File, + cbtRootHome: File, compatibilityTarget: File, parentBuildOrNull: BuildInterface ) extends Context \ No newline at end of file diff --git a/stage1/cbt.scala b/stage1/cbt.scala index b1c462b..c264480 100644 --- a/stage1/cbt.scala +++ b/stage1/cbt.scala @@ -90,6 +90,7 @@ object `package`{ permanentClassLoaders, cache, cbtHome, + cbtRootHome, compatibilityTarget, parentBuild.getOrElse(null) ) diff --git a/stage2/PublishBuild.scala b/stage2/PublishBuild.scala index ea6fa0d..34c1d4f 100644 --- a/stage2/PublishBuild.scala +++ b/stage2/PublishBuild.scala @@ -43,7 +43,7 @@ abstract class PublishBuild(context: Context) extends PackageBuild(context){ protected def sonatypeCredentials = { // FIXME: this should probably not use cbtHome, but some reference to the system's host cbt - new String(readAllBytes((context.cbtHome ++ "/sonatype.login").toPath)).trim + new String(readAllBytes((context.cbtRootHome ++ "/sonatype.login").toPath)).trim } def publishSnapshot: Unit = { diff --git a/stage2/Stage2.scala b/stage2/Stage2.scala index 417808d..b911f50 100644 --- a/stage2/Stage2.scala +++ b/stage2/Stage2.scala @@ -46,6 +46,7 @@ object Stage2 extends Stage2Base{ args.permanentClassLoaders, args.cache, args.cbtHome, + args.cbtHome, args.compatibilityTarget, null ) -- cgit v1.2.3