0

I am trying to reactivate a maven project but, when I am executing a JUnit test I am getting this error:

Description Resource    Path    Location    Type
Archive for required library: 'C:/....m2/repository/org/eclipse/ui/workbench/3.3.0-I20070608-1100/workbench-3.3.0-I20070608-1100.jar' in project 'project-test' cannot be read or is not a valid ZIP file   Build path  Build Path Problem

When I am checking the library I am finding the .jar file, just in case I re-downloaded it again but still I have the same error.

I am a really beginner in Maven and this is my first try on it. First, I created an example with maven-archetype-quickstar , but I am receiving this error when I am trying to build the test Hello World example. My error is like this one described here but I can't remove it: Failed to load class "org.slf4j.impl.StaticLoggerBinder" error in java project? anyway, I can run alone the test .java class and it is executed successfully. So, now I am trying to use an existing project (that one that I mentioned here in the beginning) and first it is saying that I am missing the artifact org.eclipse.xtend, I created the dependency for it but I have located it's .jar file in a Reference Library but where should I locate it in order to be found (because still I have that error): > ArtifactTransferException: Failure to transfer org.eclipse.xtend:org.eclipse.xtend.standalone:jar:2.4.3 from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.eclipse.xtend:org.eclipse.xtend.standalone:jar:2.4.3 from/to central (http://repo.maven.apache.org/maven2): No response received after 60000 Fine, when I use the tag <path> it can find it but after that I am getting that Build Path error that I mentioned in the beginning :(

Community
  • 1
  • 1
Avah
  • 227
  • 3
  • 13
  • Looks like this file `workbench-3.3.0-I20070608-1100.jar` is corrupt. Find this file an look if it is a ZIP file. – Jens Jul 25 '14 at 06:47
  • I already downloaded it from here only the .jar: http://repo1.maven.org/maven2/org/eclipse/ui/workbench/3.3.0-I20070608-1100/ and I substituted it with this new one but it didn't work :( – Avah Jul 25 '14 at 06:51
  • 1
    delete .m2 and mvn install. sometimes works. – ZaoTaoBao Jul 25 '14 at 07:41
  • @ZaoTaoBao , definitely it works - I have deleted .m2 and I uninstalled the maven from eclipe IDE then I reinstated it and I re-imported the maven project again, and now it is FUNCTIONAL in a perfect way :) thnxxx. SO, everyone should try this trick right in the beginning if they face a problem. – Avah Jul 25 '14 at 22:29

1 Answers1

0

If you use eclipse IDE, you should restart it. Or you can delete the project and import it again . You should clean and refresh project . Or you can delete the folder contain the corrupt .jar file and run mvn install command.

Be sure that you put .jar file in the correct directory ( if your computer has many .m2 folder ) . You should open the .jar file by 7Zip to test it

Tung Vo
  • 2,227
  • 5
  • 27
  • 45