gradle - Gradle Kotlin:找不到net.sf.saxon:saxon-HE:9.9.0-2

标签 gradle kotlin build.gradle saxon gradle-kotlin-dsl

Saxon似乎不是gradle试图发送它的地方:

Not Found

For request 'GET /artifact/net/sf/saxon/saxon-HE/9.9.0-2/saxon-HE-9.9.0-2.pom' 

实际的URL../artifact/net.sf.saxon/..,或者说是looks,而不是导致问题的..artifact/net/saxon..

我如何告诉kotlin-gradle-dsl,特别是要查看的存储库以及如何查看该存储库?

kotlin构建文件:
// https://mvnrepository.com/artifact/net.sf.saxon/Saxon-HE
compile group: 'net.sf.saxon', name: 'Saxon-HE', version: '9.9.0-2'



/*
 * This file was generated by the Gradle 'init' task.
 *
 * This generated file contains a sample Java project to get you started.
 * For more details take a look at the Java Quickstart chapter in the Gradle
 * user guide available at https://docs.gradle.org/5.0/userguide/tutorial_java_projects.html
 */

plugins {
    // Apply the java plugin to add support for Java
    java

    // Apply the application plugin to add support for building an application
    application
}

repositories {
    // Use jcenter for resolving your dependencies.
    // You can declare any Maven/Ivy/file repository here.
    jcenter()
    mavenCentral()


   maven {
        setUrl("https://mvnrepository.com/artifact/")
    }  
   maven {
        setUrl("http://repo.spring.io/plugins-release/")
    }  
}

dependencies {
    // This dependency is found on compile classpath of this component and consumers.
    implementation("com.google.guava:guava:26.0-jre")


    compile (group = "org.ccil.cowan.tagsoup"  , name = "tagsoup"     , version = "1.2.1")
    compile (group = "net.sf.saxon"            , name = "saxon-HE"   , version = "9.9.0-2")


    // Use TestNG framework, also requires calling test.useTestNG() below
    testImplementation("org.testng:testng:6.14.3")
}

application {
    // Define the main class for the application
    mainClassName = "helloWorldSaxon.App"
}

val test by tasks.getting(Test::class) {
    // Use TestNG for unit tests
    useTestNG()
}




Executing: gradle clean build
Arguments: [-c, /home/thufir/NetBeansProjects/helloWorldSaxon/settings.gradle.kts]

> Task :clean UP-TO-DATE
> Task :compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not find net.sf.saxon:saxon-HE:9.9.0-2.
     Searched in the following locations:
       - https://jcenter.bintray.com/net/sf/saxon/saxon-HE/9.9.0-2/saxon-HE-9.9.0-2.pom
       - https://jcenter.bintray.com/net/sf/saxon/saxon-HE/9.9.0-2/saxon-HE-9.9.0-2.jar
       - https://repo.maven.apache.org/maven2/net/sf/saxon/saxon-HE/9.9.0-2/saxon-HE-9.9.0-2.pom
       - https://repo.maven.apache.org/maven2/net/sf/saxon/saxon-HE/9.9.0-2/saxon-HE-9.9.0-2.jar
       - https://mvnrepository.com/artifact/net/sf/saxon/saxon-HE/9.9.0-2/saxon-HE-9.9.0-2.pom
       - https://mvnrepository.com/artifact/net/sf/saxon/saxon-HE/9.9.0-2/saxon-HE-9.9.0-2.jar
       - http://repo.spring.io/plugins-release/net/sf/saxon/saxon-HE/9.9.0-2/saxon-HE-9.9.0-2.pom
       - http://repo.spring.io/plugins-release/net/sf/saxon/saxon-HE/9.9.0-2/saxon-HE-9.9.0-2.jar
     Required by:
         project :

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 8s
2 actionable tasks: 1 executed, 1 up-to-date



Build failure (see the Notifications window for stacktrace): gradle clean build

最佳答案

您在名称 Artifact 中输入了一个类型,而不是

compile (group = "net.sf.saxon"            , name = "saxon-HE"   , version = "9.9.0-2")

它应该是
compile (group = "net.sf.saxon"            , name = "Saxon-HE"    , version = "9.9.0-2")

关于gradle - Gradle Kotlin:找不到net.sf.saxon:saxon-HE:9.9.0-2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54021502/

相关文章:

android - Jetpack compose 中的 onPressIn 和 onPressOut

android - 错误 :Execution failed for task ':app:processDebugGoogleServices' . > 请修复版本冲突

kotlin - is-check 或涉及类型的非泛型部分的强制转换

android - Gradle 在我的项目中包含第 3 方依赖项

android - Jenkins android模拟器插件可创建多个虚拟设备

java - 添加模块后,Android Studio 以非零退出值 1 结束

kotlin - 使用 Kotlin WHEN 子句进行 <、<=、>=、> 比较

gradle - 如何使用 Gradle 2.0 下载 javadoc 和 jar 源?

android - 无法使用 Gradle 分发 'http://services.gradle.org/distributions/gradle-1.6-bin.zip' 执行构建

intellij-idea - IntelliJ IDEA中的Xtend无法在src-gen中生成文件