mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-25 07:57:12 -07:00
file:// no longer seen as valid maven coordinates.
This commit is contained in:
parent
096b2c20a4
commit
ddb4b3dbd8
1 changed files with 8 additions and 4 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue