2

I have always had an issue of being warned that following code in my maven POM file is not allowed here. (No issues when I used Eclipse in the past). But I could still compile and run without issues using Intellij 2017 version.

I recently moved to version 2018. Getting same warnings but no longer able to compile. (If I comment it out, compiles fine).

Is there a work around for this on Intellij? It is legacy code and I do not want to remove it.

Error messages:

Element compilerArgs is not allowed here.
Element forkCount is not allowed here.

POM file. Commented parts with issue.

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
        <source>1.8</source>
        <target>1.8</target>
        <compilerArgs> <!-- ERROR -->
            <arg>-XX:MaxPermSize=256m</arg>
        </compilerArgs>
    </configuration>
</plugin>
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <configuration>
        <forkCount>1</forkCount> <!-- ERROR -->
        <argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
    </configuration>
</plugin>
kang
  • 707
  • 4
  • 17

0 Answers0