0

尝试安装 new-doc 插件时出现下载失败错误。我收到的错误消息如下所示:

    ==== http://repo.grails.org/grails/libs-releases-local: tried

      http://repo.grails.org/grails/libs-releases-local/net/sf/json-lib/json
-lib/2.4/json-lib-2.4.jar

            ::::::::::::::::::::::::::::::::::::::::::::::

            ::              FAILED DOWNLOADS            ::

            :: ^ see resolution messages for details  ^ ::

            ::::::::::::::::::::::::::::::::::::::::::::::

            :: net.sf.json-lib#json-lib;2.4!json-lib.jar

            ::::::::::::::::::::::::::::::::::::::::::::::


| Error Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):

- net.sf.json-lib:json-lib:2.4

我的 BuildConfig.groovy 看起来像:

grails.servlet.version = "3.0" // Change depending on target container compliance (2.5 or 3.0)
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.project.plugins.dir = "plugins"

grails.project.war.file = "target/${appName}.war"
grails.project.dependency.resolution = {
// inherit Grails' default dependencies
inherits("global") {
    // uncomment to disable ehcache
    // excludes 'ehcache'
}
log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
repositories {
    grailsPlugins()
    grailsHome()
    grailsCentral()

    // uncomment the below to enable remote dependency resolution
    // from public Maven repositories
    //mavenLocal()
    mavenCentral()
    //mavenRepo "http://snapshots.repository.codehaus.org"
    //mavenRepo "http://repository.codehaus.org"
    //mavenRepo "http://download.java.net/maven/2/"
    //mavenRepo "http://repository.jboss.com/maven2/"
}
dependencies {
    // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.

    compile 'org.apache.poi:poi:3.9'
    compile 'org.apache.poi:poi-ooxml:3.9'
    compile 'com.google.guava:guava:12.0'

}
plugins {
    compile ":new-doc:0.3.2"
}
}

我对 groovy/grails 还很陌生,所以我不确定接下来应该怎么做才能解决这个问题。或者任何人都可以向我推荐任何其他用于 grails 的代码文档插件吗?

谢谢,迪

注意 当我运行“grails doc”时,它会在 target/docs 文件夹中生成所有文档代码。它有 index.html 页面,我认为该页面会列出所有 api 函数,但那里没有关于 api 文档的任何信息 - 所以我错误地断定 grails doc 没有生成 API 文档。我应该查看 target/docs/gapi 文件夹来获取为 grails 生成的 API 文档。我为我的菜鸟问题道歉,并且无法看到我面前的解决方案。谢谢。

4

0 回答 0