'Cannot resolve symbol' in my Maven POM file for @VAR@ property values



I'm getting errors for entries in my pom file


For the first entry, it says "Cannot resolve symbol 'CONTEXT_ROOT'".

I need to set the property to exactly this value, our SCM profiling works with these variable names. Can I escape this in some way to get rid of these errors.

Many thanks in advance for your help!


A workaround is to define a property in 'Settings > Build, Execution, Deployment > Build Tools > Maven > Runner > Properties'.


This is very annoying!


It's a shame this critical bug is still present in the very latest version. Seems developers are not going to fix this at all.


Defining properties in the maven runner did not remove the error from the pom analyzer. Is there another workaround?


Get this when I use git-commit-id-plugin. Will have to start seeing a therapist because this exacerbates my OCD.

It also affects the 5 other people on my team.


Can it be solved now somehow?


I'm wondering if anyone found a solution. Although it doesn't break the build, the warnings are annoying. Setting a property in IntelliJ settings isn't a solution, as such a property, set manually, prevent its auto population by e.g. git-commit-id-plugin.


Could JetBrains please at least acknowledge the issue and provide an ETA for the fix? The "workaround" proposed above isn't valid as per Damir's explanation and warnings for perfectly valid code aren't acceptable.


I have duplicated this in other contexts. We have a use case where we define multiple Cucumber tag inclusion/exclusion settings in our POM, and get the same error.

For example, defining a Maven property as follows causes the error to appear; even disabling the Maven model inspection does not address the issue.

<cucumber.options>--tags ~@unit --tags ~@slow</cucumber.options>

It appears the parsing error is independent of the inspections.


Since 2018.2 version (corresponding blog post about this Maven update) it is now possible to suppress such errors:



That will definitely fix things - thanks for the information!

Could you please let us know when you expect that update to be released?



Again, thanks for the information. In addition to the functionality you describe, it also fixes the parsing error in the first place.


Please sign in to leave a comment.