1

I have added plenty of jar files in My Local Apache Archiva and added the Repository location and Dependencies in my project pom.xml .

mvn clean
mvn eclipse:eclipse

working fine but when i am trying to run

mvn install

then i am getting exception

Error in opening zip files

while all jar file downloaded from archiva

Someone suggested delete the .m2 repository and run command again i tried that also but still not able to get resolution. Note:- I have no any test code in my project Thanks

Subodh Joshi
  • 12,717
  • 29
  • 108
  • 202
  • The reason might be that one of the dependencies might not have downloaded correctly (hence deleting the .m2 repo might fix it). If that does not solve the problem you have to go through the dependencies included in you project and see if you are able to unzip them all. If one of them is corrupted download and install the file locally to fix the problem – shyam Nov 02 '12 at 07:13
  • Thanks Shyam but i have lots of jar added in Archiva So do you know how can i figure out which jar have issue – Subodh Joshi Nov 02 '12 at 07:16
  • Well, use copy-dependencies to copy them to one folder and check every one (using an ant task perhaps...or shell) – shyam Nov 02 '12 at 07:21
  • Actually i just looked my .m2 directory and here all jar files are only 3KB while same jar are showing there actual size in Apache Archiva Directory. – Subodh Joshi Nov 02 '12 at 07:28

2 Answers2

3

You have corrupt files in your local maven repository. They need to be redownloaded - possibly just deleting the .m2 folder and retrying will fix the issue, if not, you need to find out why your archiva repository is serving you bad files.

You should be able to run mvn -X install to find out more detailed information as to which file was failing.

eis
  • 51,991
  • 13
  • 150
  • 199
  • Thanks as i look on the my .M2 repository and all the jars are only 3kb while same jar showing exact size in Apache Archiva. – Subodh Joshi Nov 02 '12 at 08:55
  • [DEBUG] Searching for sources for org.com:wsdl4j:1.0.0:null at org.com:wsdl4 1.0.0:javadoc [DEBUG] Searching for sources for org.com:xfe_jdk-14:1.0.0:null at org.com:x _jdk-14:1.0.0:javadoc [DEBUG] Searching for sources for org.com:xmlbeans:2.3.0:null at org.com:xml ans:2.3.0:javadoc [DEBUG] Searching for sources for org.com:xmlpserver:1.0.0:null at org.com:x pserver:1.0.0:javadoc [DEBUG] Searching for sources for org.com:xmlsec:1.4.1:null at org.com:xmlse 1.4.1:javadoc [DEBUG] Searching for sources for org.com:xpp3:1.0.0:null at org.csdc:xpp3:1. 0:javadoc – Subodh Joshi Nov 02 '12 at 09:00
  • @subodh please add the exception you got as well as couple of lines before that to the question itself – eis Nov 02 '12 at 09:33
  • [INFO] Using Eclipse Workspace: null [DEBUG] 0 from workspace null [DEBUG] com.com:log4j:jar:1.0-SNAPSHOT (selected for null) [WARNING] Invalid POM for org.com:AMANDA5j2ee:jar:1.0.0, transitive dependencies (if any) will not be available, enable debug logging for more details: 1 problem was encountered while building the effective model [FATAL] Non-parseable POM C:\Users\sjoshi\.m2\repository\org\com\log4j\1.0.0\log4j-1.0.0.pom: end tag name must be the same as start tag from line 30 (position: TEXT seen – Subodh Joshi Nov 02 '12 at 09:47
1

its because of corrupt file in repository delete that specific file which is showing error or delete entire repository and redeploy .

Azhar_K
  • 11
  • 1