1

I have a maven project in IntelliJ I have marked the generated sources directory as the source by doing Files>Project Structure and marking as source. I've also done it the other way by right clicking on the folder and marking as generated-sources.

I'm still getting errors saying the IntelliJ cannot find things in these folders Cannot resolve symbol 'name_of_folder' when I'm creating a SOAP implementation

Does anyone know how I can fix this issue? From what I can see I have done everything correctly to mark that folder and IntelliJ Should be able to read from there

Tom Withers
  • 1,131
  • 2
  • 16
  • 27
  • 1
    Maybe this will be of some help to you. [SO Question](https://stackoverflow.com/questions/5905896/intellij-inspection-gives-cannot-resolve-symbol-but-still-compiles-code) You may have to re-import the project. `View -> Tool Windows -> Maven Projects, then click on cycle arrows icon` – Sadiq Ali Jul 17 '17 at 11:33
  • See https://confluence.jetbrains.com/display/IDEADEV/Maven+Integration+FAQ#MavenIntegrationFAQ-GeneratedSources – CrazyCoder Jul 17 '17 at 11:38
  • @CrazyCoder My folders are there that's not the issue. When I mark it as source intellij doesn't seem to know about it – Tom Withers Jul 17 '17 at 11:43
  • Please share the [Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve). – CrazyCoder Jul 17 '17 at 11:43
  • @CrazyCoder my explanation is fine, there is nothing else I can say to make it clear.... – Tom Withers Jul 17 '17 at 11:46
  • @SadiqAli I tried this and It hasnt worked – Tom Withers Jul 17 '17 at 11:51
  • You can share a sample so that others can reproduce it and tell you how to fix it. – CrazyCoder Jul 17 '17 at 12:03

2 Answers2

2

uncheck "Create Separate module per source set" in Preferences > Build, Execution, Deployment > Gradle and then rebuild / gradle refresh

Asad Abdin
  • 121
  • 9
0

Fixed this error....

IntelliJ was marking all subdir of my generated-sources/cxf folder as source roots... So a simple highlight of all folders and un-mark as sources fixes the issue.

Tom Withers
  • 1,131
  • 2
  • 16
  • 27