Factor default Ivy pattern

This commit is contained in:
Alexandre Archambault
2016-04-17 22:24:26 +02:00
parent 4f423e95d6
commit 00aaf8e1ac
2 changed files with 5 additions and 3 deletions
+1 -3
View File
@@ -746,9 +746,7 @@ object Cache {
}
lazy val ivy2Local = IvyRepository(
ivy2HomeUri + "local/" +
"[organisation]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/" +
"[artifact](-[classifier]).[ext]",
ivy2HomeUri + "local/" + coursier.ivy.Pattern.default,
dropInfoAttributes = true
)
@@ -9,6 +9,10 @@ import java.util.regex.Pattern.quote
object Pattern {
val default =
"[organisation]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/" +
"[artifact](-[classifier]).[ext]"
val propertyRegex = (quote("${") + "[^" + quote("{[()]}") + "]*" + quote("}")).r
val optionalPartRegex = (quote("(") + "[^" + quote("{()}") + "]*" + quote(")")).r
val variableRegex = (quote("[") + "[^" + quote("{[()]}") + "]*" + quote("]")).r