Search code examples
mavenintellij-ideamaven-resources-plugin

intellij flags properties set by maven-resources-plugin as "cannot resolve symbol"


In my project's POM, I use maven-resources-plugin to set some properties from a file. However, Intellij flags these property references in the POM with the error "cannot resolve symbol", presumably because it cannot see them being defined anywhere. Is there a way to suppress this error?


Solution

  • Yes, you can open Settings (spanner icon), go to Project Settings -> Inspections and then disable the inspection Maven -> Maven Model Inspection.

    Alternatively, you might like to try defining "blank" values for the properties, and see if the plugin successfully overwrites them.

    <properties>
         <myproperty></myproperty>
    </properties>
    

    Good luck!