mvn COMPILATION ERROR:打开zip文件时读取jar错误时出错

我有一个带有这些属性的x模块:

module-name:x-datamodel

这是pom.xml的一部分

com.x.datamodel x 1.0 jar 

我已使用此命令行在本地存储库中安装项目:

 mvn install:install-file -Dfile=/Users/me/Documents/Projects/x-datamodel/target/classes/x-datamodel.jar -DgroupId=com.x.datamodel -DgeneratePom=true -DlocalRepositoryPath=/Users/me/Documents/Projects/me-repository -DcreateChecksum=true -DartifactId=x -Dversion={1.0} -Dpackaging=jar 

并在bitbucket中添加了该项目。

我尝试将模块x集成到另一个项目中。

这里是y的pom.xml的一部分

  com.x.datamodel x ${x.version}    me-repository https://bitbucket.org/me/me-repository/src/master   

我可以在项目y中导入模块x的某些类,但是当我构建y项目时,我收到此错误:

 [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] error reading /Users/me/.m2/repository/com/x/datamodel/x/1.0/x-1.0.jar; error in opening zip file [ERROR] error reading /Users/me/.m2/repository/com/x/datamodel/x/1.0/x-1.0.jar; error in opening zip file [ERROR] /Users/me/Documents/Projects/y/src/main/java/com/y/server/serviceImpl/UserServiceImpl.java:[3,32] package com.x.datamodel.model does not exist [ERROR] /Users/me/Documents/Projects/y/src/main/java/com/y/server/serviceImpl/UserServiceImpl.java:[18,12] cannot find symbol symbol: class User location: class com.y.server.serviceImpl.UserServiceImpl [ERROR] /Users/me/Documents/Projects/y/src/main/java/com/y/server/security/CustomUserDetailsService.java:[3,32] package com.x.datamodel.model does not exist [INFO] 16 errors [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:56 min [INFO] Finished at: 2016-12-28T15:51:05+01:00 [INFO] Final Memory: 29M/209M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project y: Compilation failure: Compilation failure: [ERROR] error reading /Users/me/.m2/repository/com/x/datamodel/x/1.0/x-1.0.jar; error in opening zip file [ERROR] error reading /Users/me/.m2/repository/com/x/datamodel/x/1.0/x-1.0.jar; error in opening zip file [ERROR] /Users/me/Documents/Projects/y/src/main/java/com/y/server/serviceImpl/UserServiceImpl.java:[3,32] package com.x.datamodel.model does not exist [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException 

安装存储库后,我将库放入此路径:

 .m2/repository/com/x/datamodel/x/1.0/x-1.0.jar 

为什么不:

 .m2/repository/com/x-datamodel/x/1.0/x-1.0.jar 

我倾向于认为该文件已损坏。 尝试删除它并再次下载。