Reputation: 2744
I am getting above error in my pom. I can build the project successfully using maven but intellij gives above error and shows that part in the pom in red. Bellow is my section in the pom. Any idea on this?
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
...
<build>
<plugins>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<org.ops4j.pax.url.mvn.localRepository>${settings.localRepository}</org.ops4j.pax.url.mvn.localRepository>
<jacoco-agent.destfile>${project.build.directory}/jacoco.exec</jacoco-agent.destfile>
</systemPropertyVariables>
<suiteXmlFiles>
<suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
...
</plugins>
</build>
Upvotes: 17
Views: 11475
Reputation: 117
I suspect the problem for anyone who finds this is that IntelliJ comes with a bundled version of maven and doesnt actually use your local installion unless you ask it to. The version chain of IntelliJ -> Bundled Maven -> Surefire is what is causing it to recognize this as a problem.
There are two ways to solve this:
Upvotes: 4