1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 00:17:11 -07:00

file:// no longer seen as valid maven coordinates.

This commit is contained in:
Erik C. Thauvin 2017-03-26 17:58:55 -07:00
parent 096b2c20a4
commit ddb4b3dbd8

View file

@ -1,7 +1,7 @@
package com.beust.kobalt.maven
import com.beust.kobalt.api.Kobalt
import org.eclipse.aether.artifact.DefaultArtifact
import com.beust.kobalt.api.*
import org.eclipse.aether.artifact.*
/**
* Encapsulate a Maven id captured in one string, as used by Gradle or Ivy, e.g. "org.testng:testng:6.9.9".
@ -17,8 +17,12 @@ class MavenId private constructor(val groupId: String, val artifactId: String, v
val classifier: String?, val version: String?) {
companion object {
fun isMavenId(id: String) = with(id.split(':')) {
size >= 3 && size <= 5
fun isMavenId(id: String) = if (id.startsWith("file://")) {
false
} else {
with(id.split(':')) {
size >= 3 && size <= 5
}
}
fun isRangedVersion(s: String): Boolean {