update build for 0.10.1

This commit is contained in:
Mark Harrah 2011-07-15 15:48:36 -04:00
parent b29380de96
commit eb11063ccb
2 changed files with 3 additions and 10 deletions

View File

@ -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) =>

View File

@ -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 : _*)