mirror of https://github.com/sbt/sbt.git
Put things into sbt.librarymanagement package
This commit is contained in:
parent
c65c5016b0
commit
1232a01037
|
|
@ -1,4 +1,4 @@
|
|||
package sbt;
|
||||
package sbt.internal.librarymanagement;
|
||||
|
||||
import java.util.Map;
|
||||
import org.apache.ivy.plugins.resolver.DependencyResolver;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package sbt.mavenint;
|
||||
package sbt.internal.librarymanagement.mavenint;
|
||||
|
||||
/**
|
||||
* Extra properties we dump from Aether into the properties list.
|
||||
|
|
@ -1,11 +1,12 @@
|
|||
/* sbt -- Simple Build Tool
|
||||
* Copyright 2008, 2009, 2010 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
package sbt.internal.librarymanagement
|
||||
|
||||
import java.io.{ File, FileOutputStream }
|
||||
import java.util.concurrent.Callable
|
||||
import sbt.util.Logger
|
||||
import sbt.librarymanagement._
|
||||
|
||||
/**
|
||||
* A component manager provides access to the pieces of xsbt that are distributed as components.
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
/* sbt -- Simple Build Tool
|
||||
* Copyright 2008, 2009, 2010 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
package sbt.internal.librarymanagement
|
||||
|
||||
import java.net.URL
|
||||
import java.util.Collections
|
||||
|
|
@ -19,6 +19,7 @@ import org.apache.ivy.util.{ FileUtil, ChecksumHelper }
|
|||
import org.apache.ivy.core.module.descriptor.{ Artifact => IArtifact }
|
||||
import sbt.io.IO
|
||||
import sbt.util.Logger
|
||||
import sbt.librarymanagement._
|
||||
|
||||
private[sbt] object ConvertResolver {
|
||||
import UpdateOptions.ResolverConverter
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package sbt
|
||||
package sbt.internal.librarymanagement
|
||||
|
||||
import org.apache.ivy.core.module.id.ModuleRevisionId
|
||||
import org.apache.ivy.core.module.descriptor.{ DefaultArtifact, DefaultExtendsDescriptor, DefaultModuleDescriptor, ModuleDescriptor }
|
||||
|
|
@ -12,8 +12,9 @@ import org.apache.ivy.util.extendable.ExtendableItem
|
|||
import java.io.{ File, InputStream }
|
||||
import java.net.URL
|
||||
import java.util.regex.Pattern
|
||||
import sbt.mavenint.{ PomExtraDependencyAttributes, SbtPomExtraProperties }
|
||||
import sbt.internal.librarymanagement.mavenint.{ PomExtraDependencyAttributes, SbtPomExtraProperties }
|
||||
import sbt.io.Hash
|
||||
import sbt.librarymanagement._
|
||||
|
||||
@deprecated("We now use an Aether-based pom parser.", "0.13.8")
|
||||
final class CustomPomParser(delegate: ModuleDescriptorParser, transform: (ModuleDescriptorParser, ModuleDescriptor) => ModuleDescriptor) extends ModuleDescriptorParser {
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
/* sbt -- Simple Build Tool
|
||||
* Copyright 2008, 2009, 2010 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
package sbt.internal.librarymanagement
|
||||
|
||||
import java.io.ByteArrayInputStream
|
||||
import java.net.URL
|
||||
|
|
@ -11,6 +11,7 @@ import org.apache.ivy.core.settings.IvySettings
|
|||
import org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser
|
||||
import org.apache.ivy.plugins.repository.Resource
|
||||
import org.apache.ivy.plugins.repository.url.URLResource
|
||||
import sbt.librarymanagement._
|
||||
|
||||
/** Subclasses the default Ivy file parser in order to provide access to protected methods.*/
|
||||
private[sbt] object CustomXmlParser extends XmlModuleDescriptorParser {
|
||||
|
|
@ -1,9 +1,10 @@
|
|||
/* sbt -- Simple Build Tool
|
||||
* Copyright 2011 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
package sbt.internal.librarymanagement
|
||||
|
||||
import sbt.io.{ AllPassFilter, NameFilter }
|
||||
import sbt.librarymanagement._
|
||||
|
||||
trait DependencyFilterExtra {
|
||||
def moduleFilter(organization: NameFilter = AllPassFilter, name: NameFilter = AllPassFilter, revision: NameFilter = AllPassFilter): ModuleFilter =
|
||||
|
|
@ -1,10 +1,7 @@
|
|||
/* sbt -- Simple Build Tool
|
||||
* Copyright 2008, 2009, 2010 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
|
||||
import Resolver.PluginPattern
|
||||
import ivyint.{ CachedResolutionResolveEngine, CachedResolutionResolveCache, SbtDefaultDependencyDescriptor }
|
||||
package sbt.internal.librarymanagement
|
||||
|
||||
import java.io.File
|
||||
import java.net.URI
|
||||
|
|
@ -40,6 +37,9 @@ import scala.xml.{ NodeSeq, Text }
|
|||
import scala.collection.mutable
|
||||
|
||||
import sbt.util.Logger
|
||||
import sbt.librarymanagement._
|
||||
import Resolver.PluginPattern
|
||||
import ivyint.{ CachedResolutionResolveEngine, CachedResolutionResolveCache, SbtDefaultDependencyDescriptor }
|
||||
|
||||
final class IvySbt(val configuration: IvyConfiguration) {
|
||||
import configuration.baseDirectory
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
/* sbt -- Simple Build Tool
|
||||
* Copyright 2008, 2009, 2010 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
package sbt.internal.librarymanagement
|
||||
|
||||
import java.io.File
|
||||
import scala.xml.{ Node => XNode, NodeSeq }
|
||||
|
|
@ -19,6 +19,7 @@ import org.apache.ivy.plugins.resolver.{ BasicResolver, DependencyResolver }
|
|||
import sbt.io.{ IO, PathFinder }
|
||||
import sbt.util.Logger
|
||||
import sbt.internal.util.{ ShowLines, SourcePosition, LinePosition, RangePosition, LineRange }
|
||||
import sbt.librarymanagement._
|
||||
|
||||
final class DeliverConfiguration(val deliverIvyPattern: String, val status: String, val configurations: Option[Seq[Configuration]], val logging: UpdateLogging.Value)
|
||||
final class PublishConfiguration(val ivyFile: Option[File], val resolverName: String, val artifacts: Map[Artifact, File], val checksums: Seq[String], val logging: UpdateLogging.Value,
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
/* sbt -- Simple Build Tool
|
||||
* Copyright 2008, 2009, 2010 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
package sbt.internal.librarymanagement
|
||||
|
||||
import java.io.File
|
||||
import java.net.URL
|
||||
|
|
@ -14,6 +14,7 @@ import org.apache.ivy.plugins.resolver.util.ResolvedResource
|
|||
import org.apache.ivy.util.FileUtil
|
||||
import sbt.io.Path
|
||||
import sbt.util.Logger
|
||||
import sbt.librarymanagement._
|
||||
|
||||
class NotInCache(val id: ModuleID, cause: Throwable)
|
||||
extends RuntimeException(NotInCache(id, cause), cause) {
|
||||
|
|
@ -1,12 +1,13 @@
|
|||
/* sbt -- Simple Build Tool
|
||||
* Copyright 2008, 2009, 2010 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
package sbt.internal.librarymanagement
|
||||
|
||||
import java.io.File
|
||||
import java.net.{ URI, URL }
|
||||
import scala.xml.NodeSeq
|
||||
import sbt.util.Logger
|
||||
import sbt.librarymanagement._
|
||||
|
||||
final class IvyPaths(val baseDirectory: File, val ivyHome: Option[File]) {
|
||||
def withBase(newBaseDirectory: File) = new IvyPaths(newBaseDirectory, ivyHome)
|
||||
|
|
@ -1,10 +1,11 @@
|
|||
/* sbt -- Simple Build Tool
|
||||
* Copyright 2008, 2009, 2010 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
package sbt.internal.librarymanagement
|
||||
|
||||
import org.apache.ivy.util.{ Message, MessageLogger, MessageLoggerEngine }
|
||||
import sbt.util.Logger
|
||||
import sbt.librarymanagement._
|
||||
|
||||
/** Interface to Ivy logging. */
|
||||
private final class IvyLoggerInterface(logger: Logger) extends MessageLogger {
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
/* sbt -- Simple Build Tool
|
||||
* Copyright 2010 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
package sbt.internal.librarymanagement
|
||||
|
||||
import java.io.File
|
||||
import java.{ util => ju }
|
||||
|
|
@ -14,6 +14,7 @@ import report.{ ArtifactDownloadReport, ConfigurationResolveReport, ResolveRepor
|
|||
import resolve.{ IvyNode, IvyNodeCallers }
|
||||
import IvyNodeCallers.{ Caller => IvyCaller }
|
||||
import ivyint.SbtDefaultDependencyDescriptor
|
||||
import sbt.librarymanagement._
|
||||
|
||||
object IvyRetrieve {
|
||||
def reports(report: ResolveReport): Seq[ConfigurationResolveReport] =
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package sbt
|
||||
package sbt.internal.librarymanagement
|
||||
|
||||
private[sbt] object IvyUtil {
|
||||
def separate[A, B](l: Seq[Either[A, B]]): (Seq[A], Seq[B]) =
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package sbt
|
||||
package sbt.internal.librarymanagement
|
||||
|
||||
import java.io.File
|
||||
import java.net.URL
|
||||
|
|
@ -7,6 +7,7 @@ import core.module.descriptor.ModuleDescriptor
|
|||
import sbt.serialization._
|
||||
import java.net.{ URLEncoder, URLDecoder }
|
||||
import sbt.util.Logger
|
||||
import sbt.librarymanagement._
|
||||
|
||||
private[sbt] object JsonUtil {
|
||||
def sbtOrgTemp = "org.scala-sbt.temp"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package sbt
|
||||
package sbt.internal.librarymanagement
|
||||
|
||||
/**
|
||||
* Represents a logical time point for dependency resolution.
|
||||
|
|
@ -5,12 +5,12 @@
|
|||
// based on Ivy's PomModuleDescriptorWriter, which is Apache Licensed, Version 2.0
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
package sbt
|
||||
package sbt.internal.librarymanagement
|
||||
|
||||
import java.io.File
|
||||
import sbt.util.Logger
|
||||
|
||||
import sbt.mavenint.PomExtraDependencyAttributes
|
||||
import sbt.librarymanagement._
|
||||
import mavenint.PomExtraDependencyAttributes
|
||||
|
||||
// Node needs to be renamed to XNode because the task subproject contains a Node type that will shadow
|
||||
// scala.xml.Node when generating aggregated API documentation
|
||||
|
|
@ -23,6 +23,7 @@ import org.apache.ivy.core.module.descriptor.{ DependencyArtifactDescriptor, Dep
|
|||
import org.apache.ivy.plugins.resolver.{ ChainResolver, DependencyResolver, IBiblioResolver }
|
||||
import ivyint.CustomRemoteMavenResolver
|
||||
import sbt.io.IO
|
||||
|
||||
object MakePom {
|
||||
/** True if the revision is an ivy-range, not a complete revision. */
|
||||
def isDependencyVersionRange(revision: String): Boolean = {
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
/* sbt -- Simple Build Tool
|
||||
* Copyright 2011 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
package sbt.internal.librarymanagement
|
||||
|
||||
import java.io.File
|
||||
import java.util.Date
|
||||
|
|
@ -15,6 +15,7 @@ import org.apache.ivy.plugins.namespace.Namespace
|
|||
import org.apache.ivy.plugins.resolver.{ DependencyResolver, ResolverSettings }
|
||||
import report.{ ArtifactDownloadReport, DownloadReport, DownloadStatus, MetadataArtifactDownloadReport }
|
||||
import resolve.{ DownloadOptions, ResolveData, ResolvedModuleRevision }
|
||||
import sbt.librarymanagement._
|
||||
|
||||
/**
|
||||
* A Resolver that uses a predefined mapping from module ids to in-memory descriptors.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package sbt
|
||||
package sbt.internal.librarymanagement
|
||||
|
||||
import java.io.File
|
||||
import java.io.FileInputStream
|
||||
|
|
@ -13,6 +13,7 @@ import core.module.descriptor.ModuleDescriptor
|
|||
import ResolutionCache.{ Name, ReportDirectory, ResolvedName, ResolvedPattern }
|
||||
import parser.xml.XmlModuleDescriptorParser
|
||||
import sbt.io.IO
|
||||
import sbt.librarymanagement._
|
||||
|
||||
/**
|
||||
* Replaces the standard Ivy resolution cache in order to:
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
package sbt
|
||||
package sbt.internal.librarymanagement
|
||||
|
||||
import sbt.impl.{ GroupID, GroupArtifactID }
|
||||
import impl.{ GroupID, GroupArtifactID }
|
||||
import sbt.librarymanagement._
|
||||
|
||||
final class SbtExclusionRule(
|
||||
val organization: String,
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
/* sbt -- Simple Build Tool
|
||||
* Copyright 2009 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
package sbt.internal.librarymanagement
|
||||
|
||||
import java.util.Locale
|
||||
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
package sbt.cross
|
||||
package sbt.internal.librarymanagement
|
||||
package cross
|
||||
|
||||
object CrossVersionUtil
|
||||
{
|
||||
|
|
@ -1,10 +1,11 @@
|
|||
/* sbt -- Simple Build Tool
|
||||
* Copyright 2009,2010 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
package sbt.internal.librarymanagement
|
||||
package impl
|
||||
|
||||
import StringUtilities.nonEmpty
|
||||
import sbt.librarymanagement._
|
||||
|
||||
trait DependencyBuilders {
|
||||
final implicit def toGroupID(groupID: String): GroupID =
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package sbt
|
||||
package sbt.internal.librarymanagement
|
||||
package ivyint
|
||||
|
||||
import java.util.Date
|
||||
|
|
@ -19,11 +19,12 @@ import core.{ IvyPatternHelper, LogOptions }
|
|||
import org.apache.ivy.util.{ Message, MessageLogger }
|
||||
import org.apache.ivy.plugins.latest.{ ArtifactInfo => IvyArtifactInfo }
|
||||
import org.apache.ivy.plugins.matcher.{ MapMatcher, PatternMatcher }
|
||||
import Configurations.{ System => _, _ }
|
||||
import annotation.tailrec
|
||||
import scala.concurrent.duration._
|
||||
import sbt.io.{ DirectoryFilter, Hash, IO, Path }
|
||||
import sbt.util.Logger
|
||||
import sbt.librarymanagement._
|
||||
import Configurations.{ System => _, _ }
|
||||
|
||||
private[sbt] object CachedResolutionResolveCache {
|
||||
def createID(organization: String, name: String, revision: String) =
|
||||
|
|
@ -1,7 +1,8 @@
|
|||
package sbt
|
||||
package sbt.internal.librarymanagement
|
||||
package ivyint
|
||||
|
||||
import org.apache.ivy.plugins.resolver.DependencyResolver
|
||||
import sbt.librarymanagement._
|
||||
|
||||
// These are placeholder traits for sbt-aether-resolver
|
||||
trait CustomMavenResolver extends DependencyResolver {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package sbt
|
||||
package sbt.internal.librarymanagement
|
||||
package ivyint
|
||||
|
||||
import java.lang.reflect.Field
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package sbt
|
||||
package sbt.internal.librarymanagement
|
||||
package ivyint
|
||||
|
||||
import org.apache.ivy.util.url.CredentialsStore
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package sbt
|
||||
package sbt.internal.librarymanagement
|
||||
package ivyint
|
||||
|
||||
import java.io.File
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package sbt
|
||||
package sbt.internal.librarymanagement
|
||||
package ivyint
|
||||
|
||||
import java.io.File
|
||||
|
|
@ -16,6 +16,7 @@ import org.apache.ivy.plugins.resolver._
|
|||
import org.apache.ivy.plugins.resolver.util.{ HasLatestStrategy, ResolvedResource }
|
||||
import org.apache.ivy.util.{ Message, StringUtils => IvyStringUtils }
|
||||
import sbt.util.Logger
|
||||
import sbt.librarymanagement._
|
||||
|
||||
private[sbt] case class SbtChainResolver(
|
||||
name: String,
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
package sbt
|
||||
package sbt.internal.librarymanagement
|
||||
package ivyint
|
||||
|
||||
import org.apache.ivy.core
|
||||
import core.module.descriptor.DefaultDependencyDescriptor
|
||||
import sbt.librarymanagement._
|
||||
|
||||
trait SbtDefaultDependencyDescriptor { self: DefaultDependencyDescriptor =>
|
||||
def dependencyModuleId: ModuleID
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
package sbt.mavenint
|
||||
package sbt.internal.librarymanagement
|
||||
package mavenint
|
||||
|
||||
import java.util.Properties
|
||||
import java.util.regex.Pattern
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
/* sbt -- Simple Build Tool
|
||||
* Copyright 2008, 2009, 2010 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
package sbt.librarymanagement
|
||||
|
||||
import java.io.File
|
||||
import java.net.URL
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package sbt
|
||||
package sbt.librarymanagement
|
||||
|
||||
import org.apache.ivy.plugins.circular.{ CircularDependencyStrategy, WarnCircularDependencyStrategy, IgnoreCircularDependencyStrategy, ErrorCircularDependencyStrategy }
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
/* sbt -- Simple Build Tool
|
||||
* Copyright 2008, 2009, 2010 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
package sbt.librarymanagement
|
||||
|
||||
import sbt.serialization._
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package sbt
|
||||
package sbt.librarymanagement
|
||||
|
||||
import DependencyFilter._
|
||||
import sbt.internal.librarymanagement.DependencyFilter._
|
||||
import sbt.util.{ Logger, Level }
|
||||
|
||||
/**
|
||||
|
|
@ -9,16 +9,8 @@ import sbt.util.{ Logger, Level }
|
|||
* library dependency graph by mistake, but it won't be caught by eviction.
|
||||
*/
|
||||
final case class ConflictWarning(label: String, level: Level.Value, failOnConflict: Boolean) {
|
||||
@deprecated("`filter` is no longer used", "0.13.0")
|
||||
val filter: ModuleFilter = (_: ModuleID) => false
|
||||
@deprecated("`group` is no longer used", "0.13.0")
|
||||
val group: ModuleID => String = ConflictWarning.org
|
||||
}
|
||||
object ConflictWarning {
|
||||
@deprecated("`group` and `filter` are no longer used. Use a standard Ivy conflict manager.", "0.13.0")
|
||||
def apply(label: String, filter: ModuleFilter, group: ModuleID => String, level: Level.Value, failOnConflict: Boolean): ConflictWarning =
|
||||
ConflictWarning(label, level, failOnConflict)
|
||||
|
||||
def disable: ConflictWarning = ConflictWarning("", Level.Debug, false)
|
||||
|
||||
private def org = (_: ModuleID).organization
|
||||
|
|
@ -26,9 +18,6 @@ object ConflictWarning {
|
|||
|
||||
def default(label: String): ConflictWarning = ConflictWarning(label, Level.Error, true)
|
||||
|
||||
@deprecated("Warning on evicted modules is no longer done, so this is the same as `default`. Use a standard Ivy conflict manager.", "0.13.0")
|
||||
def strict(label: String): ConflictWarning = ConflictWarning(label, Level.Error, true)
|
||||
|
||||
def apply(config: ConflictWarning, report: UpdateReport, log: Logger): Unit = {
|
||||
processCrossVersioned(config, report, log)
|
||||
}
|
||||
|
|
@ -1,12 +1,13 @@
|
|||
/* sbt -- Simple Build Tool
|
||||
* Copyright 2009 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
package sbt.librarymanagement
|
||||
|
||||
import java.io.File
|
||||
import org.apache.ivy.util.url.CredentialsStore
|
||||
import sbt.io.IO
|
||||
import sbt.util.Logger
|
||||
import sbt.internal.librarymanagement.IvyUtil
|
||||
|
||||
object Credentials {
|
||||
def apply(realm: String, host: String, userName: String, passwd: String): Credentials =
|
||||
|
|
@ -1,7 +1,8 @@
|
|||
package sbt
|
||||
package sbt.librarymanagement
|
||||
|
||||
import cross.CrossVersionUtil
|
||||
import sbt.serialization._
|
||||
import sbt.internal.librarymanagement.SbtExclusionRule
|
||||
import sbt.internal.librarymanagement.cross.CrossVersionUtil
|
||||
|
||||
final case class ScalaVersion(full: String, binary: String)
|
||||
|
||||
|
|
@ -1,10 +1,11 @@
|
|||
package sbt
|
||||
package sbt.librarymanagement
|
||||
|
||||
import collection.mutable
|
||||
import Configurations.Compile
|
||||
import ScalaArtifacts.{ LibraryID, CompilerID }
|
||||
import sbt.util.Logger
|
||||
import sbt.internal.util.ShowLines
|
||||
import sbt.internal.librarymanagement.{ IvySbt, InlineConfiguration, InlineConfigurationWithExcludes }
|
||||
|
||||
final class EvictionWarningOptions private[sbt] (
|
||||
val configurations: Seq[Configuration],
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
/* sbt -- Simple Build Tool
|
||||
* Copyright 2008, 2009, 2010 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
package sbt.librarymanagement
|
||||
|
||||
import java.io.File
|
||||
import java.net.{ URI, URL }
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
/* sbt -- Simple Build Tool
|
||||
* Copyright 2008, 2009, 2010 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
package sbt.librarymanagement
|
||||
|
||||
import java.util.Collections.emptyMap
|
||||
import scala.collection.mutable.HashSet
|
||||
|
|
@ -10,7 +10,6 @@ import org.apache.ivy.core.module.descriptor.{ DefaultExcludeRule, ExcludeRule }
|
|||
import org.apache.ivy.core.module.descriptor.{ DependencyDescriptor, DefaultModuleDescriptor, ModuleDescriptor, OverrideDependencyDescriptorMediator }
|
||||
import org.apache.ivy.core.module.id.{ ArtifactId, ModuleId, ModuleRevisionId }
|
||||
import org.apache.ivy.plugins.matcher.ExactPatternMatcher
|
||||
|
||||
import sbt.util.Logger
|
||||
|
||||
object ScalaArtifacts {
|
||||
|
|
@ -35,7 +34,7 @@ import ScalaArtifacts._
|
|||
|
||||
final case class IvyScala(scalaFullVersion: String, scalaBinaryVersion: String, configurations: Iterable[Configuration], checkExplicit: Boolean, filterImplicit: Boolean, overrideScalaVersion: Boolean, scalaOrganization: String = ScalaArtifacts.Organization)
|
||||
|
||||
private object IvyScala {
|
||||
private[sbt] object IvyScala {
|
||||
/** Performs checks/adds filters on Scala dependencies (if enabled in IvyScala). */
|
||||
def checkModule(module: DefaultModuleDescriptor, conf: String, log: Logger)(check: IvyScala): Unit = {
|
||||
if (check.checkExplicit)
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
/* sbt -- Simple Build Tool
|
||||
* Copyright 2008, 2009, 2010 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
package sbt.librarymanagement
|
||||
|
||||
import java.net.URL
|
||||
|
||||
import sbt.mavenint.SbtPomExtraProperties
|
||||
import sbt.internal.librarymanagement.mavenint.SbtPomExtraProperties
|
||||
import sbt.serialization._
|
||||
|
||||
final case class ModuleID(organization: String, name: String, revision: String, configurations: Option[String] = None, isChanging: Boolean = false, isTransitive: Boolean = true, isForce: Boolean = false, explicitArtifacts: Seq[Artifact] = Nil, exclusions: Seq[ExclusionRule] = Nil, extraAttributes: Map[String, String] = Map.empty, crossVersion: CrossVersion = CrossVersion.Disabled) {
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
/* sbt -- Simple Build Tool
|
||||
* Copyright 2008, 2009, 2010 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
package sbt.librarymanagement
|
||||
|
||||
import java.io.{ IOException, File }
|
||||
import java.net.URL
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package sbt
|
||||
package sbt.librarymanagement
|
||||
|
||||
import java.io.File
|
||||
import org.apache.ivy.plugins.resolver.DependencyResolver
|
||||
|
|
@ -1,12 +1,13 @@
|
|||
/* sbt -- Simple Build Tool
|
||||
* Copyright 2011 Mark Harrah
|
||||
*/
|
||||
package sbt
|
||||
package sbt.librarymanagement
|
||||
|
||||
import java.io.File
|
||||
import java.net.URL
|
||||
import java.{ util => ju }
|
||||
import sbt.serialization._
|
||||
import sbt.internal.librarymanagement.{ DependencyFilter, ConfigurationFilter, ModuleFilter, ArtifactFilter }
|
||||
|
||||
/**
|
||||
* Provides information about resolution of a single configuration.
|
||||
|
|
@ -225,14 +226,15 @@ object UpdateReport {
|
|||
}
|
||||
|
||||
import DependencyFilter._
|
||||
|
||||
/** Obtains all successfully retrieved files in all configurations and modules. */
|
||||
def allFiles: Seq[File] = matching(DependencyFilter.allPass)
|
||||
|
||||
/** Obtains all successfully retrieved files in configurations, modules, and artifacts matching the specified filter. */
|
||||
def matching(f: DependencyFilter): Seq[File] = select0(f).distinct
|
||||
private[sbt] def matching(f: DependencyFilter): Seq[File] = select0(f).distinct
|
||||
|
||||
/** Obtains all successfully retrieved files matching all provided filters. An unspecified argument matches all files. */
|
||||
def select(configuration: ConfigurationFilter = configurationFilter(), module: ModuleFilter = moduleFilter(), artifact: ArtifactFilter = artifactFilter()): Seq[File] =
|
||||
private[sbt] def select(configuration: ConfigurationFilter = configurationFilter(), module: ModuleFilter = moduleFilter(), artifact: ArtifactFilter = artifactFilter()): Seq[File] =
|
||||
matching(DependencyFilter.make(configuration, module, artifact))
|
||||
|
||||
private[this] def select0(f: DependencyFilter): Seq[File] =
|
||||
|
|
@ -242,7 +244,7 @@ object UpdateReport {
|
|||
}
|
||||
|
||||
/** Constructs a new report that only contains files matching the specified filter.*/
|
||||
def filter(f: DependencyFilter): UpdateReport =
|
||||
private[sbt] def filter(f: DependencyFilter): UpdateReport =
|
||||
moduleReportMap { (configuration, modReport) =>
|
||||
modReport.copy(
|
||||
artifacts = modReport.artifacts filter { case (art, file) => f(configuration, modReport.module, art) },
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package sbt
|
||||
package sbt.librarymanagement
|
||||
|
||||
final class VersionNumber private[sbt] (
|
||||
val numbers: Seq[Long],
|
||||
|
|
@ -1,13 +1,15 @@
|
|||
package sbt
|
||||
package sbt.internal.librarymanagement
|
||||
|
||||
import sbt.io.Path._, Configurations._
|
||||
import sbt.io.Path._
|
||||
import sbt.io.IO
|
||||
import java.io.File
|
||||
import cross.CrossVersionUtil
|
||||
import sbt.ivyint.SbtChainResolver
|
||||
import sbt.util.Logger
|
||||
import sbt.internal.util.ConsoleLogger
|
||||
import sbt.internal.util.UnitSpec
|
||||
import sbt.librarymanagement._
|
||||
import ivyint.SbtChainResolver
|
||||
import Configurations._
|
||||
|
||||
trait BaseIvySpecification extends UnitSpec {
|
||||
def currentBase: File = new File(".")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package sbt
|
||||
package sbt.internal.librarymanagement
|
||||
|
||||
import sbt.internal.util.ShowLines
|
||||
import sbt.librarymanagement._
|
||||
|
||||
class CachedResolutionSpec extends BaseIvySpecification {
|
||||
import ShowLines._
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package sbt
|
||||
package sbt.internal.librarymanagement
|
||||
|
||||
import java.io.File
|
||||
import java.util.concurrent.Callable
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package sbt
|
||||
package sbt.librarymanagement
|
||||
|
||||
import java.io.File
|
||||
import sbt.internal.util.UnitSpec
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
package sbt.internal.librarymanagement
|
||||
|
||||
import java.io.File
|
||||
import org.apache.ivy.core.module.descriptor.{ Artifact => IvyArtifact }
|
||||
import org.apache.ivy.core.module.id.ModuleRevisionId
|
||||
import org.apache.ivy.core.resolve.ResolveOptions
|
||||
import sbt._
|
||||
import sbt.librarymanagement._
|
||||
import sbt.io.IO.withTemporaryDirectory
|
||||
import sbt.util.Logger
|
||||
import sbt.internal.util.ConsoleLogger
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package sbt
|
||||
package sbt.librarymanagement
|
||||
|
||||
import java.net.URL
|
||||
import java.io.File
|
||||
|
|
@ -7,13 +7,13 @@ import sbt.internal.util.UnitSpec
|
|||
|
||||
class DMSerializationSpec extends UnitSpec {
|
||||
"CrossVersion.full" should "roundtrip" in {
|
||||
roundtripStr(CrossVersion.full: sbt.CrossVersion)
|
||||
roundtripStr(CrossVersion.full: CrossVersion)
|
||||
}
|
||||
"CrossVersion.binary" should "roundtrip" in {
|
||||
roundtripStr(CrossVersion.binary: sbt.CrossVersion)
|
||||
roundtripStr(CrossVersion.binary: CrossVersion)
|
||||
}
|
||||
"CrossVersion.Disabled" should "roundtrip" in {
|
||||
roundtrip(CrossVersion.Disabled: sbt.CrossVersion)
|
||||
roundtrip(CrossVersion.Disabled: CrossVersion)
|
||||
}
|
||||
"""Artifact("foo")""" should "roundtrip" in {
|
||||
roundtrip(Artifact("foo"))
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
package sbt
|
||||
package sbt.librarymanagement
|
||||
|
||||
import sbt.internal.librarymanagement.BaseIvySpecification
|
||||
|
||||
class EvictionWarningSpec extends BaseIvySpecification {
|
||||
// This is a specification to check the eviction warnings
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package sbt
|
||||
package sbt.internal.librarymanagement
|
||||
|
||||
import sbt.internal.util.UnitSpec
|
||||
import sbt.librarymanagement._
|
||||
|
||||
// This is a specification to check the inconsistent duplicate warnings
|
||||
class InconsistentDuplicateSpec extends UnitSpec {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package sbt
|
||||
package sbt.internal.librarymanagement
|
||||
|
||||
import java.io.File
|
||||
import sbt.util.Logger
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
package sbt.librarymanagement
|
||||
|
||||
import java.net.URL
|
||||
|
||||
import sbt._
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package sbt
|
||||
package sbt.librarymanagement
|
||||
|
||||
import sbt.internal.util.UnitSpec
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue