From eb11063ccb9f1f431e57f9d587a3a42b6d755aab Mon Sep 17 00:00:00 2001 From: Mark Harrah Date: Fri, 15 Jul 2011 15:48:36 -0400 Subject: [PATCH] update build for 0.10.1 --- project/Release.scala | 9 ++------- project/Util.scala | 4 +--- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/project/Release.scala b/project/Release.scala index 2810d788c..674e80949 100644 --- a/project/Release.scala +++ b/project/Release.scala @@ -60,13 +60,8 @@ object Release extends Build } def getCredentials(cs: Seq[Credentials], log: Logger): (String, String) = { - // 0.10.1 - // val creds = Credentials.forHost(cs, "typesafe.artifactoryonline.com") - // (creds.userName, creds.passwd) - - Credentials.register(cs, log) - val creds = CredentialsStore.INSTANCE.getCredentials(RemoteRealm, RemoteHost) - (creds.getUserName, creds.getPasswd) + val Some(creds) = Credentials.forHost(cs, "typesafe.artifactoryonline.com") + (creds.userName, creds.passwd) } def snapshotPattern(version: String) = Resolver.localBasePattern.replaceAll("""\[revision\]""", version) def publishResolver: Project.Initialize[Option[Resolver]] = (remoteID, remoteBase) { (id, base) => diff --git a/project/Util.scala b/project/Util.scala index 7ff11d6ac..c26368b79 100644 --- a/project/Util.scala +++ b/project/Util.scala @@ -12,10 +12,8 @@ object Util def noPublish(p: Project) = p.copy(settings = noRemotePublish(p.settings)) def noRemotePublish(in: Seq[Setting[_]]) = in filterNot { s => s.key == deliver || s.key == publish } lazy val noExtra = projectDependencies ~= { _.map(_.copy(extraAttributes = Map.empty)) } // not sure why this is needed - // not needed after moving to 0.10.1 - lazy val fixArtifact = artifact in (Compile, packageSrc) ~= (_.copy(configurations = Optional :: Nil)) - def project(path: File, nameString: String) = Project(normalize(nameString), path) settings( name := nameString, noExtra, fixArtifact ) + def project(path: File, nameString: String) = Project(normalize(nameString), path) settings( name := nameString, noExtra ) def baseProject(path: File, nameString: String) = project(path, nameString) settings( base : _*) def testedBaseProject(path: File, nameString: String) = baseProject(path, nameString) settings( testDependencies : _*)