[英]Maven Archive cannot be read or is not a valid Zip file?
When running the Maven Install in Eclipse for my XXXXClient (web service) project, I repeatedly got this message: " Archive for required library: 'X:/XXXX/XXXX/.m2/repository/javax/enterprise/cdi-api/1.0-SP4-redhat-4/cdi-api-1.0-SP4-redhat-4.jar' in project 'XXXXClient' cannot be read or is not a valid ZIP file XXXXClient Build path Build Path Problem " for the following jars (dependencies in my project): 在Eclipse中为我的XXXXClient(Web服务)项目运行Maven Install时,我反复收到此消息:“ Archive for required library:'X:/XXXX/XXXX/.m2/repository/javax/enterprise/cdi-api/1.0项目'XXXXClient'中的-SP4-redhat-4 / cdi-api-1.0-SP4-redhat-4.jar'无法读取或不是有效的ZIP文件XXXXClient构建路径构建路径问题 “以下jar(依赖关系)我的项目):
Most of these jars can be found on the Maven Redhat repository: https://maven.repository.redhat.com/nexus/content/groups/product-techpreview/ 大多数这些罐子都可以在Maven Redhat存储库中找到: https : //maven.repository.redhat.com/nexus/content/groups/product-techpreview/
In my Maven settings.xml, I have redhat-techpreview-all-repository and redhat-techpreview-eap-repository has active profiles. 在我的Maven settings.xml中,我有redhat-techpreview-all-repository和redhat-techpreview-eap-repository有活动的配置文件。 Both profiles are configured:
两个配置文件都配置为
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
I noticed: 我注意到:
The only way I found to resolve my problem was to manually download each jar and replace them one by one. 我找到解决问题的唯一方法是手动下载每个jar并逐个替换它们。
Why did I have corrupted jar files in the first place and Was there a better way to resolve this? 为什么我首先有损坏的jar文件,有没有更好的方法来解决这个问题?
Thanks in advance, 提前致谢,
I believe the "-U" flag will force a download of missing JARs, but it's possible for a corrupted version to be added to the repository (such as network glitches during download), which the -U flag will not fix. 我相信“-U”标志将强制下载丢失的JAR,但是可能会将损坏的版本添加到存储库(例如下载期间的网络故障),-U标志将无法修复。 When I've had this problem before I've been able to fix it by deleting the local .m2 repository and allowing Maven to redownload them.
当我通过删除本地.m2存储库并允许Maven重新下载它之前我已经解决了这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.