Intellij trying to treat pom.xml as jar file

2019-05-08 14:31发布

问题:

While trying to run test (on a maven project) from Intellij , I am constantly getting below mentioned error

[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 cycles run well when run from the command line.

Has anyone faced this issue before ?

I have already tried all these things

  1. Invalidated Intellij Idea
  2. Deleted my .m2 repo and recreated the project

回答1:

ok , finally fixed.The osgi facets apparently were responsible.The issue was resolved once the facet was removed.Do not know the exact reason but the intellij osgi facet is known to be unstable. More info here