Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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
like image 330
user1811587 Avatar asked Dec 27 '12 06:12

user1811587


People also ask

Why is IntelliJ ignoring Pom?

The root cause was that the pom. xml file was ignored (Settings - Build, Execution, Deployment - Maven - Ignored Files). Thus, updates to this file pulling in a new version of a dependency did not trigger anything meaningful in IntelliJ IDEA (causing compilation issues). Note that the pom.

Does JAR file contains POM xml?

The pom. xml inside JAR is designed for following purposes, Automatic dependency resolution.


1 Answers

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

like image 131
user1811587 Avatar answered Sep 28 '22 22:09

user1811587