diff options
author | Benjamin Frank <b.frank@sap.com> | 2016-07-05 15:15:36 +0200 |
---|---|---|
committer | Benjamin Frank <b.frank@sap.com> | 2016-07-05 15:15:36 +0200 |
commit | 11342ecc8c6bd92e73b8ad9a2791f8d9462043a6 (patch) | |
tree | 6c37b019c3c23cbc7a03484bec003c7266c99e4b /stage2/Publish.scala | |
parent | b1b2195b13300d9b3057b96deebf24d9353a7344 (diff) | |
download | cbt-11342ecc8c6bd92e73b8ad9a2791f8d9462043a6.tar.gz cbt-11342ecc8c6bd92e73b8ad9a2791f8d9462043a6.tar.bz2 cbt-11342ecc8c6bd92e73b8ad9a2791f8d9462043a6.zip |
Allow empty credentials for publishing.
This enables to publish into a repository where no credentials are
required but and empty/wrong HTTP Auth header throws an HTTP 401
(not authorized) error
Diffstat (limited to 'stage2/Publish.scala')
-rw-r--r-- | stage2/Publish.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/stage2/Publish.scala b/stage2/Publish.scala index 8cdb65b..1cc3b70 100644 --- a/stage2/Publish.scala +++ b/stage2/Publish.scala @@ -41,9 +41,9 @@ trait Publish extends PackageJars{ def publishUrl = if(version.endsWith("-SNAPSHOT")) snapshotUrl else releaseUrl override def copy(context: Context) = super.copy(context).asInstanceOf[Publish] - protected def sonatypeCredentials = { + protected def sonatypeCredentials: Option[String] = { // FIXME: this should probably not use cbtHome, but some reference to the system's host cbt - new String(readAllBytes((context.cbtRootHome ++ "/sonatype.login").toPath)).trim + Some(new String(readAllBytes((context.cbtRootHome ++ "/sonatype.login").toPath)).trim) } def publishSnapshot: Unit = { |