我有一个疑问,我是一个很好的编程习惯,我导入一个位于git存储库中的项目(不是通过克隆 URL ,而是通过下载 ZIP ) 。 屏幕截图为 here
因为很多次我遇到了运行下载项目的问题。谷歌搜索后我发现这是由于损坏的依赖jar,很多时候很难删除ERRORs来编译和运行,屏幕下方显示通过将git存储库(如ZIP)导入Eclipse,许多依赖/ jars被破坏了 .m2 文件夹(虽然我的公司网速很快)
saroj.sahoo@user-261 MINGW64 ~/.m2
$ find repository/ -name "*jar" | xargs -L 1 zip -T | grep error | grep invalid
warning [repository/org/springframework/data/spring-data-elasticsearch/3.0.0.M4/spring-data-elasticsearch-3.0.0.M4.jar]: 188369 extra bytes at beginning or within zipfile
(attempting to process anyway)
file #1: bad zipfile offset (local header sig): 188369
(attempting to re-compensate)
zip error: Zip file structure invalid (repository/ch/qos/logback/logback-access/1.1.2/logback-access-1.1.2.jar)
zip error: Zip file structure invalid (repository/ch/qos/logback/logback-classic/1.1.2/logback-classic-1.1.2.jar)
zip error: Zip file structure invalid (repository/com/fasterxml/jackson/core/jackson-core/2.5.0/jackson-core-2.5.0.jar)
zip error: Zip file structure invalid (repository/com/fasterxml/jackson/core/jackson-databind/2.5.0/jackson-databind-2.5.0.jar)
zip error: Zip file structure invalid (repository/com/fasterxml/jackson/datatype/jackson-datatype-joda/2.5.0/jackson-datatype-joda-2.5.0.jar)
zip error: Zip file structure invalid (repository/com/google/gwt/gwt-user/1.5.3/gwt-user-1.5.3.jar)
zip error: Zip file structure invalid (repository/commons-codec/commons-codec/1.2/commons-codec-1.2.jar)
zip error: Zip file structure invalid (repository/commons-pool/commons-pool/1.5.4/commons-pool-1.5.4.jar)
zip error: Zip file structure invalid (repository/org/glassfish/web/javax.el/2.2.5/javax.el-2.2.5.jar)
zip error: Zip file structure invalid (repository/org/hibernate/hibernate-core/3.6.10.Final/hibernate-core-3.6.10.Final.jar)
zip error: Zip file structure invalid (repository/org/hibernate/hibernate-core/4.3.8.Final/hibernate-core-4.3.8.Final.jar)
zip error: Zip file structure invalid (repository/org/hibernate/hibernate-ehcache/3.6.10.Final/hibernate-ehcache-3.6.10.Final.jar)
zip error: Zip file structure invalid (repository/org/hibernate/hibernate-ehcache/4.3.8.Final/hibernate-ehcache-4.3.8.Final.jar)
zip error: Zip file structure invalid (repository/org/hibernate/hibernate-entitymanager/3.6.10.Final/hibernate-entitymanager-3.6.10.Final.jar)
zip error: Zip file structure invalid (repository/org/hibernate/hibernate-entitymanager/4.3.8.Final/hibernate-entitymanager-4.3.8.Final.jar)
zip error: Zip file structure invalid (repository/org/hsqldb/hsqldb/2.3.2/hsqldb-2.3.2.jar)
zip error: Zip file structure invalid (repository/org/jadira/usertype/usertype.core/3.2.0.GA/usertype.core-3.2.0.GA.jar)
zip error: Zip file structure invalid (repository/org/jvnet/opendmk/jmxremote_optional/1.0_01-ea/jmxremote_optional-1.0_01-ea.jar)
zip error: Zip file structure invalid (repository/org/mortbay/jetty/cometd-jetty/6.1.12rc1/cometd-jetty-6.1.12rc1.jar)
zip error: Zip file structure invalid (repository/org/mortbay/jetty/jetty/6.1.12rc1/jetty-6.1.12rc1.jar)
zip error: Zip file structure invalid (repository/org/mortbay/jetty/jetty-embedded/6.1.26/jetty-embedded-6.1.26.jar)
zip error: Zip file structure invalid (repository/org/mortbay/jetty/jetty-java5-threadpool/6.1.26/jetty-java5-threadpool-6.1.26.jar)
zip error: Zip file structure invalid (repository/org/postgresql/postgresql/9.3-1100-jdbc4/postgresql-9.3-1100-jdbc4.jar)
zip error: Zip file structure invalid (repository/org/slf4j/jcl-over-slf4j/1.7.10/jcl-over-slf4j-1.7.10.jar)
zip error: Zip file structure invalid (repository/org/slf4j/slf4j-api/1.7.10/slf4j-api-1.7.10.jar)
zip error: Zip file invalid, could not spawn unzip, or wrong unzip (original files unmodified)
zip error: Zip file structure invalid (repository/org/springframework/data/spring-data-jpa/1.7.1.RELEASE/spring-data-jpa-1.7.1.RELEASE.jar)
zip error: Zip file structure invalid (repository/org/springframework/integration/spring-integration-core/4.1.2.RELEASE/spring-integration-core-4.1.2.RELEASE.jar)
zip error: Zip file structure invalid (repository/org/springframework/integration/spring-integration-stream/4.1.2.RELEASE/spring-integration-stream-4.1.2.RELEASE.jar)
zip error: Zip file structure invalid (repository/org/springframework/security/spring-security-acl/3.2.5.RELEASE/spring-security-acl-3.2.5.RELEASE.jar)
zip error: Zip file structure invalid (repository/org/springframework/security/spring-security-config/3.2.5.RELEASE/spring-security-config-3.2.5.RELEASE.jar)
zip error: Zip file structure invalid (repository/org/springframework/security/spring-security-core/3.2.5.RELEASE/spring-security-core-3.2.5.RELEASE.jar)
zip error: Zip file structure invalid (repository/org/springframework/security/spring-security-taglibs/3.2.5.RELEASE/spring-security-taglibs-3.2.5.RELEASE.jar)
zip error: Zip file structure invalid (repository/org/springframework/security/spring-security-web/3.2.5.RELEASE/spring-security-web-3.2.5.RELEASE.jar)
zip error: Zip file structure invalid (repository/org/springframework/spring-aop/4.1.4.RELEASE/spring-aop-4.1.4.RELEASE.jar)
zip error: Zip file structure invalid (repository/org/springframework/spring-aspects/4.1.4.RELEASE/spring-aspects-4.1.4.RELEASE.jar)
zip error: Zip file structure invalid (repository/org/springframework/spring-jdbc/4.1.4.RELEASE/spring-jdbc-4.1.4.RELEASE.jar)
zip error: Zip file structure invalid (repository/org/springframework/spring-jms/4.1.4.RELEASE/spring-jms-4.1.4.RELEASE.jar)
zip error: Zip file structure invalid (repository/org/springframework/spring-orm/4.1.4.RELEASE/spring-orm-4.1.4.RELEASE.jar)
zip error: Zip file structure invalid (repository/org/springframework/spring-oxm/4.1.4.RELEASE/spring-oxm-4.1.4.RELEASE.jar)
zip error: Zip file structure invalid (repository/org/springframework/spring-test/4.1.4.RELEASE/spring-test-4.1.4.RELEASE.jar)
zip error: Zip file structure invalid (repository/org/springframework/spring-tx/4.1.4.RELEASE/spring-tx-4.1.4.RELEASE.jar)
zip error: Zip file structure invalid (repository/org/springframework/spring-web/4.1.4.RELEASE/spring-web-4.1.4.RELEASE.jar)
zip error: Zip file structure invalid (repository/org/springframework/spring-webmvc/4.1.4.RELEASE/spring-webmvc-4.1.4.RELEASE.jar)
zip error: Zip file structure invalid (repository/org/springframework/webflow/spring-js/2.3.3.RELEASE/spring-js-2.3.3.RELEASE.jar)
zip error: Zip file structure invalid (repository/org/springframework/webflow/spring-js-resources/2.3.1.RELEASE/spring-js-resources-2.3.1.RELEASE.jar)
and many more..............
那么如何消除这个问题,因为我对克隆来自git的URL 不感兴趣?