2009-08-21 14:12:43 +02:00
|
|
|
/* sbt -- Simple Build Tool
|
2010-02-08 05:45:19 +01:00
|
|
|
* Copyright 2009, 2010 Mark Harrah
|
2009-08-21 14:12:43 +02:00
|
|
|
*/
|
|
|
|
|
package xsbt.boot
|
|
|
|
|
|
2009-09-26 08:18:04 +02:00
|
|
|
// <boot.directory>
|
|
|
|
|
// scala-<scala.version>/ [baseDirectoryName]
|
|
|
|
|
// lib/ [ScalaDirectoryName]
|
|
|
|
|
// <app.name>-<app.version>/ [appDirectoryName]
|
2009-08-21 14:12:43 +02:00
|
|
|
//
|
|
|
|
|
// see also ProjectProperties for the set of constants that apply to the build.properties file in a project
|
|
|
|
|
private object BootConfiguration
|
|
|
|
|
{
|
2009-09-26 08:18:04 +02:00
|
|
|
// these are the Scala module identifiers to resolve/retrieve
|
2009-08-21 14:12:43 +02:00
|
|
|
val ScalaOrg = "org.scala-lang"
|
|
|
|
|
val CompilerModuleName = "scala-compiler"
|
|
|
|
|
val LibraryModuleName = "scala-library"
|
2009-09-26 08:18:04 +02:00
|
|
|
|
|
|
|
|
val SbtOrg = "org.scala-tools.sbt"
|
2009-08-21 14:12:43 +02:00
|
|
|
|
|
|
|
|
/** The Ivy conflict manager to use for updating.*/
|
|
|
|
|
val ConflictManagerName = "strict"
|
|
|
|
|
/** The name of the local Ivy repository, which is used when compiling sbt from source.*/
|
|
|
|
|
val LocalIvyName = "local"
|
|
|
|
|
/** The pattern used for the local Ivy repository, which is used when compiling sbt from source.*/
|
2010-01-10 22:46:15 +01:00
|
|
|
val LocalPattern = "[organisation]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext]"
|
2009-08-21 14:12:43 +02:00
|
|
|
/** The artifact pattern used for the local Ivy repository.*/
|
|
|
|
|
def LocalArtifactPattern = LocalPattern
|
|
|
|
|
/** The Ivy pattern used for the local Ivy repository.*/
|
|
|
|
|
def LocalIvyPattern = LocalPattern
|
|
|
|
|
|
2009-09-26 08:18:04 +02:00
|
|
|
/** The class name prefix used to hide the Scala classes used by this loader from the application */
|
2009-08-21 14:12:43 +02:00
|
|
|
val ScalaPackage = "scala."
|
2009-09-26 08:18:04 +02:00
|
|
|
/** The class name prefix used to hide the Ivy classes used by this loader from the application*/
|
2009-08-21 14:12:43 +02:00
|
|
|
val IvyPackage = "org.apache.ivy."
|
2009-09-26 08:18:04 +02:00
|
|
|
/** The class name prefix used to hide the launcher classes from the application.
|
2009-08-24 04:21:15 +02:00
|
|
|
* Note that access to xsbti classes are allowed.*/
|
2009-08-21 14:12:43 +02:00
|
|
|
val SbtBootPackage = "xsbt.boot."
|
2009-09-09 05:13:30 +02:00
|
|
|
/** The prefix for JLine resources.*/
|
|
|
|
|
val JLinePackagePath = "jline/"
|
2009-08-21 14:12:43 +02:00
|
|
|
/** The loader will check that these classes can be loaded and will assume that their presence indicates
|
|
|
|
|
* the Scala compiler and library have been downloaded.*/
|
2009-09-27 20:39:26 +02:00
|
|
|
val TestLoadScalaClasses = "scala.Option" :: "scala.tools.nsc.Global" :: Nil
|
2009-08-21 14:12:43 +02:00
|
|
|
|
|
|
|
|
val ScalaHomeProperty = "scala.home"
|
|
|
|
|
val UpdateLogName = "update.log"
|
|
|
|
|
|
|
|
|
|
val DefaultIvyConfiguration = "default"
|
|
|
|
|
|
|
|
|
|
/** The name of the directory within the boot directory to retrieve scala to. */
|
|
|
|
|
val ScalaDirectoryName = "lib"
|
|
|
|
|
/** The Ivy pattern to use for retrieving the scala compiler and library. It is relative to the directory
|
|
|
|
|
* containing all jars for the requested version of scala. */
|
2010-01-10 22:46:15 +01:00
|
|
|
val scalaRetrievePattern = ScalaDirectoryName + "/[artifact](-[classifier]).[ext]"
|
2009-08-21 14:12:43 +02:00
|
|
|
|
2009-09-26 08:18:04 +02:00
|
|
|
/** The Ivy pattern to use for retrieving the application and its dependencies. It is relative to the directory
|
2009-08-21 14:12:43 +02:00
|
|
|
* containing all jars for the requested version of scala. */
|
2009-09-26 08:18:04 +02:00
|
|
|
def appRetrievePattern(appID: xsbti.ApplicationID) = appDirectoryName(appID, "/") + "(/[component])/[artifact]-[revision].[ext]"
|
|
|
|
|
|
|
|
|
|
/** The name of the directory to retrieve the application and its dependencies to.*/
|
|
|
|
|
def appDirectoryName(appID: xsbti.ApplicationID, sep: String) = appID.groupID + sep + appID.name + sep + appID.version
|
2009-08-21 14:12:43 +02:00
|
|
|
/** The name of the directory in the boot directory to put all jars for the given version of scala in.*/
|
|
|
|
|
def baseDirectoryName(scalaVersion: String) = "scala-" + scalaVersion
|
|
|
|
|
}
|
|
|
|
|
private object ProxyProperties
|
|
|
|
|
{
|
|
|
|
|
val HttpProxyEnv = "http_proxy"
|
|
|
|
|
val HttpProxyUser = "http_proxy_user"
|
|
|
|
|
val HttpProxyPassword = "http_proxy_pass"
|
|
|
|
|
|
|
|
|
|
val ProxyHost = "http.proxyHost"
|
|
|
|
|
val ProxyPort = "http.proxyPort"
|
|
|
|
|
val ProxyUser = "http.proxyUser"
|
|
|
|
|
val ProxyPassword = "http.proxyPassword"
|
|
|
|
|
}
|