mirror of https://github.com/sbt/sbt.git
commit
3c30c9762c
|
|
@ -113,4 +113,7 @@ package object compatibility {
|
|||
|
||||
links.result()
|
||||
}
|
||||
|
||||
def regexLookbehind: String = ":"
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,4 +79,6 @@ package object compatibility {
|
|||
.toVector
|
||||
.map(_.attr("href"))
|
||||
|
||||
def regexLookbehind: String = "<="
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package coursier.core
|
||||
|
||||
import java.util.regex.Pattern.quote
|
||||
|
||||
import coursier.core.compatibility._
|
||||
|
||||
object Parse {
|
||||
|
|
@ -63,13 +64,28 @@ object Parse {
|
|||
} yield itv
|
||||
}
|
||||
|
||||
private val multiVersionIntervalSplit = ("(?" + regexLookbehind + "[" + quote("])") + "]),(?=[" + quote("([") + "])").r
|
||||
|
||||
def multiVersionInterval(s: String): Option[VersionInterval] = {
|
||||
|
||||
// TODO Use a full-fledged (fastparsed-based) parser for this and versionInterval above
|
||||
|
||||
val openCount = s.count(c => c == '[' || c == '(')
|
||||
val closeCount = s.count(c => c == ']' || c == ')')
|
||||
|
||||
if (openCount == closeCount && openCount >= 1)
|
||||
versionInterval(multiVersionIntervalSplit.split(s).last)
|
||||
else
|
||||
None
|
||||
}
|
||||
|
||||
def versionConstraint(s: String): Option[VersionConstraint] = {
|
||||
def noConstraint = if (s.isEmpty) Some(VersionConstraint.all) else None
|
||||
|
||||
noConstraint
|
||||
.orElse(ivyLatestSubRevisionInterval(s).map(VersionConstraint.interval))
|
||||
.orElse(version(s).map(VersionConstraint.preferred))
|
||||
.orElse(versionInterval(s).map(VersionConstraint.interval))
|
||||
.orElse(versionInterval(s).orElse(multiVersionInterval(s)).map(VersionConstraint.interval))
|
||||
}
|
||||
|
||||
val fallbackConfigRegex = {
|
||||
|
|
|
|||
|
|
@ -135,6 +135,7 @@ final case class IvyRepository(
|
|||
findNoInverval(module, version, fetch)
|
||||
case Some(revisionListingPattern) =>
|
||||
Parse.versionInterval(version)
|
||||
.orElse(Parse.multiVersionInterval(version))
|
||||
.orElse(Parse.ivyLatestSubRevisionInterval(version))
|
||||
.filter(_.isValid) match {
|
||||
case None =>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,16 @@ import scala.language.higherKinds
|
|||
import scalaz._
|
||||
|
||||
object MavenRepository {
|
||||
val SnapshotTimestamp = "(.*-)?[0-9]{8}\\.[0-9]{6}-[0-9]+".r
|
||||
|
||||
def isSnapshot(version: String): Boolean =
|
||||
version.endsWith("SNAPSHOT") || SnapshotTimestamp.findFirstIn(version).nonEmpty
|
||||
|
||||
def toBaseVersion(version: String): String = version match {
|
||||
case SnapshotTimestamp(null) => "SNAPSHOT"
|
||||
case SnapshotTimestamp(base) => base + "SNAPSHOT"
|
||||
case _ => version
|
||||
}
|
||||
|
||||
def ivyLikePath(
|
||||
org: String,
|
||||
|
|
@ -76,14 +86,11 @@ final case class MavenRepository(
|
|||
val root0 = if (root.endsWith("/")) root else root + "/"
|
||||
val source = MavenSource(root0, changing, sbtAttrStub, authentication)
|
||||
|
||||
private def modulePath(
|
||||
module: Module,
|
||||
version: String
|
||||
): Seq[String] =
|
||||
module.organization.split('.').toSeq ++ Seq(
|
||||
dirModuleName(module, sbtAttrStub),
|
||||
version
|
||||
)
|
||||
private def modulePath(module: Module): Seq[String] =
|
||||
module.organization.split('.').toSeq :+ dirModuleName(module, sbtAttrStub)
|
||||
|
||||
private def moduleVersionPath(module: Module, version: String): Seq[String] =
|
||||
modulePath(module) :+ toBaseVersion(version)
|
||||
|
||||
private def urlFor(path: Seq[String]): String =
|
||||
root0 + path.map(encodeURIComponent).mkString("/")
|
||||
|
|
@ -94,7 +101,7 @@ final case class MavenRepository(
|
|||
versioningValue: Option[String]
|
||||
): Artifact = {
|
||||
|
||||
val path = modulePath(module, version) :+
|
||||
val path = moduleVersionPath(module, version) :+
|
||||
s"${module.name}-${versioningValue getOrElse version}.pom"
|
||||
|
||||
Artifact(
|
||||
|
|
@ -102,7 +109,7 @@ final case class MavenRepository(
|
|||
Map.empty,
|
||||
Map.empty,
|
||||
Attributes("pom", ""),
|
||||
changing = changing.getOrElse(version.contains("-SNAPSHOT")),
|
||||
changing = changing.getOrElse(isSnapshot(version)),
|
||||
authentication = authentication
|
||||
)
|
||||
.withDefaultChecksums
|
||||
|
|
@ -136,7 +143,7 @@ final case class MavenRepository(
|
|||
version: String
|
||||
): Option[Artifact] = {
|
||||
|
||||
val path = modulePath(module, version) :+ "maven-metadata.xml"
|
||||
val path = moduleVersionPath(module, version) :+ "maven-metadata.xml"
|
||||
|
||||
val artifact =
|
||||
Artifact(
|
||||
|
|
@ -153,6 +160,52 @@ final case class MavenRepository(
|
|||
Some(artifact)
|
||||
}
|
||||
|
||||
private def versionsFromListing[F[_]](
|
||||
module: Module,
|
||||
fetch: Fetch.Content[F]
|
||||
)(implicit
|
||||
F: Monad[F]
|
||||
): EitherT[F, String, Versions] = {
|
||||
|
||||
val listingUrl = urlFor(modulePath(module)) + "/"
|
||||
|
||||
// version listing -> changing (changes as new versions are released)
|
||||
val listingArtifact = artifactFor(listingUrl, changing = true)
|
||||
|
||||
fetch(listingArtifact).flatMap { listing =>
|
||||
|
||||
val files = WebPage.listFiles(listingUrl, listing)
|
||||
val rawVersions = WebPage.listDirectories(listingUrl, listing)
|
||||
|
||||
val res =
|
||||
if (files.contains("maven-metadata.xml"))
|
||||
-\/("maven-metadata.xml found, not listing version from directory listing")
|
||||
else if (rawVersions.isEmpty)
|
||||
-\/(s"No versions found at $listingUrl")
|
||||
else {
|
||||
val parsedVersions = rawVersions.map(Version(_))
|
||||
val nonPreVersions = parsedVersions.filter(_.items.forall {
|
||||
case q: Version.Qualifier => q.level >= 0
|
||||
case _ => true
|
||||
})
|
||||
|
||||
if (nonPreVersions.isEmpty)
|
||||
-\/(s"Found only pre-versions at $listingUrl")
|
||||
else {
|
||||
val latest = nonPreVersions.max
|
||||
\/-(Versions(
|
||||
latest.repr,
|
||||
latest.repr,
|
||||
nonPreVersions.map(_.repr).toList,
|
||||
None
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
EitherT(F.point(res))
|
||||
}
|
||||
}
|
||||
|
||||
def versions[F[_]](
|
||||
module: Module,
|
||||
fetch: Fetch.Content[F]
|
||||
|
|
@ -210,6 +263,7 @@ final case class MavenRepository(
|
|||
snapshotVersioning(module, version, fetch).flatMap { snapshotVersioning =>
|
||||
val versioningOption =
|
||||
mavenVersioning(snapshotVersioning, "", "jar")
|
||||
.orElse(mavenVersioning(snapshotVersioning, "", "pom"))
|
||||
.orElse(mavenVersioning(snapshotVersioning, "", ""))
|
||||
|
||||
versioningOption match {
|
||||
|
|
@ -224,7 +278,7 @@ final case class MavenRepository(
|
|||
}
|
||||
|
||||
val res = F.bind(findVersioning(module, version, None, fetch).run) { eitherProj =>
|
||||
if (eitherProj.isLeft && version.contains("-SNAPSHOT"))
|
||||
if (eitherProj.isLeft && isSnapshot(version))
|
||||
F.map(withSnapshotVersioning.run)(eitherProj0 =>
|
||||
if (eitherProj0.isLeft)
|
||||
eitherProj
|
||||
|
|
@ -239,6 +293,16 @@ final case class MavenRepository(
|
|||
F.map(res)(_.map(proj => proj.copy(actualVersionOpt = Some(version))))
|
||||
}
|
||||
|
||||
private def artifactFor(url: String, changing: Boolean) =
|
||||
Artifact(
|
||||
url,
|
||||
Map.empty,
|
||||
Map.empty,
|
||||
Attributes("", ""),
|
||||
changing = changing,
|
||||
authentication
|
||||
)
|
||||
|
||||
def findVersioning[F[_]](
|
||||
module: Module,
|
||||
version: String,
|
||||
|
|
@ -255,16 +319,6 @@ final case class MavenRepository(
|
|||
proj <- Pom.project(xml, relocationAsDependency = true)
|
||||
} yield proj
|
||||
|
||||
def artifactFor(url: String) =
|
||||
Artifact(
|
||||
url,
|
||||
Map.empty,
|
||||
Map.empty,
|
||||
Attributes("", ""),
|
||||
changing = changing.getOrElse(version.contains("-SNAPSHOT")),
|
||||
authentication
|
||||
)
|
||||
|
||||
def isArtifact(fileName: String, prefix: String): Option[(String, String)] =
|
||||
// TODO There should be a regex for that...
|
||||
if (fileName.startsWith(prefix)) {
|
||||
|
|
@ -287,7 +341,9 @@ final case class MavenRepository(
|
|||
|
||||
val projectArtifact0 = projectArtifact(module, version, versioningValue)
|
||||
|
||||
val listFilesUrl = urlFor(modulePath(module, version)) + "/"
|
||||
val listFilesUrl = urlFor(moduleVersionPath(module, version)) + "/"
|
||||
|
||||
val changing0 = changing.getOrElse(isSnapshot(version))
|
||||
|
||||
val listFilesArtifact =
|
||||
Artifact(
|
||||
|
|
@ -297,7 +353,7 @@ final case class MavenRepository(
|
|||
"metadata" -> projectArtifact0
|
||||
),
|
||||
Attributes("", ""),
|
||||
changing = changing.getOrElse(version.contains("-SNAPSHOT")),
|
||||
changing = changing0,
|
||||
authentication
|
||||
)
|
||||
|
||||
|
|
@ -313,7 +369,7 @@ final case class MavenRepository(
|
|||
|
||||
for {
|
||||
str <- fetch(requiringDirListingProjectArtifact)
|
||||
rawListFilesPageOpt <- EitherT(F.map(fetch(artifactFor(listFilesUrl)).run) {
|
||||
rawListFilesPageOpt <- EitherT(F.map(fetch(artifactFor(listFilesUrl, changing0)).run) {
|
||||
e => \/-(e.toOption): String \/ Option[String]
|
||||
})
|
||||
proj0 <- EitherT(F.point[String \/ Project](parseRawPom(str)))
|
||||
|
|
@ -378,12 +434,20 @@ final case class MavenRepository(
|
|||
): EitherT[F, String, (Artifact.Source, Project)] = {
|
||||
|
||||
Parse.versionInterval(version)
|
||||
.orElse(Parse.multiVersionInterval(version))
|
||||
.orElse(Parse.ivyLatestSubRevisionInterval(version))
|
||||
.filter(_.isValid) match {
|
||||
case None =>
|
||||
findNoInterval(module, version, fetch).map((source, _))
|
||||
case Some(itv) =>
|
||||
versions(module, fetch).flatMap { versions0 =>
|
||||
def v = versions(module, fetch)
|
||||
val v0 =
|
||||
if (changing.forall(!_) && module.attributes.contains("scalaVersion") && module.attributes.contains("sbtVersion"))
|
||||
versionsFromListing(module, fetch).orElse(v)
|
||||
else
|
||||
v
|
||||
|
||||
v0.flatMap { versions0 =>
|
||||
val eitherVersion = {
|
||||
val release = Version(versions0.release)
|
||||
|
||||
|
|
|
|||
|
|
@ -36,11 +36,11 @@ final case class MavenSource(
|
|||
|
||||
val path = dependency.module.organization.split('.').toSeq ++ Seq(
|
||||
MavenRepository.dirModuleName(dependency.module, sbtAttrStub),
|
||||
project.actualVersion,
|
||||
toBaseVersion(project.actualVersion),
|
||||
s"${dependency.module.name}-${versioning getOrElse project.actualVersion}${Some(publication.classifier).filter(_.nonEmpty).map("-" + _).mkString}.${publication.ext}"
|
||||
)
|
||||
|
||||
val changing0 = changing.getOrElse(project.actualVersion.contains("-SNAPSHOT"))
|
||||
val changing0 = changing.getOrElse(isSnapshot(project.actualVersion))
|
||||
var artifact =
|
||||
Artifact(
|
||||
root + path.mkString("/"),
|
||||
|
|
@ -149,7 +149,7 @@ final case class MavenSource(
|
|||
s"${dependency.module.name}-${versioning getOrElse project.actualVersion}${Some(publication.classifier).filter(_.nonEmpty).map("-" + _).mkString}.${publication.ext}"
|
||||
)
|
||||
|
||||
val changing0 = changing.getOrElse(project.actualVersion.contains("-SNAPSHOT"))
|
||||
val changing0 = changing.getOrElse(isSnapshot(project.actualVersion))
|
||||
|
||||
val extra0 = extra.mapValues(_.artifact(versioningType)).iterator.toMap
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,9 @@ object Pom {
|
|||
)
|
||||
|
||||
val jdk = text(node, "jdk", "").toOption.flatMap { s =>
|
||||
Parse.versionInterval(s).map(-\/(_))
|
||||
Parse.versionInterval(s)
|
||||
.orElse(Parse.multiVersionInterval(s))
|
||||
.map(-\/(_))
|
||||
.orElse(Parse.version(s).map(v => \/-(Seq(v))))
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,10 +4,3 @@ libraryDependencies += ("com.rengwuxian.materialedittext" % "library" % "2.1.4")
|
|||
.exclude("com.android.support", "support-v4")
|
||||
.exclude("com.android.support", "support-annotations")
|
||||
.exclude("com.android.support", "appcompat-v7")
|
||||
|
||||
coursierCachePolicies := {
|
||||
if (sys.props("os.name").startsWith("Windows"))
|
||||
coursierCachePolicies.value
|
||||
else
|
||||
Seq(coursier.CachePolicy.ForceDownload)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,4 @@ resolvers += "authenticated" at "http://localhost:8080"
|
|||
|
||||
coursierCredentials += "authenticated" -> coursier.Credentials(file("credentials"))
|
||||
|
||||
coursierCachePolicies := {
|
||||
if (sys.props("os.name").startsWith("Windows"))
|
||||
coursierCachePolicies.value
|
||||
else
|
||||
Seq(coursier.CachePolicy.ForceDownload)
|
||||
}
|
||||
|
||||
libraryDependencies += "com.abc" % "test" % "0.1"
|
||||
|
|
|
|||
|
|
@ -5,11 +5,4 @@ resolvers += "authenticated" at "http://localhost:8080"
|
|||
coursierUseSbtCredentials := true
|
||||
credentials += Credentials("", "localhost", "user", "pass")
|
||||
|
||||
coursierCachePolicies := {
|
||||
if (sys.props("os.name").startsWith("Windows"))
|
||||
coursierCachePolicies.value
|
||||
else
|
||||
Seq(coursier.CachePolicy.ForceDownload)
|
||||
}
|
||||
|
||||
libraryDependencies += "com.abc" % "test" % "0.1"
|
||||
|
|
|
|||
|
|
@ -4,11 +4,4 @@ resolvers += "authenticated" at "http://localhost:8080"
|
|||
|
||||
coursierCredentials += "authenticated" -> coursier.Credentials("user", "pass")
|
||||
|
||||
coursierCachePolicies := {
|
||||
if (sys.props("os.name").startsWith("Windows"))
|
||||
coursierCachePolicies.value
|
||||
else
|
||||
Seq(coursier.CachePolicy.ForceDownload)
|
||||
}
|
||||
|
||||
libraryDependencies += "com.abc" % "test" % "0.1"
|
||||
|
|
|
|||
|
|
@ -8,13 +8,6 @@ organization := "io.get-coursier.test"
|
|||
name := "sbt-coursier-exclude-dependencies"
|
||||
version := "0.1.0-SNAPSHOT"
|
||||
|
||||
coursierCachePolicies := {
|
||||
if (sys.props("os.name").startsWith("Windows"))
|
||||
coursierCachePolicies.value
|
||||
else
|
||||
Seq(coursier.CachePolicy.ForceDownload)
|
||||
}
|
||||
|
||||
libraryDependencies += "com.github.alexarchambault" %% "argonaut-shapeless_6.1" % "1.0.0-RC1"
|
||||
|
||||
excludeDependencies += SbtExclusionRule("com.chuusai", "shapeless_2.11")
|
||||
|
|
|
|||
|
|
@ -16,11 +16,5 @@ lazy val root = project
|
|||
|
||||
|
||||
lazy val sharedSettings = Seq(
|
||||
scalaVersion := "2.11.8",
|
||||
coursierCachePolicies := {
|
||||
if (sys.props("os.name").startsWith("Windows"))
|
||||
coursierCachePolicies.value
|
||||
else
|
||||
Seq(coursier.CachePolicy.ForceDownload)
|
||||
}
|
||||
scalaVersion := "2.11.8"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,10 +1,3 @@
|
|||
scalaVersion := "2.11.8"
|
||||
|
||||
coursierCachePolicies := {
|
||||
if (sys.props("os.name").startsWith("Windows"))
|
||||
coursierCachePolicies.value
|
||||
else
|
||||
Seq(coursier.CachePolicy.ForceDownload)
|
||||
}
|
||||
|
||||
libraryDependencies += "ccl.northwestern.edu" % "netlogo" % "5.3.1" % "provided" from s"https://github.com/NetLogo/NetLogo/releases/download/5.3.1/NetLogo.jar"
|
||||
|
|
|
|||
|
|
@ -1,12 +1,5 @@
|
|||
scalaVersion := "2.11.8"
|
||||
|
||||
coursierCachePolicies := {
|
||||
if (sys.props("os.name").startsWith("Windows"))
|
||||
coursierCachePolicies.value
|
||||
else
|
||||
Seq(coursier.CachePolicy.ForceDownload)
|
||||
}
|
||||
|
||||
libraryDependencies += "com.chuusai" %% "shapeless" % "2.3.41" from {
|
||||
|
||||
val f = file(sys.props("sbttest.base")) / "sbt-coursier" / "from" / "shapeless_2.11-2.3.0.jar"
|
||||
|
|
@ -35,4 +28,4 @@ libraryDependencies += "com.chuusai" %% "shapeless" % "2.3.41" from {
|
|||
}
|
||||
|
||||
f.toURI.toString
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,3 @@
|
|||
scalaVersion := "2.11.8"
|
||||
|
||||
libraryDependencies += "org.apache.hadoop" % "hadoop-yarn-server-resourcemanager" % "2.7.1"
|
||||
|
||||
coursierCachePolicies := {
|
||||
if (sys.props("os.name").startsWith("Windows"))
|
||||
coursierCachePolicies.value
|
||||
else
|
||||
Seq(coursier.CachePolicy.ForceDownload)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,11 +20,5 @@ lazy val root = project
|
|||
|
||||
|
||||
lazy val sharedSettings = Seq(
|
||||
scalaVersion := "2.11.8",
|
||||
coursierCachePolicies := {
|
||||
if (sys.props("os.name").startsWith("Windows"))
|
||||
coursierCachePolicies.value
|
||||
else
|
||||
Seq(coursier.CachePolicy.ForceDownload)
|
||||
}
|
||||
scalaVersion := "2.11.8"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,12 +1,6 @@
|
|||
|
||||
lazy val sharedSettings = Seq(
|
||||
scalaVersion := "2.11.8",
|
||||
coursierCachePolicies := {
|
||||
if (sys.props("os.name").startsWith("Windows"))
|
||||
coursierCachePolicies.value
|
||||
else
|
||||
Seq(coursier.CachePolicy.ForceDownload)
|
||||
}
|
||||
scalaVersion := "2.11.8"
|
||||
)
|
||||
|
||||
/** Module with the same Maven coordinates as shapeless 2.3.1 */
|
||||
|
|
|
|||
|
|
@ -1,12 +1,5 @@
|
|||
scalaVersion := "2.11.8"
|
||||
|
||||
coursierCachePolicies := {
|
||||
if (sys.props("os.name").startsWith("Windows"))
|
||||
coursierCachePolicies.value
|
||||
else
|
||||
Seq(coursier.CachePolicy.ForceDownload)
|
||||
}
|
||||
|
||||
resolvers += Resolver.url(
|
||||
"webjars-bintray",
|
||||
new URL("https://dl.bintray.com/scalaz/releases/")
|
||||
|
|
|
|||
|
|
@ -3,10 +3,3 @@ scalaVersion := "2.11.8"
|
|||
libraryDependencies += "org.apache.spark" %% "spark-sql" % "1.6.2"
|
||||
|
||||
mavenProfiles += "hadoop-2.6"
|
||||
|
||||
coursierCachePolicies := {
|
||||
if (sys.props("os.name").startsWith("Windows"))
|
||||
coursierCachePolicies.value
|
||||
else
|
||||
Seq(coursier.CachePolicy.ForceDownload)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1 @@
|
|||
scalaVersion := appConfiguration.value.provider.scalaProvider.version
|
||||
|
||||
coursierCachePolicies := {
|
||||
if (sys.props("os.name").startsWith("Windows"))
|
||||
coursierCachePolicies.value
|
||||
else
|
||||
Seq(coursier.CachePolicy.ForceDownload)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,5 @@
|
|||
scalaVersion := appConfiguration.value.provider.scalaProvider.version
|
||||
|
||||
coursierCachePolicies := {
|
||||
if (sys.props("os.name").startsWith("Windows"))
|
||||
coursierCachePolicies.value
|
||||
else
|
||||
Seq(coursier.CachePolicy.ForceDownload)
|
||||
}
|
||||
|
||||
lazy val updateClassifiersCheck = TaskKey[Unit]("updateClassifiersCheck")
|
||||
|
||||
updateClassifiersCheck := {
|
||||
|
|
@ -43,4 +36,4 @@ updateClassifiersCheck := {
|
|||
|
||||
ensureHasClassifierArtifact("javadoc")
|
||||
ensureHasClassifierArtifact("sources")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1 @@
|
|||
scalaVersion := "2.11.8"
|
||||
|
||||
coursierCachePolicies := {
|
||||
if (sys.props("os.name").startsWith("Windows"))
|
||||
coursierCachePolicies.value
|
||||
else
|
||||
Seq(coursier.CachePolicy.ForceDownload)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,10 +4,3 @@ scalacOptions += "-Xexperimental"
|
|||
|
||||
// no effect, as the right version is forced anyway (to scalaVersion.value)
|
||||
libraryDependencies += "org.typelevel" % "scala-library" % "2.11.12345"
|
||||
|
||||
coursierCachePolicies := {
|
||||
if (sys.props("os.name").startsWith("Windows"))
|
||||
coursierCachePolicies.value
|
||||
else
|
||||
Seq(coursier.CachePolicy.ForceDownload)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,3 @@
|
|||
scalaOrganization := "org.typelevel"
|
||||
scalaVersion := "2.11.7"
|
||||
scalacOptions += "-Xexperimental"
|
||||
|
||||
coursierCachePolicies := {
|
||||
if (sys.props("os.name").startsWith("Windows"))
|
||||
coursierCachePolicies.value
|
||||
else
|
||||
Seq(coursier.CachePolicy.ForceDownload)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,3 @@
|
|||
scalaVersion := "2.11.8"
|
||||
|
||||
libraryDependencies += "org.apache.zookeeper" % "zookeeper" % "3.5.0-alpha"
|
||||
|
||||
coursierCachePolicies := {
|
||||
if (sys.props("os.name").startsWith("Windows"))
|
||||
coursierCachePolicies.value
|
||||
else
|
||||
Seq(coursier.CachePolicy.ForceDownload)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,4 +48,7 @@ package object compatibility {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
def tryCreate(path: String, content: String): Unit = {}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ object DirectoryListingTests extends TestSuite {
|
|||
module,
|
||||
version,
|
||||
"jar",
|
||||
extraRepo = Some(withListingRepo)
|
||||
extraRepos = Seq(withListingRepo)
|
||||
) {
|
||||
artifacts =>
|
||||
assert(artifacts.length == 1)
|
||||
|
|
@ -38,7 +38,7 @@ object DirectoryListingTests extends TestSuite {
|
|||
module,
|
||||
version,
|
||||
"jar-foo",
|
||||
extraRepo = Some(withListingRepo)
|
||||
extraRepos = Seq(withListingRepo)
|
||||
) {
|
||||
artifacts =>
|
||||
assert(artifacts.length == 1)
|
||||
|
|
@ -50,7 +50,7 @@ object DirectoryListingTests extends TestSuite {
|
|||
module,
|
||||
version,
|
||||
"jar",
|
||||
extraRepo = Some(withoutListingRepo)
|
||||
extraRepos = Seq(withoutListingRepo)
|
||||
) {
|
||||
artifacts =>
|
||||
assert(artifacts.length == 1)
|
||||
|
|
@ -60,7 +60,7 @@ object DirectoryListingTests extends TestSuite {
|
|||
module,
|
||||
version,
|
||||
"jar-foo",
|
||||
extraRepo = Some(withoutListingRepo)
|
||||
extraRepos = Seq(withoutListingRepo)
|
||||
) {
|
||||
artifacts =>
|
||||
assert(artifacts.length == 0)
|
||||
|
|
|
|||
|
|
@ -14,19 +14,19 @@ object IvyLocalTests extends TestSuite {
|
|||
val module = Module("io.get-coursier", "coursier_2.11")
|
||||
val version = coursier.util.Properties.version
|
||||
|
||||
val extraRepo = Some(Cache.ivy2Local)
|
||||
val extraRepos = Seq(Cache.ivy2Local)
|
||||
|
||||
// Assuming this module (and the sub-projects it depends on) is published locally
|
||||
'resolution - CentralTests.resolutionCheck(
|
||||
module, version,
|
||||
extraRepo
|
||||
extraRepos
|
||||
)
|
||||
|
||||
'uniqueArtifacts - async {
|
||||
|
||||
val res = await(CentralTests.resolve(
|
||||
Set(Dependency(Module("io.get-coursier", "coursier-cli_2.11"), version, transitive = false)),
|
||||
extraRepo = extraRepo
|
||||
extraRepos = extraRepos
|
||||
))
|
||||
|
||||
val artifacts = res.dependencyClassifiersArtifacts(Seq("standalone"))
|
||||
|
|
@ -43,7 +43,7 @@ object IvyLocalTests extends TestSuite {
|
|||
'javadocSources - async {
|
||||
val res = await(CentralTests.resolve(
|
||||
Set(Dependency(module, version)),
|
||||
extraRepo = extraRepo
|
||||
extraRepos = extraRepos
|
||||
))
|
||||
|
||||
val artifacts = res.dependencyArtifacts.filter(_._2.`type` == "jar").map(_._2.url)
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ object IvyTests extends TestSuite {
|
|||
"org.scala-js", "sbt-scalajs", Map("sbtVersion" -> "0.13", "scalaVersion" -> "2.10")
|
||||
),
|
||||
version = "0.6.6",
|
||||
extraRepo = Some(sbtRepo),
|
||||
extraRepos = Seq(sbtRepo),
|
||||
configuration = "default(compile)"
|
||||
)
|
||||
}
|
||||
|
|
@ -43,10 +43,10 @@ object IvyTests extends TestSuite {
|
|||
* - CentralTests.resolutionCheck(
|
||||
module = mod,
|
||||
version = ver,
|
||||
extraRepo = Some(sbtRepo)
|
||||
extraRepos = Seq(sbtRepo)
|
||||
)
|
||||
|
||||
* - CentralTests.withArtifact(mod, ver, "jar", extraRepo = Some(sbtRepo)) { artifact =>
|
||||
* - CentralTests.withArtifact(mod, ver, "jar", extraRepos = Seq(sbtRepo)) { artifact =>
|
||||
assert(artifact.url == expectedArtifactUrl)
|
||||
}
|
||||
}
|
||||
|
|
@ -73,7 +73,7 @@ object IvyTests extends TestSuite {
|
|||
* - CentralTests.withArtifacts(
|
||||
dep = dep,
|
||||
artifactType = "jar",
|
||||
extraRepo = Some(repo),
|
||||
extraRepos = Seq(repo),
|
||||
classifierOpt = None
|
||||
) {
|
||||
case Seq(artifact) =>
|
||||
|
|
@ -85,7 +85,7 @@ object IvyTests extends TestSuite {
|
|||
* - CentralTests.withArtifacts(
|
||||
dep = dep.copy(configuration = "test"),
|
||||
artifactType = "jar",
|
||||
extraRepo = Some(repo),
|
||||
extraRepos = Seq(repo),
|
||||
classifierOpt = None
|
||||
) {
|
||||
case Seq(artifact1, artifact2) =>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ object MavenTests extends TestSuite {
|
|||
* - CentralTests.withArtifacts(
|
||||
dep = dep,
|
||||
artifactType = "jar",
|
||||
extraRepo = Some(repo),
|
||||
extraRepos = Seq(repo),
|
||||
classifierOpt = None
|
||||
) {
|
||||
case Seq(artifact) =>
|
||||
|
|
@ -40,7 +40,7 @@ object MavenTests extends TestSuite {
|
|||
* - CentralTests.withArtifacts(
|
||||
dep = dep,
|
||||
artifactType = "src",
|
||||
extraRepo = Some(repo),
|
||||
extraRepos = Seq(repo),
|
||||
classifierOpt = Some("sources")
|
||||
) {
|
||||
case Seq(artifact) =>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package coursier.test
|
||||
|
||||
import java.io.{FileNotFoundException, InputStream}
|
||||
import java.nio.charset.StandardCharsets
|
||||
import java.nio.file.{Files, Paths}
|
||||
|
||||
import coursier.util.TestEscape
|
||||
|
|
@ -71,4 +71,17 @@ package object compatibility {
|
|||
}
|
||||
}
|
||||
|
||||
private lazy val baseResources = {
|
||||
val dir = Paths.get("tests/shared/src/test/resources")
|
||||
assert(Files.isDirectory(dir))
|
||||
dir
|
||||
}
|
||||
|
||||
def tryCreate(path: String, content: String): Unit =
|
||||
if (fillChunks) {
|
||||
val path0 = baseResources.resolve(path)
|
||||
Files.createDirectories(path0.getParent)
|
||||
Files.write(path0, content.getBytes(StandardCharsets.UTF_8))
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit f932032f9cf013a6d7fe205b2a8d53229c926162
|
||||
Subproject commit ebc1985f31be10b3ac434ae708c94b9cf3a49b44
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
org.ensime:sbt-ensime;sbtVersion=0.13;scalaVersion=2.10:1.12.12:compile
|
||||
org.jsoup:jsoup:1.10.2:compile
|
||||
org.scala-lang:scala-library:2.10.6:compile
|
||||
org.scala-lang:scala-reflect:2.10.4:compile
|
||||
org.scalamacros:quasiquotes_2.10:2.1.0:compile
|
||||
org.scalariform:scalariform_2.10:0.1.4:compile
|
||||
org.scalaz:scalaz-concurrent_2.10:7.2.12:compile
|
||||
org.scalaz:scalaz-core_2.10:7.2.12:compile
|
||||
org.scalaz:scalaz-effect_2.10:7.2.12:compile
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
ch.imvs:sdes4j:1.1.3:compile
|
||||
com.github.igniterealtime:jbosh:06ee5a43a0:compile
|
||||
com.google.code.gson:gson:2.3.1:compile
|
||||
com.google.guava:guava:15.0:compile
|
||||
com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.0_jdk5:compile
|
||||
com.googlecode.json-simple:json-simple:1.1.1:compile
|
||||
com.jcraft:jzlib:1.1.3:compile
|
||||
com.ning:async-http-client:1.9.31:compile
|
||||
com.sun.jdmk:jmxtools:1.2.1:compile
|
||||
com.sun.jmx:jmxri:1.2.1:compile
|
||||
com.yuvimasory:orange-extensions:1.3.0:compile
|
||||
commons-codec:commons-codec:1.6:compile
|
||||
commons-lang:commons-lang:2.4:compile
|
||||
commons-logging:commons-logging:1.2:compile
|
||||
dnsjava:dnsjava:2.1.7:compile
|
||||
dom4j:dom4j:1.6.1:compile
|
||||
io.callstats:callstats-java-sdk:4.1.1:compile
|
||||
io.netty:netty:3.10.4.Final:compile
|
||||
javax.activation:activation:1.1:compile
|
||||
javax.jms:jms:1.1:compile
|
||||
javax.mail:mail:1.4:compile
|
||||
javax.servlet:javax.servlet-api:3.1.0:compile
|
||||
junit:junit:4.10:compile
|
||||
log4j:log4j:1.2.15:compile
|
||||
net.java.dev.jna:jna:4.1.0:compile
|
||||
net.jcip:jcip-annotations:1.0:compile
|
||||
org.apache.commons:commons-lang3:3.3.2:compile
|
||||
org.apache.felix:org.apache.felix.framework:4.4.0:compile
|
||||
org.apache.felix:org.apache.felix.main:4.4.0:compile
|
||||
org.apache.httpcomponents:httpasyncclient:4.1:compile
|
||||
org.apache.httpcomponents:httpclient:4.4.1:compile
|
||||
org.apache.httpcomponents:httpcore:4.4.1:compile
|
||||
org.apache.httpcomponents:httpcore-nio:4.4.1:compile
|
||||
org.apache.logging.log4j:log4j-api:2.3:compile
|
||||
org.apache.logging.log4j:log4j-core:2.3:compile
|
||||
org.bitbucket.b_c:jose4j:0.5.1:compile
|
||||
org.bitlet:weupnp:0.1.4:compile
|
||||
org.bouncycastle:bcpkix-jdk15on:1.54:compile
|
||||
org.bouncycastle:bcprov-jdk15on:1.54:compile
|
||||
org.eclipse.jetty:jetty-client:9.2.10.v20150310:compile
|
||||
org.eclipse.jetty:jetty-http:9.2.10.v20150310:compile
|
||||
org.eclipse.jetty:jetty-io:9.2.10.v20150310:compile
|
||||
org.eclipse.jetty:jetty-proxy:9.2.10.v20150310:compile
|
||||
org.eclipse.jetty:jetty-rewrite:9.2.10.v20150310:compile
|
||||
org.eclipse.jetty:jetty-security:9.2.10.v20150310:compile
|
||||
org.eclipse.jetty:jetty-server:9.2.10.v20150310:compile
|
||||
org.eclipse.jetty:jetty-servlet:9.2.10.v20150310:compile
|
||||
org.eclipse.jetty:jetty-util:9.2.10.v20150310:compile
|
||||
org.eclipse.jetty:jetty-webapp:7.0.1.v20091125:compile
|
||||
org.eclipse.jetty:jetty-xml:7.0.1.v20091125:compile
|
||||
org.eclipse.jetty.websocket:websocket-api:9.2.10.v20150310:compile
|
||||
org.eclipse.jetty.websocket:websocket-client:9.2.10.v20150310:compile
|
||||
org.eclipse.jetty.websocket:websocket-common:9.2.10.v20150310:compile
|
||||
org.eclipse.jetty.websocket:websocket-server:9.2.10.v20150310:compile
|
||||
org.eclipse.jetty.websocket:websocket-servlet:9.2.10.v20150310:compile
|
||||
org.fusesource:sigar:1.6.4:compile
|
||||
org.gnu.inet:libidn:1.15:compile
|
||||
org.hamcrest:hamcrest-core:1.1:compile
|
||||
org.igniterealtime:tinder:1.2.3:compile
|
||||
org.igniterealtime.smack:smack:3.2.2-jitsi-2-20170425.180418-3:compile
|
||||
org.igniterealtime.smack:smackx:3.2.2-jitsi-2-20170425.180420-2:compile
|
||||
org.igniterealtime.whack:core:2.0.0:compile
|
||||
org.jitsi:bccontrib:1.0:compile
|
||||
org.jitsi:fmj:1.0-20160121.172939-10:compile
|
||||
org.jitsi:ice4j:1.0:compile
|
||||
org.jitsi:jain-sip-ri-ossonly:1.2.98c7f8c-jitsi-oss1:compile
|
||||
org.jitsi:jicoco:1.0-20160109.203023-16:compile
|
||||
org.jitsi:jitsi-android-osgi:1.0-20150723.002702-1:compile
|
||||
org.jitsi:jitsi-configuration:2.9-20150723.181638-1:compile
|
||||
org.jitsi:jitsi-dnsservice:2.9-20150723.181644-1:compile
|
||||
org.jitsi:jitsi-fileaccess:2.9-20150723.181644-1:compile
|
||||
org.jitsi:jitsi-netaddr:2.9-20150723.181645-1:compile
|
||||
org.jitsi:jitsi-packetlogging:2.9-20151104.171808-2:compile
|
||||
org.jitsi:jitsi-protocol:2.9-20151211.202410-3:compile
|
||||
org.jitsi:jitsi-protocol-jabber:2.9-20161228.174152-22:compile
|
||||
org.jitsi:jitsi-protocol-media:2.9-20150723.181646-1:compile
|
||||
org.jitsi:jitsi-resourcemanager:2.9-20150723.181652-1:compile
|
||||
org.jitsi:jitsi-ui-service:2.9-20150723.181654-1:compile
|
||||
org.jitsi:jitsi-util:2.9-20150723.181654-1:compile
|
||||
org.jitsi:jitsi-videobridge:1.0-SNAPSHOT:compile
|
||||
org.jitsi:libjitsi:1.0-20170606.180648-284:compile
|
||||
org.jitsi:zrtp4j-light:3.2.0-jitsi-1-20150723.002345-1:compile
|
||||
org.opentelecoms.sdp:java-sdp-nist-bridge:1.1:compile
|
||||
org.opentelecoms.sdp:sdp-api:1.0:compile
|
||||
org.osgi:org.osgi.core:4.3.1:compile
|
||||
org.slf4j:jul-to-slf4j:1.7.7:compile
|
||||
org.slf4j:osgi-over-slf4j:1.7.7:compile
|
||||
org.slf4j:slf4j-api:1.7.12:compile
|
||||
org.slf4j:slf4j-jdk14:1.7.7:compile
|
||||
org.slf4j:slf4j-simple:1.6.1:compile
|
||||
org.xmpp:jnsapi:0.0.3-jitsi-1-20151013.145326-2:compile
|
||||
xml-apis:xml-apis:1.0.b2:compile
|
||||
xmlpull:xmlpull:1.1.3.4a:compile
|
||||
xpp3:xpp3:1.1.4c:compile
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
org.webjars.bower:dgrid:1.0.0:compile
|
||||
org.webjars.bower:dojo:1.12.2:compile
|
||||
org.webjars.bower:dstore:1.1.1:compile
|
||||
|
|
@ -28,10 +28,10 @@ abstract class CentralTests extends TestSuite {
|
|||
def resolve(
|
||||
deps: Set[Dependency],
|
||||
filter: Option[Dependency => Boolean] = None,
|
||||
extraRepo: Option[Repository] = None,
|
||||
extraRepos: Seq[Repository] = Nil,
|
||||
profiles: Option[Set[String]] = None
|
||||
) = {
|
||||
val repositories0 = extraRepo.toSeq ++ repositories
|
||||
val repositories0 = extraRepos ++ repositories
|
||||
|
||||
val fetch0 = fetch(repositories0)
|
||||
|
||||
|
|
@ -56,7 +56,7 @@ abstract class CentralTests extends TestSuite {
|
|||
def resolutionCheck(
|
||||
module: Module,
|
||||
version: String,
|
||||
extraRepo: Option[Repository] = None,
|
||||
extraRepos: Seq[Repository] = Nil,
|
||||
configuration: String = "",
|
||||
profiles: Option[Set[String]] = None
|
||||
) =
|
||||
|
|
@ -69,27 +69,25 @@ abstract class CentralTests extends TestSuite {
|
|||
case (k, v) => k + "_" + v
|
||||
}.mkString("_")
|
||||
|
||||
val expected =
|
||||
await(
|
||||
textResource(
|
||||
Seq(
|
||||
"resolutions",
|
||||
module.organization,
|
||||
module.name,
|
||||
attrPathPart,
|
||||
version + (
|
||||
if (configuration.isEmpty)
|
||||
""
|
||||
else
|
||||
"_" + configuration.replace('(', '_').replace(')', '_')
|
||||
)
|
||||
).filter(_.nonEmpty).mkString("/")
|
||||
)
|
||||
).split('\n').toSeq
|
||||
val path = Seq(
|
||||
"resolutions",
|
||||
module.organization,
|
||||
module.name,
|
||||
attrPathPart,
|
||||
version + (
|
||||
if (configuration.isEmpty)
|
||||
""
|
||||
else
|
||||
"_" + configuration.replace('(', '_').replace(')', '_')
|
||||
)
|
||||
).filter(_.nonEmpty).mkString("/")
|
||||
|
||||
def tryRead = textResource(path)
|
||||
|
||||
val dep = Dependency(module, version, configuration = configuration)
|
||||
val res = await(resolve(Set(dep), extraRepo = extraRepo, profiles = profiles))
|
||||
val res = await(resolve(Set(dep), extraRepos = extraRepos, profiles = profiles))
|
||||
|
||||
// making that lazy makes scalac crash in 2.10 with scalajs
|
||||
val result = res
|
||||
.minDependencies
|
||||
.toVector
|
||||
|
|
@ -109,6 +107,15 @@ abstract class CentralTests extends TestSuite {
|
|||
Seq(org, name, ver, cfg).mkString(":")
|
||||
}
|
||||
|
||||
val expected =
|
||||
await(
|
||||
tryRead.recoverWith {
|
||||
case _: Exception =>
|
||||
tryCreate(path, result.mkString("\n"))
|
||||
tryRead
|
||||
}
|
||||
).split('\n').toSeq
|
||||
|
||||
for (((e, r), idx) <- expected.zip(result).zipWithIndex if e != r)
|
||||
println(s"Line ${idx + 1}:\n expected: $e\n got: $r")
|
||||
|
||||
|
|
@ -120,11 +127,11 @@ abstract class CentralTests extends TestSuite {
|
|||
version: String,
|
||||
artifactType: String,
|
||||
attributes: Attributes = Attributes(),
|
||||
extraRepo: Option[Repository] = None
|
||||
extraRepos: Seq[Repository] = Nil
|
||||
)(
|
||||
f: Artifact => T
|
||||
): Future[T] =
|
||||
withArtifacts(module, version, artifactType, attributes, extraRepo) {
|
||||
withArtifacts(module, version, artifactType, attributes, extraRepos) {
|
||||
case Seq(artifact) =>
|
||||
f(artifact)
|
||||
case other =>
|
||||
|
|
@ -139,35 +146,35 @@ abstract class CentralTests extends TestSuite {
|
|||
version: String,
|
||||
artifactType: String,
|
||||
attributes: Attributes = Attributes(),
|
||||
extraRepo: Option[Repository] = None,
|
||||
extraRepos: Seq[Repository] = Nil,
|
||||
classifierOpt: Option[String] = None,
|
||||
transitive: Boolean = false
|
||||
)(
|
||||
f: Seq[Artifact] => T
|
||||
): Future[T] = {
|
||||
val dep = Dependency(module, version, transitive = transitive, attributes = attributes)
|
||||
withArtifacts(dep, artifactType, extraRepo, classifierOpt)(f)
|
||||
withArtifacts(dep, artifactType, extraRepos, classifierOpt)(f)
|
||||
}
|
||||
|
||||
def withArtifacts[T](
|
||||
dep: Dependency,
|
||||
artifactType: String,
|
||||
extraRepo: Option[Repository],
|
||||
extraRepos: Seq[Repository],
|
||||
classifierOpt: Option[String]
|
||||
)(
|
||||
f: Seq[Artifact] => T
|
||||
): Future[T] =
|
||||
withArtifacts(Set(dep), artifactType, extraRepo, classifierOpt)(f)
|
||||
withArtifacts(Set(dep), artifactType, extraRepos, classifierOpt)(f)
|
||||
|
||||
def withArtifacts[T](
|
||||
deps: Set[Dependency],
|
||||
artifactType: String,
|
||||
extraRepo: Option[Repository],
|
||||
extraRepos: Seq[Repository],
|
||||
classifierOpt: Option[String]
|
||||
)(
|
||||
f: Seq[Artifact] => T
|
||||
): Future[T] = async {
|
||||
val res = await(resolve(deps, extraRepo = extraRepo))
|
||||
val res = await(resolve(deps, extraRepos = extraRepos))
|
||||
|
||||
assert(res.metadataErrors.isEmpty)
|
||||
assert(res.conflicts.isEmpty)
|
||||
|
|
@ -191,9 +198,9 @@ abstract class CentralTests extends TestSuite {
|
|||
artifactType: String,
|
||||
extension: String,
|
||||
attributes: Attributes = Attributes(),
|
||||
extraRepo: Option[Repository] = None
|
||||
extraRepos: Seq[Repository] = Nil
|
||||
): Future[Unit] =
|
||||
withArtifact(module, version, artifactType, attributes = attributes, extraRepo = extraRepo) { artifact =>
|
||||
withArtifact(module, version, artifactType, attributes = attributes, extraRepos = extraRepos) { artifact =>
|
||||
assert(artifact.url.endsWith("." + extension))
|
||||
}
|
||||
|
||||
|
|
@ -266,25 +273,42 @@ abstract class CentralTests extends TestSuite {
|
|||
}
|
||||
|
||||
'snapshotMetadata - {
|
||||
// Let's hope this one won't change too much
|
||||
val mod = Module("com.github.fommil", "java-logging")
|
||||
val version = "1.2-SNAPSHOT"
|
||||
val extraRepo = MavenRepository("https://oss.sonatype.org/content/repositories/public/")
|
||||
'simple - {
|
||||
val mod = Module("com.github.fommil", "java-logging")
|
||||
val version = "1.2-SNAPSHOT"
|
||||
val extraRepo = MavenRepository("https://oss.sonatype.org/content/repositories/public/")
|
||||
|
||||
* - resolutionCheck(
|
||||
mod,
|
||||
version,
|
||||
configuration = "runtime",
|
||||
extraRepo = Some(extraRepo)
|
||||
)
|
||||
* - resolutionCheck(
|
||||
mod,
|
||||
version,
|
||||
configuration = "runtime",
|
||||
extraRepos = Seq(extraRepo)
|
||||
)
|
||||
|
||||
* - ensureHasArtifactWithExtension(
|
||||
mod,
|
||||
version,
|
||||
"jar",
|
||||
"jar",
|
||||
extraRepo = Some(extraRepo)
|
||||
)
|
||||
* - ensureHasArtifactWithExtension(
|
||||
mod,
|
||||
version,
|
||||
"jar",
|
||||
"jar",
|
||||
extraRepos = Seq(extraRepo)
|
||||
)
|
||||
}
|
||||
|
||||
* - {
|
||||
val mod = Module("org.jitsi", "jitsi-videobridge")
|
||||
val version = "1.0-SNAPSHOT"
|
||||
val extraRepos = Seq(
|
||||
MavenRepository("https://github.com/jitsi/jitsi-maven-repository/raw/master/releases"),
|
||||
MavenRepository("https://github.com/jitsi/jitsi-maven-repository/raw/master/snapshots"),
|
||||
MavenRepository("https://jitpack.io")
|
||||
)
|
||||
|
||||
* - resolutionCheck(
|
||||
mod,
|
||||
version,
|
||||
extraRepos = extraRepos
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
'versionProperty - {
|
||||
|
|
@ -399,8 +423,8 @@ abstract class CentralTests extends TestSuite {
|
|||
intransitiveCompiler("optional")
|
||||
),
|
||||
"jar",
|
||||
None,
|
||||
None
|
||||
extraRepos = Nil,
|
||||
classifierOpt = None
|
||||
) {
|
||||
case Seq() =>
|
||||
throw new Exception("Expected one JAR")
|
||||
|
|
@ -683,7 +707,7 @@ abstract class CentralTests extends TestSuite {
|
|||
* - resolutionCheck(
|
||||
Module("org.kie", "kie-api"),
|
||||
"6.5.0.Final",
|
||||
extraRepo = Some(MavenRepository("https://repository.jboss.org/nexus/content/repositories/public"))
|
||||
extraRepos = Seq(MavenRepository("https://repository.jboss.org/nexus/content/repositories/public"))
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -723,6 +747,23 @@ abstract class CentralTests extends TestSuite {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
'sbtPluginVersionRange - {
|
||||
val mod = Module("org.ensime", "sbt-ensime", attributes = Map("scalaVersion" -> "2.10", "sbtVersion" -> "0.13"))
|
||||
val ver = "1.12.+"
|
||||
|
||||
* - {
|
||||
if (isActualCentral) // doesn't work via proxies, which don't list all the upstream available versions
|
||||
resolutionCheck(mod, ver)
|
||||
}
|
||||
}
|
||||
|
||||
'multiVersionRanges - {
|
||||
val mod = Module("org.webjars.bower", "dgrid")
|
||||
val ver = "1.0.0"
|
||||
|
||||
* - resolutionCheck(mod, ver)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -295,6 +295,28 @@ object VersionIntervalTests extends TestSuite {
|
|||
assert(itv.isEmpty)
|
||||
}
|
||||
}
|
||||
|
||||
'multiRange - {
|
||||
* - {
|
||||
val itv = Parse.multiVersionInterval("[1.0,2.0)")
|
||||
assert(itv == Some(VersionInterval(Some(Version("1.0")), Some(Version("2.0")), fromIncluded = true, toIncluded = false)))
|
||||
}
|
||||
|
||||
* - {
|
||||
val itv = Parse.multiVersionInterval("[1.0,2.0),[3.0,4.0)")
|
||||
assert(itv == Some(VersionInterval(Some(Version("3.0")), Some(Version("4.0")), fromIncluded = true, toIncluded = false)))
|
||||
}
|
||||
|
||||
* - {
|
||||
val itv = Parse.multiVersionInterval("[1.0,2.0),[3.0,4.0),[5.0,6.0)")
|
||||
assert(itv == Some(VersionInterval(Some(Version("5.0")), Some(Version("6.0")), fromIncluded = true, toIncluded = false)))
|
||||
}
|
||||
|
||||
* - {
|
||||
val itv = Parse.multiVersionInterval("(1.0,2.0),[3.0,4.0),(5.0,6.0)")
|
||||
assert(itv == Some(VersionInterval(Some(Version("5.0")), Some(Version("6.0")), fromIncluded = false, toIncluded = false)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
'constraint{
|
||||
|
|
|
|||
Loading…
Reference in New Issue