Manage source and javadoc for Grails automatic dependencies in IntelliJ IDEA?

半城伤御伤魂 提交于 2019-12-07 08:10:51

问题


How do I attach source and javadoc to libraries in IntelliJ IDEA that are linked automatically by Grails dependency resolution and are not explicitly listed in the IDEA project settings?

For example in BuildConfig.groovy:

grails.project.dependency.resolution = {
    repositories {
        mavenRepo "http://oss.sonatype.org/content/repositories/releases/"
    }
    dependencies {
        runtime 'org.elasticsearch:elasticsearch:0.17.7'
    }
}

Is there a method to have IDEA automatically pick up the source and javadoc from the Maven repository?


回答1:


IDEA attached the source automatically to the project plugin module. The JavaDoc can be manually attached to the plugin module in the project structure interface at:

File -> Project Structure -> Project Settings -> Modules -> project name-grailsPlugins -> Paths -> JavaDoc




回答2:


IDEA 11 will be ably to search and download sources for any jar. The search is performed using https://oss.sonatype.org/ by artifactId and version got from name of jar.




回答3:


not an answer, but an idea:

you might hook into the 'grails integrate-with' gant script and add this functionality yourself. $GRAILS_HOME/scripts/IntegrateWith.groovy uses some templates for .ipr and .iml file that could be modified.

At some point in future it is excepted that gradle will be used for building Grails projects but there's still a long way to go.



来源:https://stackoverflow.com/questions/7578423/manage-source-and-javadoc-for-grails-automatic-dependencies-in-intellij-idea

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!