在grails中安装新文档插件时出错

在grails中安装新文档插件时出错,grails,Grails,我在尝试安装新的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 ::::::::::::::::::::::::::::::

我在尝试安装新的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
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"
}
}
我的BuildConfig.groovy看起来像:

    ==== 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
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的代码文档插件吗

谢谢, 迪伊

注意
当我运行“grailsdoc”时,它生成了target/docs文件夹中的所有文档代码。它有index.html页面,我认为该页面会列出所有api函数,但它没有关于api文档的任何信息——因此我错误地得出结论,grails doc没有生成api文档。我应该查看target/docs/gapi文件夹,而不是为grails获取生成的API文档。我为我的noob问题道歉,因为我看不到眼前的解决方案。谢谢。

当你说安装插件是什么意思?我看到您已经将条目添加到BuildConfig,您是否正在尝试显式运行
install plugin
命令?您是否也尝试过使用
grails clean
然后
grails compile
?是的,最初我尝试使用命令行安装插件,但没有成功。后来我发现正确的方法是在配置文件中添加依赖项。我在配置文件中添加了依赖项,然后进行了干净的编译,但我仍然面临同样的问题。Grails的哪个版本?这适用于1.x项目,但2.x项目不需要它,因为功能已经存在了。没错,我使用的是grails的2.3.3版。也许GrailsDoc是我需要的,但目前我不确定这是否是我想要的,因为它似乎没有阅读代码本身的注释。我为这个问题道歉。GroovyDoc确实会从代码注释中生成文档,它是在target/docs/gapi文件夹中生成的。我打开了target/docs/index.html,它基本上不包含关于api的信息,所以我认为api文档没有生成。