Quantcast
Channel: JetBrains Developer Community : Thread List - IntelliJ IDEA Users
Viewing all articles
Browse latest Browse all 5661

IntelliJ 13 and Gradle: cannot find symbol / package does not exist and unable to run ScalaTest

$
0
0

I (successfully?) imported a multimodule Gradle project in IntelliJ. One of the module is a Scala module and the remaining ones are Java modules. One of the java modules produces a WAR artifact. IntelliJ seems to recognize all the modules and even the WAR artifact, which is a good thing. It correctly recognizes the Scala module as well. However, the project is unusable.

 

When trying to build the project, the dependencies aren't getting resolved for some reason and I get messages like:

 

  java: .../MyClass.java:3: cannot find symbol

  symbol  : class SomeClass

  location: package some.package

 

Note that class MyClass is in module x which depends on y and class some.package.SomeClass is in module y. I can navigate the code (using Ctrl + click) correctly but the file has a 'J' little icon indicating that it's not getting correctly parsed as source file. It's worth noting that this is a legacy project and the source/resource folders all have custom locations.

 

Similarly I get a "package does not exist" message if the whole package can't be found.

 

Moreover, the ScalaTest files can't be run correctly as I get the following:

 

  Unable to load a Suite class. This could be due to an error in your runpath. Missing class: com.my.package.SomeSpec

 

Are these known issues? Is there a work around?

 

Given the shortcomings of JetGradle in the previous version I was really hoping that version 13 would work better. It looks like it's still falling short.

 

Thanks!


Viewing all articles
Browse latest Browse all 5661

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>