user1811587
user1811587

Reputation: 153

Intellij trying to treat pom.xml as jar file

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

Upvotes: 5

Views: 1414

Answers (2)

gil.fernandes
gil.fernandes

Reputation: 14611

Even in 2020 this IntelliJ (Ultimate 2019.2) plugin tries to open a pom.xml file as a jar file. Disabling the OSGI plugin helped in my case:

enter image description here

enter image description here

Upvotes: 0

user1811587
user1811587

Reputation: 153

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

Upvotes: 8

Related Questions