Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 270
Andy Dennie Avatar asked Oct 03 '22 15:10

Andy Dennie


1 Answers

Warning: The solution to define the property blank as vikingsteve mentioned is very dangerous because in Maven 3 properties which are declared in pom.xml could not be changed by other plugins.

So if you have one plugin which sets a property and another plugin which reads the value of the property it will always get an empty string if you initialize it in the pom.xml.

In fact you can't define it in the pom.xml but i have no idea what i can do to eliminate the IntelliJ IDEA warning. For now i have to disable the "Maven model inspection". :-(

like image 50
Josef Reichardt Avatar answered Oct 12 '22 02:10

Josef Reichardt