Intellij tries to treat pom.xml as a jar file

When I try to run a test (in the maven project) from Intellij, I constantly get the error mentioned below

[my-module] Exception in parsing jar file for extract from jar: /path/to/pom.xml java.util.zip.ZipException: The JAR/ZIP file (/path/to/pom.xml) seems corrupted, error: error in opening zip file 

However, all maven loops work well when launched from the command line.

Has anyone encountered this problem before?

I already tried all these things

  • Invalid Intellij idea
  • Removed my .m2 repository and recreated the project
+4
source share
2 answers

ok finally fixed. Obviously, osgi facets were responsible. The problem was resolved after removing the face. I don’t know the exact reason, but the function intellij osgi, as you know, is unstable. More here

+7
source

The problem returns if you re-import all projects. To fix this, permanently remove the Osmorc plugin from intellij. You can do this by going to Intellij β†’ preferences β†’ Plugins Search Osmorc and uncheck and restart intellij

0
source

All Articles