简体   繁体   English

IntelliJ IDEA Grails看不到Jar

[英]IntelliJ IDEA Grails Not Seeing Jar

I'm trying to reference a class within IntelliJ IDEA 9.0.2 in a Grails project on a Linux system. 我正在尝试在Linux系统上的Grails项目中引用IntelliJ IDEA 9.0.2中的类。 I added the dependency to BuildConfig.groovy : 我将依赖项添加到BuildConfig.groovy

dependencies {
    // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.

    runtime 'mysql:mysql-connector-java:5.1.5'
    compile 'org.apache.poi:poi-ooxml:3.6'
  }

I see the org.apache.poi in my ~/.ivy2/cache directory, but get a compile error when referencing a class in the jars. 我在~/.ivy2/cache目录中看到了org.apache.poi ,但在引用jar中的类时遇到编译错误。 In fact, the code complete doesn't show any org.apache.poi classes. 实际上,代码complete不会显示任何org.apache.poi类。 So it appears IntelliJ doesn't know about these classes. 所以看来IntelliJ不知道这些类。

Any ideas what I'm doing wrong? 我有什么想法我做错了吗? Why doesn't IntelliJ see these classes? 为什么IntelliJ没有看到这些类?

Figured it out... "Tools-->Synchronize Grails dependencies" 想出来......“工具 - >同步Grails依赖”

In IntelliJ 13.1, it is now: Tools -> Grails -> Synchronize Grails 在IntelliJ 13.1中,它现在是:工具 - > Grails - >同步Grails

In IntelliJ 15, the "Synchronize" option moved to File -> Synchronize 在IntelliJ 15中,“同步”选项已移至文件 - >同步

在IntelliJ 15中,“同步”选项已移至文件 - >同步

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM