在 IntelliJ IDEA 中管理 Grails 自动依赖项的源代码和 javadoc?
如何将源代码和 javadoc 附加到 IntelliJ IDEA 中的库,这些库通过 Grails 依赖项解析自动链接,并且未在 IDEA 项目设置中明确列出?
例如在 BuildConfig.groovy:
grails.project.dependency.resolution = {
repositories {
mavenRepo "http://oss.sonatype.org/content/repositories/releases/"
}
dependencies {
runtime 'org.elasticsearch:elasticsearch:0.17.7'
}
}
有没有一种方法可以让IDEA自动从Maven存储库中获取源代码和javadoc?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
IDEA 自动将源代码附加到项目插件模块中。 JavaDoc 可以手动附加到项目结构界面中的插件模块,位置为:
文件 -> 插件模块。项目结构->项目设置->模块-> 项目名称-grailsPlugins ->路径-> JavaDoc
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
IDEA 11 将能够搜索和下载任何 jar 的源代码。
使用https://oss.sonatype.org/通过artifactId和从jar名称获取的版本来执行搜索。
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.
不是答案,而是一个想法:
您可以连接到
'grailsintegrate-with'
gant 脚本并自己添加此功能。$GRAILS_HOME/scripts/IntegrateWith.groovy
使用一些可修改的.ipr
和.iml
文件模板。在未来的某个时候,Gradle 可能会被用于构建 Grails 项目,但还有很长的路要走。
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.