IntelliJ complains it cannot resolve ${maven.multiModuleProjectDirectory}

已回答

In our parent pom we have a line which results in intellij underlining the $variable saying 'cannot resolve symbol maven.multiModuleProjectDirectory'

This is a 'standard' symbol in maven 3.3.1 or greater (we are using 3.5.2 or higher, often 3.6). Builds at command line are fine - this is just an editor glitch.

Is there a way to convinced intellij to be happy about this?

The full line is as follows (for capturing code coverage across our multi module project ready to share with Sonar)

<sonar.jacoco.reportPaths>${maven.multiModuleProjectDirectory}/target/jacoco.exec</sonar.jacoco.reportPaths>
2

It is not supported currently, please vote for this request: https://youtrack.jetbrains.com/issue/IDEA-190202. As a workaround you can add the variable to ignores list:

0

请先登录再写评论。