Setup:
- Intellij IDEA community edition 2020.2
- Spring Bott starter parent: 2.3.5
- Java 11
- WRAPPER_VERSION: 0.5.6
- mvn 2
Hi,
I googled a lot e.g. here but I just can't fix it.
I created a new mvn spring project with Intellij. When I commit the project I get errors detected by code analyses in class: MavenWrapperDownloader.java
.
e.g. It reports:
Cannot resolve symbol String
I tried:
- invalidate caches and restart
- delete .idea folder and reimport
- checked sdk setup
- mvn reimport
- mvn clean and then rebuild (while the build is always successful)
I'm pretty new to maven. I guess the scope of the mvn package might be wrong because the build process works as expected.
UPDATE: I reinstallt my openjdk11. No success. Then I found out that my .mvn/wrapper dir is not set as source root. I know that was never the case in my other projects. As a trial I've set my .mvn folder as source root and now the MavenWrapperDownloader.java file is recognized as a java class and the compiler interprets the symbols. But now there is another error. It says I have to define a package name for that class because the class does not have one per default. It is pretty strange to me. I also tried to use another spring boot starter version but nothing changed
When I execute Analyze->inspect code I get the following: