Я работаю с kotlin Gradle Project. Когда я пытаюсь интегрировать Swagger, он показывает
Не удалось разрешить io.springfox: springfox-swagger2: 3.0.0-SNAPSHOT. Возможное решение: - Объявите репозиторий, предоставляющий артефакт, см. Документацию в
Ошибка для
- springfox-swagger2: 3.0.0-SNAPSHOT
- springfox -swagger-ui: 3.0.0-SNAPSHOT
- springfox-spring-webflux: 3.0.0-SNAPSHOT
при импорте проектов gradle.
buildscript {
ext {
kotlin_version = "1.2.51"
springBootVersion = "2.0.3.RELEASE"
junitPlatformVersion = '1.0.0-M2'
junitJupiterVersion = '5.0.0-M2'
junitVintageVersion = '4.12.0-M2'
smack_version = '4.2.3'
}
repositories {
mavenLocal()
mavenCentral()
maven { url "https://repo.spring.io/milestone" }
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/libs-snapshot" }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "io.spring.gradle:dependency-management-plugin:1.0.3.RELEASE"
classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlin_version}")
}
}
defaultTasks "clean", "build"
подпроекты {
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
sourceCompatibility = 1.8
repositories {
maven { url "https://repo.spring.io/libs-snapshot" }
mavenLocal()
mavenCentral()
maven { url "http://archiva.hsenidmobile.com/repository/internal" }
maven { url "https://repo.spring.io/milestone" }
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/libs-snapshot" }
maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local/' }
jcenter()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
compile("org.springframework.boot:spring-boot-starter-webflux:$springBootVersion") {
exclude(module: "hibernate-validator")
}
compile("org.springframework.boot:spring-boot-starter-data-jpa:$springBootVersion")
compile("org.springframework.boot:spring-boot-starter-security:$springBootVersion")
compile("javax.servlet:javax.servlet-api:3.0.1")
compile("io.jsonwebtoken:jjwt:0.7.0")
compile("hms.common:hms-common-util:1.0.9")
compile("com.fasterxml.jackson.module:jackson-module-kotlin:2.9.0.pr4")
compile("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.0.pr4")
compile("org.postgresql:postgresql:42.1.4")
compile("com.google.api-client:google-api-client:1.22.0")
compile group: 'org.springframework.plugin', name: 'spring-plugin-core', version: '2.0.0.RELEASE'
compile 'io.springfox:springfox-swagger2:3.0.0-SNAPSHOT'
compile 'io.springfox:springfox-swagger-ui:3.0.0-SNAPSHOT'
compile 'io.springfox:springfox-spring-webflux:3.0.0-SNAPSHOT'
implementation "org.igniterealtime.smack:smack-tcp:$smack_version"
implementation "org.igniterealtime.smack:smack-experimental:$smack_version"
implementation "org.igniterealtime.smack:smack-java7:$smack_version"
implementation "org.igniterealtime.smack:smack-extensions:$smack_version"
implementation "org.igniterealtime.smack:smack-im:$smack_version"
testCompile("org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}")
testCompile("org.junit.platform:junit-platform-runner:${junitPlatformVersion}")
testCompile("org.springframework.boot:spring-boot-starter-test:$springBootVersion")
testCompile("io.projectreactor:reactor-test:3.1.0.RELEASE")
runtime("tanukisoft:wrapper:3.2.3")
testRuntime("org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}") //JUnit5
testRuntime("org.junit.vintage:junit-vintage-engine:${junitVintageVersion}") //JUnit4
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
}