mirror of https://github.com/sbt/sbt.git
includes sbt, Scala version extra attributes in repository/cache patterns
This commit is contained in:
parent
e81d7087ed
commit
5903fb88a2
|
|
@ -4,6 +4,7 @@
|
|||
package sbt
|
||||
|
||||
import Artifact.{defaultExtension, defaultType}
|
||||
import Resolver.PluginPattern
|
||||
|
||||
import java.io.File
|
||||
import java.util.concurrent.Callable
|
||||
|
|
@ -257,6 +258,9 @@ private object IvySbt
|
|||
override def findModuleInCache(dd: DependencyDescriptor, revId: ModuleRevisionId, options: CacheMetadataOptions, r: String) =
|
||||
super.findModuleInCache(dd,revId,options,null)
|
||||
}
|
||||
manager.setArtifactPattern(PluginPattern + manager.getArtifactPattern)
|
||||
manager.setDataFilePattern(PluginPattern + manager.getDataFilePattern)
|
||||
manager.setIvyPattern(PluginPattern + manager.getIvyPattern)
|
||||
manager.setUseOrigin(true)
|
||||
if(localOnly)
|
||||
manager.setDefaultTTL(java.lang.Long.MAX_VALUE);
|
||||
|
|
|
|||
|
|
@ -275,8 +275,10 @@ object Resolver
|
|||
def ivyStylePatterns = defaultIvyPatterns//Patterns(Nil, Nil, false)
|
||||
|
||||
def defaultPatterns = mavenStylePatterns
|
||||
def mavenStyleBasePattern = "[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"
|
||||
def localBasePattern = "[organisation]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext]"
|
||||
def mavenStyleBasePattern = "[organisation]/[module](_[scalaVersion])(_[sbtVersion])/[revision]/[artifact]-[revision](-[classifier]).[ext]"
|
||||
def localBasePattern = "[organisation]/[module]/" + PluginPattern + "[revision]/[type]s/[artifact](-[classifier]).[ext]"
|
||||
def defaultRetrievePattern = "[type]s/[organisation]/[module]/" + PluginPattern + "[artifact](-[revision])(-[classifier]).[ext]"
|
||||
final val PluginPattern = "(scala_[scalaVersion]/)(sbt_[sbtVersion]/)"
|
||||
|
||||
def mavenLocal = MavenRepository("Maven2 Local", (new File(Path.userHome, ".m2/repository/")).toURI.toURL.toExternalForm)
|
||||
def defaultLocal = defaultUserFileRepository("local")
|
||||
|
|
|
|||
|
|
@ -627,7 +627,7 @@ object Classpaths
|
|||
projectID <<= pluginProjectID,
|
||||
resolvers in GlobalScope :== Nil,
|
||||
projectDescriptors <<= depMap,
|
||||
retrievePattern in GlobalScope :== "[type]s/[organisation]/[module]/[artifact](-[revision])(-[classifier]).[ext]",
|
||||
retrievePattern in GlobalScope :== Resolver.defaultRetrievePattern,
|
||||
updateConfiguration <<= (retrieveConfiguration, ivyLoggingLevel)((conf,level) => new UpdateConfiguration(conf, false, level) ),
|
||||
retrieveConfiguration <<= (managedDirectory, retrievePattern, retrieveManaged) { (libm, pattern, enabled) => if(enabled) Some(new RetrieveConfiguration(libm, pattern)) else None },
|
||||
ivyConfiguration <<= mkIvyConfiguration,
|
||||
|
|
|
|||
Loading…
Reference in New Issue