4

mvn clean install causes build error here is the error what I am getting..

... 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/
sree
  • 93
  • 2
  • 13
  • the message "Negative seek offset" indicates a corrupt download. Can you verify the files are there, readable and ok? In doubt you may also try to delete the lcoal maven repo and just try again? – wemu Jun 12 '14 at 09:39
  • http://stackoverflow.com/questions/24178197/how-to-build-maven-after-importing-an-java-spring-project/24178362#24178362 This answer may help you go through it – Nirav Prajapati Jun 12 '14 at 10:02
  • We changed file permission to 777.how can i delete maven repo..can you please specific about this.I am a beginer.. – sree Jun 12 '14 at 10:05
  • I used to change permission maven java version also..but I am getting same error..Please help me??? – sree Jun 12 '14 at 12:28

2 Answers2

2

Try renaming the repository folder "/home/dev237/.m2/repository" to make maven create a new repository and download all dependencies again.

TekTimmy
  • 3,066
  • 2
  • 29
  • 33
  • I used to rename the repository folder and tried mvn clean install.But it gives many warnings and errors..Finally it gives Build error with following error message – sree Jun 13 '14 at 04:35
  • Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.1:unpack-dependencies (get-test-data) on project neo4j-spatial: – sree Jun 13 '14 at 04:36
  • If you could add the content of your POM file to your question's body I may provide further help. – TekTimmy Jun 13 '14 at 10:28
  • I am really sorry.It is big xml file.I tried to add it.but could not.It is very difficult align xml file to stack overflows code style..it is too big..any other solution please??? – sree Jun 13 '14 at 10:48
  • 1
    Editing your question, copy & paste content of your POM, selecting and press STRG+K to make it a code section does not work? – TekTimmy Jun 13 '14 at 13:48
  • Please edit your question with the new updates and don't answer in comments. – Michael Hunger Jun 15 '14 at 20:00
0

I ran into a similar issue. This is what I did to resolve it:

  1. cd into /home/dev237/.m2/repository/org/neo4j/spatial/osm-test-data/
  2. rm -rf 20100819 (remove the problematic dependencies)
  3. Re-run mvn clean install

At which point it built successfully.

This solution is arguably better than TekTimmy's as it avoids re-downloading all dependencies, regardless of if they're problematic or not. If they're all causing issues however, it may be easier to go with their solution.

Alexander Terp
  • 199
  • 2
  • 12