Maven POM "Cannot Resolve Symbol" Error
Answered
All of my poms which reference an environment variable (e.g. ${env.VAR_NAME}) have an error identifying that the symbol can't be resolved.
All of the variables are referenced by profiles which are not active.
Even when setting the variables in the Maven runner config they still are unresolved.
It's not failing a built but it is marking the project with an "Error".
How do i fix this?
Please sign in to leave a comment.
Looks like https://youtrack.jetbrains.com/issue/IDEA-96358. What OS do you use?
I'm on OSX; Yes that looks like the issue i'm running into. And i can't believe this issue still exists for 4 years.
Does the issue persist is you start IDEA from the Terminal using idea binary from the .app contents folder?
We're using 2016 .1.4 on Windows 7 and we have this problem as well.
The pom file reports "cannot resolve symbol" on this line of code
<app.buildNumber>${env.BUILD_NUMBER}</app.buildNumber>
We use a properties file that declares this as
app.buildNumber=${env.BUILD_NUMBER}
We use Maven to pull the required libraries. The ide is set to use jdk 1.8.0_66 and apache-maven-3.2.1
We've tried all the suggestions for wiping out the project and reimporting, invalidating the cache, deselecting inspections,
and rebuilding the project. The war will build, but this error indicates there's a real problem somewhere.