Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable pom.xml validation in IntelliJ IDEA

Tags:

People also ask

Why IntelliJ ignored POM XML?

The root cause was that the pom. xml file was ignored (Settings - Build, Execution, Deployment - Maven - Ignored Files). Thus, updates to this file pulling in a new version of a dependency did not trigger anything meaningful in IntelliJ IDEA (causing compilation issues).


I'm using buildnumber-maven-plugin to get Mercurial changeset as project build number:

<plugin>     <groupId>org.codehaus.mojo</groupId>     <artifactId>buildnumber-maven-plugin</artifactId>     <version>1.2</version>     <executions>         <execution>             <phase>initialize</phase>             <goals>                 <goal>hgchangeset</goal>             </goals>         </execution>     </executions> </plugin> 

Then I use ${changeSet} property to set build.number property in the same pom.xml:

<build.number>${changeSet}</build.number> 

However, IntelliJ IDEA complains that it Cannot resolve symbol 'changeSet':

enter image description here

Also, the module root and the affected pom.xml files are underlined in red in the Project tool window.

I tried all of the offered Alt+Enter options and Maven configurations in the Settings; nothing helped.

Everything builds and works fine, I just want to get rid of the annoying error displayed in the IDE. Any suggestion?

IDE and environment:

IntelliJ IDEA 2016.1.2 Build #IC-145.972, built on May 14, 2016 JRE: 1.8.0_65-b17 amd64 JVM: Java HotSpot(TM) 64-Bit Server VM by Oracle Corporation