aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2016-05-26 09:48:53 -0400
committerChristopher Vogt <oss.nsp@cvogt.org>2016-05-26 09:48:53 -0400
commitcf7a66b7dfde8bb4386efe93a41f68996335db35 (patch)
tree9e2df620c19be4b124f5afb8028b00915f5616d8
parent908c6ec66e3878a040f21215417673480383b078 (diff)
downloadcbt-cf7a66b7dfde8bb4386efe93a41f68996335db35.tar.gz
cbt-cf7a66b7dfde8bb4386efe93a41f68996335db35.tar.bz2
cbt-cf7a66b7dfde8bb4386efe93a41f68996335db35.zip
read sonatype credentials from cbt installation, not from other checked out version
-rw-r--r--compatibility/Context.java1
-rw-r--r--stage1/ContextImplementation.scala1
-rw-r--r--stage1/cbt.scala1
-rw-r--r--stage2/PublishBuild.scala2
-rw-r--r--stage2/Stage2.scala1
5 files changed, 5 insertions, 1 deletions
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<Object,ClassLoader> 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
)