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/
答案 0 :(得分:2)
尝试重命名存储库文件夹" /home/dev237/.m2/repository"使maven创建一个新的存储库并再次下载所有依赖项。
答案 1 :(得分:0)
我遇到了类似的问题。这是我为解决该问题所做的事情:
cd
改成/home/dev237/.m2/repository/org/neo4j/spatial/osm-test-data/
rm -rf 20100819
(删除有问题的依赖项)mvn clean install
此时构建成功。
该解决方案可以说比TekTimmy更好,因为它避免了重新下载所有依赖项,无论它们是否有问题。但是,如果它们都引起问题,则采用其解决方案可能会更容易。