4

mvn clean install 导致构建错误这是我得到的错误..

... 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/
4

2 回答 2

2

尝试重命名存储库文件夹“/home/dev237/.m2/repository”以使 maven 创建一个新存储库并再次下载所有依赖项。

于 2014-06-12T23:16:13.967 回答
0

我遇到了类似的问题。这是我为解决它所做的:

  1. cd进入/home/dev237/.m2/repository/org/neo4j/spatial/osm-test-data/
  2. rm -rf 20100819(删除有问题的依赖项)
  3. 重新运行mvn clean install

至此,它构建成功。

这个解决方案可以说比 TekTimmy 的更好,因为它避免了重新下载所有依赖项,无论它们是否有问题。但是,如果它们都引起了问题,那么使用它们的解决方案可能会更容易。

于 2019-09-03T01:18:01.277 回答