mvn全新安装会导致构建错误,这里是我得到的错误。
... 24 more
{[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.707s
[INFO] Finished at: Thu Jun 12 14:09:51 IST 2014
[INFO] Final Memory: 9M/104M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency- plugin:2.1:unpack-dependencies (get-test-data) on project neo4j-spatial: Error unpacking file: /home/dev237/.m2/repository/org/neo4j/spatial/osm-test-data/20100819/osm-test-data-20100819.jar to: /home/dev237/Projects /spatial/target
[ERROR] org.codehaus.plexus.archiver.ArchiverException: Error while expanding /home/dev237/.m2/repository/org/neo4j/spatial/osm-test-data/20100819/osm-test-data-20100819.jar: Negative seek offset
[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/发布于 2014-06-13 07:16:14
尝试将存储库文件夹重命名为"/home/dev237/.m2/ repository“,让maven创建一个新的存储库并再次下载所有依赖项。
发布于 2019-09-03 09:18:01
我遇到了类似的问题。这是我为解决这个问题所做的:
通过
cd进入/home/dev237/.m2/repository/org/neo4j/spatial/osm-test-data/rm -rf 20100819 (删除有问题的dependencies)mvn clean install在这一点上它成功地构建了。
这种解决方案可以说比TekTimmy的更好,因为它避免了重新下载所有依赖项,无论它们是否有问题。然而,如果他们都造成了问题,那么采用他们的解决方案可能会更容易。
https://stackoverflow.com/questions/24179985
复制相似问题