1

I got the following maven configuration in my pom.xml The skipTests variable is highlighted red by Intellij Ultimate 2018.1 as

Cannot resolve symbol 'skipTests'

But why? This is a common maven environmental variable.

<build>
 <plugins>
  <plugin>
    <!-- exec yarn -->
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>exec-maven-plugin</artifactId>
    <executions>
      ...
      <execution>
        <id>yarn-test</id>
        <phase>process-test-classes</phase>
        <goals>
          <goal>exec</goal>
        </goals>
        <configuration>
          <executable>yarn</executable>
          <skip>${skipTests}</skip>
          <arguments>
            <argument>test</argument>
          </arguments>
        </configuration>
      </execution>
    </executions>
  </plugin>
 </plugins>
</build>
Ewgenij Sokolovski
  • 897
  • 1
  • 12
  • 31

2 Answers2

4

I solved the issue by putting the intellij ignore comment

<!--suppress MavenModelInspection -->

on that particular pom line.

Ewgenij Sokolovski
  • 897
  • 1
  • 12
  • 31
0

Try to restart Intellij Idea, sometimes the errors disappear only when you restart it. If that doesn't work, try to change the version of your Maven.

EDIT

Check this link, I think that will help you How to disable pom.xml validation in IntelliJ IDEA