This commit is contained in:
Mark Harrah 2011-05-12 09:26:15 -04:00
parent 75d5b91b79
commit 081f296d55
4 changed files with 15 additions and 6 deletions

View File

@ -22,7 +22,8 @@ import core.sort.SortEngine
import core.settings.IvySettings
import plugins.matcher.{ExactPatternMatcher, PatternMatcher}
import plugins.resolver.{ChainResolver, FileSystemResolver, IBiblioResolver, URLResolver}
import util.{DefaultMessageLogger, Message, MessageLoggerEngine}
import util.{DefaultMessageLogger, Message, MessageLoggerEngine, url}
import url.CredentialsStore
import BootConfiguration._
@ -41,8 +42,15 @@ final class Update(config: UpdateConfiguration)
private def logFile = new File(bootDirectory, UpdateLogName)
private val logWriter = new PrintWriter(new FileWriter(logFile))
private def addCredentials()
{
val List(realm, host, user, password) = List("sbt.boot.realm", "sbt.boot.host", "sbt.boot.user", "sbt.boot.password") map System.getProperty
if(realm != null && host != null && user != null && password != null)
CredentialsStore.INSTANCE.addCredentials(realm, host, user, password)
}
private lazy val settings =
{
addCredentials()
val settings = new IvySettings
ivyHome foreach settings.setDefaultIvyUserDir
addResolvers(settings)

View File

@ -4,7 +4,7 @@
[app]
org: org.scala-tools.sbt
name: sbt
version: read(sbt.version)[0.9.5-SNAPSHOT]
version: read(sbt.version)[0.9.5]
class: ${sbt.main.class-sbt.xMain}
components: xsbti
cross-versioned: true
@ -12,7 +12,7 @@
[repositories]
local
maven-local
sbt-db: http://databinder.net/repo/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext]
typesafe-ivy-releases: http://typesafe.artifactoryonline.com/typesafe/ivy-releases/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext]
maven-central
scala-tools-releases
scala-tools-snapshots

View File

@ -1,5 +1,5 @@
project.organization=org.scala-tools.sbt
project.name=xsbt
sbt.version=0.7.7
project.version=0.9.5-SNAPSHOT
project.version=0.9.5
build.scala.versions=2.8.1

View File

@ -114,9 +114,10 @@ class XSbt(info: ProjectInfo) extends ParentProject(info) with NoCrossPaths
def jlineDep = "jline" % "jline" % "0.9.94" intransitive()
// publish locally when on repository server
override def managedStyle = ManagedStyle.Ivy
val publishTo = Resolver.file("test-repo", new File("/var/dbwww/repo/"))
val publishTo = Resolver.url("typesafe-ivy-releases", new java.net.URL("http://typesafe.artifactoryonline.com/typesafe/ivy-releases/"))
val additional = publishTo
Credentials(Path.userHome / ".ivy2" / ".typesafe-credentials", log)
/* Subproject configurations*/
class LaunchProject(info: ProjectInfo) extends Base(info) with TestWithIO with TestDependencies with ProguardLaunch with NoCrossPaths